RE: how to insert/include the text/data in a separate
This is what I have done as per your suggestion. <!DOCTYPE xsl:stylesheet [ <!ENTITY qspcss SYSTEM "qsp.css"> ]> ..... <style type="text/css"> <xsl:comment> &qspcss; </xsl:comment> </style> Works like a charm :). Not a biggie but maybe this should go into Dave Pawsons FAQ as: "Adding a .CSS to the output of your HTML-XSL " or something of the sort. Thanks David. 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: 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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format