W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 2002

Re: VariableReferences in patterns in XSLT 1.0

From: <zongaro@ca.ibm.com>
Date: Fri, 25 Oct 2002 12:21:29 -0400 (EDT)
To: xsl-editors@w3.org
Message-ID: <OF2D29A9A9.4064E9BB-ON85256C5C.005361A6@torolab.ibm.com>


     In my previous note, I didn't represent another interpretation of the 
text in XSLT 1.0 that has come up a number of times.  That interpretation 
holds the definition of Pattern in section 5.2 [4] to be in conflict with 
sections 5.3 [1] and 12.2 [2]. 

     Section 5.2 takes great pains to define the grammar for Pattern very 
precisely, and states explicitly that "Predicates in a pattern can use 
arbitrary expressions."  A VariableReference in an XPath expression can 
appear in places other than a predicate, but the grammar defined for 
Pattern eliminates such uses.

     Thus, the text in 5.3 and in 12.2 can be read as having been intended 
as a reaffirmation of the rules in 5.2, rather than an additional 
constraint - except that those rules don't eliminate the use of 
VariablesReferences in predicates, as the quotation above confirms. Hence, 
the view that 5.3 and 12.2 actually conflict with the grammar for Pattern 
in 5.2 and with the quoted sentence.  A new grammar that defines and uses 
a PredicateWithoutVariables non-terminal would be needed to resolve the 
conflict if that was the intention of the Working Group.

[1] http://www.w3.org/TR/xslt#section-Defining-Template-Rules
[2] http://www.w3.org/TR/xslt#key
[3] http://www.w3.org/TR/xslt#number
[4] http://www.w3.org/TR/xslt#patterns
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   Tie Line 969-6044;  Phone (905) 413-6044
Received on Friday, 25 October 2002 12:38:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:44:22 UTC