[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Copying css file to destination

Subject: Re: Copying css file to destination
From: "Kaarle Kaila" <kaarle.kaila@xxxxxx>
Date: Tue, 3 Aug 2004 12:37:47 +0300
copying css
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.