[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPath 1.0 issue

Subject: Re: XPath 1.0 issue
From: Jack Matheson <jack@xxxxxxxxxxxxxx>
Date: Tue, 15 Feb 2005 15:32:42 -0600
jack matheson
Thanks again!

'(' 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?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.