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

Subject: RE: [xsl] XSLT transform XSL-FO to CSS
From: DPawson@xxxxxxxxxxx
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.

  <xsl:template match ="blurt">
    <x:tag>blurt </x:tag>  (or a comment)

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:

Current Thread