Subject: Re: [xsl] Copying css file to destination From: "Kaarle Kaila" <kaarle.kaila@xxxxxx> Date: Tue, 3 Aug 2004 12:37:47 +0300 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Copying css file to destinati, Kaarle Kaila | Thread | [xsl] XSL-List Guidelines, Mulberry Technologie |
Re: [xsl] Checking if node has data, Mukul Gandhi | Date | Re: [xsl] Splitting string, Rui Alberto L. |
Month |