W3C home > Mailing lists > Public > www-style@w3.org > April 2001

Re: multiple stylesheets (XSLT and CSS)

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 15 Apr 2001 12:14:59 -0700 (Pacific Daylight Time)
To: fantasai <fantasai@escape.com>
cc: <www-style@w3.org>
Message-ID: <Pine.WNT.4.31.0104151206490.756-100000@HIXIE.netscape.com>
On Sun, 15 Apr 2001, fantasai wrote:
>
> 1.) If both an XSLT stylesheet and a CSS stylesheet are applied
>     to a single document, what happens?
>
> For instance, if I have
>
>   <link rel="stylesheet" type="text/css" href="style.css">
>   <link rel="stylesheet" type="application/xml" href="transform.xsl">

Undefined.

I would personally recommend that the first applicable stylesheet
specified be used, and if that stylesheet is of a type that supports a
cascade mechanism, then all other applicable stylesheets of the same type
be used too.

So in the case above, style.css would be used, and the XSL sheet would be
ignored. (Since they are both persistent stylesheets, neither would appear
in the alternative stylesheet UI, leaving no way for the user to switch to
the XSL version.)


> 2.) If two XSLT stylesheets are both applied to a single
>     document, how do they interact?
>
> For instance, if I have
>   <link rel="stylesheet" type="application/xml" href="index.xsl">
>   <link rel="stylesheet" type="application/xml" href="transform.xsl">

Undefined.

Per my description above, since XSL has no cascade mechanism (AFAIK), the
index.xsl sheet would be used and the transform.xsl sheet would be
dropped. Again, they are both persistent sheets so neither would be
available to the user.


BTW, regarding XSLT and alternate stylesheets: since it is possible for
the output of an XSLT transform to itself include stylesheets, potentially
pointing to yet more XSLT, the alternate stylesheets available at the
lower levels (e.g., the original document) may well end up being not
available to the user depending on the design of the UA.

This, once again, is undefined. :-)

-- 
Ian Hickson                                            )\     _. - ._.)   fL
Invited Expert, CSS Working Group                     /. `- '  (  `--'
The views expressed in this message are strictly      `- , ) -  > ) \
personal and not those of Netscape or Mozilla. ________ (.' \) (.' -' ______
Received on Sunday, 15 April 2001 15:12:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:09 GMT