W3C home > Mailing lists > Public > xsl-editors@w3.org > April to June 2005

RE: Request for XSLT 1.0 erratum on stylesheet processing model

From: Michael Kay <mhk@mhk.me.uk>
Date: Fri, 27 May 2005 17:26:26 +0100
To: <david_marston@us.ibm.com>, <xsl-editors@w3.org>
Message-ID: <E1DbhfQ-00040m-CT@maggie.w3.org>
I personally think that the two sentences, taken together, can only be read
one way:
 
 Processing instructions and comments in the stylesheet are ignored: the
stylesheet is treated as if neither processing instruction nodes nor comment
nodes were included in the tree.
 
After the tree for a source document or stylesheet document has been
constructed, but before it is otherwise processed by XSLT, some text nodes
are stripped.
 
I also think there's not much to be gained by issuing this kind of
clarification 5 years after publishing a spec. I don't think vendors are
suddenly going to fix their implementations, and even if they do so, users
won't suddenly install the new version. At this stage of the game, vendors
are likely to decide that incompatibility with their own previous releases
is going to cause more trouble than incompatibility with other vendors.
Given the much bigger interoperability problems that arise from differences
in handling of whitespace in source documents, it's not even clear that it's
worth fixing.
 
Michael Kay (personal response).
 
 


  _____  

From: xsl-editors-request@w3.org [mailto:xsl-editors-request@w3.org] On
Behalf Of david_marston@us.ibm.com
Sent: 27 May 2005 17:12
To: xsl-editors@w3.org
Subject: Request for XSLT 1.0 erratum on stylesheet processing model



In the XSLT 1.0 Recommendation, Chapter 3 ("Data Model") begins by saying: 
" Processing instructions and comments in the stylesheet are ignored: the
stylesheet is treated as if neither processing instruction nodes nor comment
nodes were included in the tree that represents the stylesheet." 
and further down in 3.4 it says 
"After the tree for a source document or stylesheet document has been
constructed, but before it is otherwise processed by XSLT, some text nodes
are stripped...." 
This does not explicitly state the sequence between comment/PI stripping and
whitespace-text-node stripping in the stylesheet. The test case is: 
<xsl:template match="x"> 
    <lre>text<!-- boo -->     </lre> 
</xsl:template> 
and I think your intent, as is very clear for 2.0, is that this template
should construct 
<lre>text     </lre> 
rather than 
<lre>text</lre> 
but "ignoring" the comment node could be construed as the same operation as
"stripping" a node. I have recently become aware of a well-known XSLT
processor that treats the two stripping/ignoring operations as occurring at
the same time and produces the second result shown above. 

Please issue an erratum that will make the 1.0 spec as explicit as drafts of
the 2.0 spec have been. 
.................David Marston, IBM Research 
Received on Friday, 27 May 2005 16:26:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:58 GMT