Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Copying css file to destination

From: "Kaarle Kaila" <kaarle.kaila@------>
To:
Date: 8/3/2004 9:38:00 AM
Did not get any suggestions on how to do this so I solved it by embedding
the css-file in an xml-file named tables.css.xml something like:

<?xml version="1.0"?>
<css>
.table {font-size:12 pt;font-weight: normal;
margin-top:12 pt;margin-bottom:0 pt;
text-align:left
}
body { font : normal Arial;
}
</css>
===================
Then in my xslt document I added following code in my "main" template:

<xsl:apply-templates select="document('tables.css.xml')"/>

================
Finally I created the css-file using template:

<xsl:template match="css">
<xsl:document method="text" href="{$lbase}{$lname}/tables.css">
<xsl:value-of select="."/>
</xsl:document>
</xsl:template>
===================

This does what I need so It's acceptable for me but does not look too good
when I have embedded the css-file in a wrapper xml-file. May make editing
css-file with some tools not so good but e.g. with notepad it's OK.

Would it be possible to read the file as a css-file directly (XSLT 1.0 + /
libxslt)?

regards
Kaarle Kaila

> I create a document in xml and use xslt to transform it into html. This
> works OK.
>
> I also need a css-file for my html-files. I have copied this css-file to
the
> destination with my application but
> now I would need to do that in the xslt instead. I use libxslt and thus
use
> XSLT 1.0 (+)
>
> What would be the best way to copy / create my css-file using xslt? Can it
> be done ?
>
> regards
> Kaarle Kaila


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent