Re: CSS and XSLT, again
Hi Shimon, > Yes, Michael, this is what I do (I actually load CSS file and > include its text in between <style>), but I thought this way is > awkward. I thought there is a way to "import" style into xsl file > like "include" for asp pages (if we are talking about IIS) Well, you could use the traditional XML way of declaring an entity and then importing that: <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY style SYSTEM 'style.css'> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <head> <title>...</title> <style> &style; </style> </head> <body> ... </body> </html> </xsl:template> ... </xsl:stylesheet> The advantage of this over using document() to pull in the CSS file is that you don't have to wrap the CSS in an element - you can just have the CSS file as normal CSS text. No doubt eventually you'll be able to use XInclude (see http://www.w3.org/TR/xinclude) or perhaps even XLink instead but I don't think that any of the XSLT processors/XML parsers support this at the moment. I hope that helps, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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