This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: XSLT transform XSL-FO to CSS


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]