This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: CSS (via entities)
- To: xsl-list at mulberrytech dot com
- Subject: RE: CSS (via entities)
- From: Chris McGrath <cmcgrath at intuitionpublishing dot com>
- Date: Fri, 01 Dec 2000 09:53:53 +0000
- Reply-To: xsl-list at mulberrytech dot com
If for some reason you don't want to just use the <link> html tag, I would
define a file called css.xml, with the content
<css>
... content of your actual css file here ...
</css>
Then in the xslt file, use the document() function to grab the contents and
insert wherever you need it.
Chris
-----Original Message-----
From: owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Miloslav Nic
Sent: 01 December 2000 08:33
To: xsl-list@mulberrytech.com
Subject: Re: CSS (via entities)
It is a hack for adding non-XML text files into an output.
And of course, you must be lucky, but I have no problems with 80/20
solutions :)
If there is a problem, the parser will give a fatal error and in the
case of CSS the probability of success is very high
But of course, if the reason behind the question was just using a
stylesheet
for HTML formatting usage of link is to be recommended
Eric van der Vlist wrote:
>
> 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
> encoding.
>
> 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.
>
> Eric
>
> [1] http://www.w3.org/TR/REC-CSS1#appendix-c
>
> --
> See you at XML 2000
> http://gca.org/attend/2000_conferences/XML_2000/building.htm#vlist
> ------------------------------------------------------------------------
> Eric van der Vlist Dyomedea http://dyomedea.com
> http://xmlfr.org http://4xt.org http://ducotede.com
> ------------------------------------------------------------------------
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
--
******************************************
<firstName> Miloslav </firstName>
<surname> Nic </surname>
<mail> nicmila@idoox.com </mail>
<support> http://www.zvon.org </support>
<zvonMailingList>
http://www.zvon.org/index.php?nav_id=4
</zvonMailingList>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list