Re: [xsl] CSS and XSLT, again

Subject: Re: [xsl] CSS and XSLT, again
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 6 Feb 2001 09:31:55 +0000
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"

<xsl:template match="/">



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 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 Tennison

 XSL-List info and archive:

Current Thread