xsl-list
[Top] [All Lists]

XML to XML via XSLT, and then CSS?

2006-01-13 06:14:10
Hi all,

It's possible to use XSLT to transform an XML document into HTML and
then style the HTML using an external CSS style sheet by way of the
HTML <link> tag, which the XSLT style sheet includes in the result
tree.

This works because browsers treat the <link> tag in a special way.

But what if transformation is not into HTML?

A processing instruction such as 

  <?xml-stylesheet href="css-sheet.css" type="text/css" ?>

is sufficient to display an XML document using an XML enabled browser,
but what if I what to transform the original XML document into a new
XML document (using XSLT) and then have the browser style it using
CSS?

The original XML document needs a new processing instruction:

  <?xml-stylesheet href="xslt-sheet.xsl" type="text/xsl" ?>

and the XSLT style sheet then needs to include a processing
instruction in the result tree that links to the CSS style sheet.

In short my question is this:

How do you pass processing instructions to a result tree, so that I can
point my XML enabled browser at an XML document, have it transformed
into another XML document using XSLT, and then have it styled using
CSS?

sdt


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>