You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "sudha." <su...@einsurance.de> on 2002/07/22 18:12:49 UTC

how do we write css in fo using xsl?

Hi all

Iam writing an xsl for xhtml to pdf convertion.
I have one css linked to my xhtml file.
how do I write xsl mapping for FO for this?

I am not getting the proper fo link tag. 

thanks

regards
sudha


AW: how do we write css in fo using xsl?

Posted by "sudha." <su...@einsurance.de>.
thanks a lot Oleg. I shall try out SAC API and see what happens.
hope u are there if I get some troubles :):)

regards
sudha


-----Ursprungliche Nachricht-----
Von: Oleg Tkachenko [mailto:olegt@multiconn.com]
Gesendet: Montag, 22. Juli 2002 21:24
An: fop-user@xml.apache.org
Betreff: Re: how do we write css in fo using xsl?


sudha. wrote:

> Iam writing an xsl for xhtml to pdf convertion.
> I have one css linked to my xhtml file.
> how do I write xsl mapping for FO for this?
>
> I am not getting the proper fo link tag.
There is no such thing in xsl. You have to read css file, to parse it, to
resolve very complex logic of applying of style selectors and finnaly to add
appropriate fo attributes. I accomplished it recently and I can say it's
feasible considering some resonable restrictions.
For example:

css file:
.header {color: red;}

xhtml file:
...
<div class="header">
...

fo file:
<fo:block color="red">

PS. w3c even has API for css parsing called SAC and btw batik implements it.
--
Oleg Tkachenko
Multiconn International, Israel


Re: how do we write css in fo using xsl?

Posted by Oleg Tkachenko <ol...@multiconn.com>.
sudha. wrote:

> Iam writing an xsl for xhtml to pdf convertion.
> I have one css linked to my xhtml file.
> how do I write xsl mapping for FO for this?
> 
> I am not getting the proper fo link tag. 
There is no such thing in xsl. You have to read css file, to parse it, to 
resolve very complex logic of applying of style selectors and finnaly to add 
appropriate fo attributes. I accomplished it recently and I can say it's 
feasible considering some resonable restrictions.
For example:

css file:
.header {color: red;}

xhtml file:
...
<div class="header">
...

fo file:
<fo:block color="red">

PS. w3c even has API for css parsing called SAC and btw batik implements it.
-- 
Oleg Tkachenko
Multiconn International, Israel