Subject: RE: RE: [xsl] XSLT transform XSL-FO to CSS From: "gary cor" <stuff4gary@xxxxxxxxxxx> Date: Tue, 01 Oct 2002 11:45:54 +0000 |
<fo:inline id="classname" font-size="12px" color="#000000" background-color="#ffffff" margin="0px" font-family="arial, sans-serif"> </fo:inline>
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
bed.
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 system.
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
Website: http://www.rnib.org.uk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XSLT transform XSL-FO to , DPawson | Thread | RE: RE: [xsl] XSLT transform XSL-FO, DPawson |
RE: [xsl] Transforming cascading in, TSchutzerWeissmann | Date | RE: RE: [xsl] XSLT transform XSL-FO, DPawson |
Month |