Re: [xsl] CSS

Subject: Re: [xsl] CSS
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 2 Apr 2002 10:12:09 +0100
Hi Alia,

> How can I use XSLT to add CSS stylesheet to XML documents for view
> in a browser?

It's probably easiest just to link the CSS stylesheet to the XML
document directly using an xml-stylesheet processing instruction in
the XML document:

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="style.css"?>
<doc>
  ...
</doc>

You could use XSLT to add the processing instruction if you wanted,
with an xsl:processing-instruction instruction, but I don't see any
real reason you'd want to do that.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • [xsl] CSS
    • Alia Mikati - Tue, 02 Apr 2002 11:28:05 +0300
      • Jeni Tennison - Tue, 2 Apr 2002 10:12:09 +0100 <=
      • <Possible follow-ups>
      • Alia Mikati - Tue, 02 Apr 2002 11:30:19 +0300
      • Alia Mikati - Tue, 02 Apr 2002 11:30:19 +0300