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

RE: several messages

From: Jeffrey Yasskin <jyasskin@appcomp.com>
Date: Wed, 27 Jun 2001 08:41:16 -0500
Message-ID: <D47B6648C7A49C4183AAF655AC976FCE031DB6@server1.appcomp.com>
To: "'Manos Batsis'" <m.batsis@bsnet.gr>, Ian Hickson <ian@hixie.ch>
Cc: www-style@w3.org
> -----Original Message-----
> From: Manos Batsis [mailto:m.batsis@bsnet.gr]
> 
> > -----Original Message-----
> > From: Ian Hickson [mailto:ian@hixie.ch]
> 
> > Finally, imagine that in the context of the following document:
> > 
> >    <baz/>
> > 
> > ...the following script is executed:
> > 
> >    document.insertBefore(
> >       document.createProcessingInstruction('xml-stylesheet', 
> > 'href="a"'),
> >       document.documentElement);
> > 
> > ...if "a" is sent back as "text/xsl". What happens to the DOM? What
> > happens to the document as far as the user is concerned?
> 
> I believe that the XSL transformation should immediately take place
> changing the DOM according to the result tree. I see no 
> problem here, am
> I missing something?
> 
The problem here and in the case of an alternate transforming stylesheet is:
what if the user wants to go back to the original page? 
In the case of DOM scripting, I think it's the author's problem if the page
is harder to use because of scripting. I believe that this type of
page-destruction is already possible with document.write(), and it is the
author's, not the W3C's, responsibility to ensure ease of use.
In the case of alternate stylesheets: This is more complicated. The user
ought to have a way to get back to the original stylesheet. Use Case: A page
author includes two different XSLT stylesheets in one XML page to allow her
users to pick between two alternative layouts.
Now for the complication: Each of these stylesheets could LINK (in the
result HTML) several alternative CSS stylesheets. Submenus in the UI's
stylesheet picking mechanism should take care of that.
View|Stylesheet
XSLT 1
	CSS 1
	CSS 2
	CSS 3
XSLT 2
	CSS 1
	CSS 2
	CSS 3
If the UI doesn't want to run both XSLTs initially, only the current one
might have the submenu of CSS choices.
Now, what if a transform includes a PI that links to another XSLT page? I
would say that the result of a transform should be run until there are no
more transforms left. Infinite loops could be a problem, but they've been
handled before.

On Ian's first two points:
> first, multiple stylesheets when one is in a language
> that does not cope with multiple stylesheets, second, multiple stylesheets
> in different languages [1]

I think the general rule ought to be, apply them in document order. Any
transforming language would re-do the DOM, so any stylesheets after it would
be lost. Most likely, a language that does not cope with multiple
stylesheets would just completely override any stylesheets before it in the
document. Aside from that, it's probably up to the individual languages to
define a behavior.

> On Tue, 26 Jun 2001, Jeffrey Yasskin wrote:
> >
> > By the way, the type attribute of the xml-stylesheet PI is required. See
> > http://www.w3.org/TR/xml-stylesheet/.
> 
> No, it is not. See:
>    http://www.w3.org/1999/06/REC-xml-stylesheet-19990629/errata

Oops. The current practice of never changing the Recommendation's document
makes it really hard to find Errata (which do change the Recommendation's
content). I agree with Chris on this one.

Jeffrey Yasskin
Received on Wednesday, 27 June 2001 09:41:34 GMT

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