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(_dot_)sanwal(_at_)hp(_dot_)com
-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Sent: Thursday, October 02, 2003 11:18 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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