RE: [xsl] how to insert/include the text/data in a separate (but local) .css file into an HTML O/P using XSL

Subject: RE: [xsl] how to insert/include the text/data in a separate (but local) .css file into an HTML O/P using XSL
From: "SANWAL, ABHISHEK (HP-Houston)" <abhishek.sanwal@xxxxxx>
Date: Thu, 2 Oct 2003 13:08:09 -0500
I think I shall go with one of the suggestions you mentioned below.

Although I wish MSXML supported <xinclude>. 

Thanks,

Abhishek Sanwal
HP - Houston Campus
abhishek.sanwal@xxxxxx

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx] 
Sent: Thursday, October 02, 2003 11:18 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] how to insert/include the text/data in a separate
(but local) .css file into an HTML O/P using XSL


> I am curious as to how I can add the .css material from a separate
.css
> file into the HTML <HEAD></HEAD> .

you can't do this in pure xslt1 although xslt 2 draft does have a
version
have a function for reading text files rather than xml ones.

Some processors have extension functions to do this (and it would be
easy to do in a any of teh java ones or msxml that let you escape to
some other language to pull in the file) or if your parser supports
xinclude you could use that.

> I tried and <xsl:include> and <xsl:import> don't work.
well they are compile time directives for including xsl stylesheets.
What you want is not that but a version of the document() function for
plain text. this has been added in xpath 2 draft.

If your css doesn't contain & or < then you can go
<!DOCTYPE xsl:stylesheet [
<!ENTITY css SYSTEM "mycssfile.css">
]]>
<xsl:stylesheet....

<style>
&css;
</style>

....


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread