|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XPath 1.0 issue
'(' and ')' appear as separate terminals in the grammar, therefore a space
is allowed between them. (They are listed separately in this production
rule, and also in the list of ExprToken symbols in rule [28].) If the
grammar had been written as '()' (compare production [5] which uses '::',
and production [12] which uses '..') then no space would be permitted.
It's the fact that VariableReference ('$' QName) is an ExprToken that
ensures no space is allowed after the '$'. The rule is "Whitespace may be
freely added before or after any ExprToken", and by implication, not within
an ExprToken; the definition of ExprToken is in the following section.
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Jack Matheson [mailto:jack@xxxxxxxxxxxxxx]
> Sent: 15 February 2005 13:55
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: XPath 1.0 issue
>
> Xalan and Saxon both allow an arbitrary number of space characters
> between the parenthesis in a node test, and I was
> wondering if this is technically legal in XPath 1.0.
>
> An example would be:
> <xsl:apply-templates select="node( )"/>
>
> The XPath TR specifically states that whitespace can exist between
> tokens, but I'm not exactly sure how "token" is defined after reading
> the recent thread concerning "$ varname".
>
> A node test in the XPath TR is defined as:
>
> [7] NodeTest ::= NameTest
> | NodeType '(' ')'
> | 'processing-instruction' '('
> Literal ')'
>
> Can anyone explain this to me?
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








