Re: VariableReferences in patterns in XSLT 1.0


     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.

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