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

RE: Bug in XPath 2.0 spec?

  • From: "Michael Kay" <mike@s...>
  • To: "'Timothy Washington'" <timothyjwashington@y...>,<xml-dev@l...>
  • Date: Sun, 19 Oct 2008 23:09:07 +0100

RE:  Bug in XPath 2.0 spec?
The XPath 2.0 grammar as presented in the specification does require look-ahead to parse unambiguously, and even with lookahead, it requires some extra-grammatical rules to disambiguate certain constructs such as
 
/ union /*
 
or
 
4 treat as item() + - 5
 
Occurrence indicators are one such case, and the rules for resolving the ambiguity are described in A1.2 (Constraint: occurrence-indicators).
 
Michael Kay
http://www.saxonica.com/


From: Timothy Washington [mailto:timothyjwashington@y...]
Sent: 19 October 2008 15:35
To: xml-dev@l...
Subject: Bug in XPath 2.0 spec?

I think there might be a bug in the XPath 2.0 spec. I was trying to implement it in Java (using Sablecc). I get a shift/reduce error on a Multiplicative expression (when it is a treat expression followed by a +). This can conflict with the possibility of an occurence indicator (just a + sign). I fixed a few other similar errors and found I just had to be more precise in my grammar file. But this seems to be an honest ambiguity in language itself.

Is this a conflict in the spec? I've attached my error log and grammar file.

Tim


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.