RE: RE: [xsl] XSLT transform XSL-FO to CSS

Subject: RE: RE: [xsl] XSLT transform XSL-FO to CSS
From: "gary cor" <stuff4gary@xxxxxxxxxxx>
Date: Tue, 01 Oct 2002 11:45:54 +0000

Thanks for the suggestions. I have just ordered your XSL-FO book so haven't read it yet and don't understand fo that well. Provisionally, I had actually layed it out to do the master as xml rather than xslt and use the id tag for name. i.e.

<fo:inline  id="classname"
           font-family="arial, sans-serif">

And then using the xslt with math to generate many differen't css from the browser sniff with differen't fonts sizes etc for different browsers. I think what you've suggested sounds far better as it probably would be usable for a PDF result as well and I know you have experience for this.

It looks like I will use mainly fo:inline, fo:basic-link, fo:external-graphic and fo:block. I can't seem to find anything for css onhover, visited, cursor: hand, etc. so that's probably in the 15% you mentioned.

Many Thanks again for tips!


From: DPawson@xxxxxxxxxxx
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] XSLT transform XSL-FO to CSS
Date: Tue, 1 Oct 2002 08:34:37 +0100

Garry wrote:
> Can anyone help.  I need to generate CSS sheets from XML and
> I thought it
> would be nice to write the CSS structure in FO and then
> transform it into
> the various different CSS formats for different browsers etc.
> Does anyone know if there are any XSL-FO to CSS XSLT tranform
> sheets around
> that might help me get started?

Mmm. That's an interesting one.

I think you need a part of the XSLT as well.
The template which generates the xsl-fo will tell you
which element is being styled, due to CSS shouting, most
of the xsl-fo language is identical to the CSS so that
shouldn't be too hard.

Suggest: <xsl:template match ="blurt"> <x:tag>blurt </x:tag> (or a comment) <fo:block font-weight="12pt" etc

then use xslt on the xsl:fo to extract the mix of elements / styling to generate the css?

<xsl:template match="xsl:template">
<xsl:value-of select="x:tag"/> {
	<xsl:for-each select="@*">
  <xsl:value-of select="name()"/> :<xsl:value-of select="."/>;

sounds not unreasonable ?
You are going to fall foul of the places where fo and css didn't get into
It would take some filtering, may not be worth it except for the last 15%.

Any comments?

regards DaveP.


NOTICE: The information contained in this email and any attachments is
confidential and may be legally privileged. If you are not the
intended recipient you are hereby notified that you must not use,
disclose, distribute, copy, print or rely on this email's content. If
you are not the intended recipient, please notify the sender
immediately and then delete the email and any attachments from your

RNIB has made strenuous efforts to ensure that emails and any
attachments generated by its staff are free from viruses. However, it
cannot accept any responsibility for any viruses which are
transmitted. We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email
and any attachments are those of the author and do not necessarily
represent those of RNIB.

RNIB Registered Charity Number: 226227


XSL-List info and archive:

Join the world?s largest e-mail service with MSN Hotmail.

XSL-List info and archive:

Current Thread