Re: CSS (via entities)

Subject: Re: CSS (via entities)
From: Eric van der Vlist <vdv@xxxxxxxxxxxx>
Date: Fri, 01 Dec 2000 08:32:15 +0100
Hi Nic,

Miloslav Nic wrote:
> For an inspiration:
>  <!DOCTYPE xsl:stylesheet [ <!ENTITY inclusion SYSTEM "foo.css"> ]>

I find it clever, but also dangerous since I am not sure foo.css can
always be considered as well formed XML.

One of the reasons why it might not be well form is character

Since it won't have any XML declaration, the parser will assume utf
encoding while the encoding of a CSS document is defined through the
http header.

Also the URLs may include "&" characters in a CSS document.

IMHO, the easiest way to use CSS within XSLT generated (X)HTML documents
is to use external CSS stylesheets by adding a

   <link href="foo.css" rel="stylesheet" type="text/css"/>

It's assuming that your stylesheet is available through a http server
though and it's not as convenient if you want to generate its content.



See you at XML 2000
Eric van der Vlist       Dyomedea              

 XSL-List info and archive:

Current Thread