- From: Jeff Kenton <jkenton@datapower.com>
- Date: Mon, 30 Jun 2003 12:08:04 -0400
- To: scott_boag@us.ibm.com
- CC: "Kay, Michael" <Michael.Kay@softwareag.com>, public-qt-comments@w3.org, public-qt-comments-request@w3.org
I would prefer to have this stated explicitly in the grammar than to have to find it in the lexical state tables. (In fact, I suggested in another thread that the lexical state tables be removed from the document, in order to force the grammar to be complete and consistent by itself.) scott_boag@us.ibm.com wrote: > I have an action item (ACTION-Gaith-6) to clarify this in the documents > for the next pub, though it should be theoretically unambiguous from the > lexical state tables. "/" does not recognize operators (i.e. symbols > recognized in the OPERATOR state) immediately following it. > > -scott > > public-qt-comments-request@w3.org wrote on 06/26/2003 11:49:47 AM: > > >>>A question about path expressions: >>> >>>"/" is a legal expression >>>"/ + 5" also seems to be legal >>> >>>so, >>> >>>"(/) * 5" is probably legal >>>"(/) div 5" likewise >>> >>>what about >>> >>>"/ * 5" or "/ div 5" >>> >>>Do we require spaces? Or parentheses? Or does an xpath parser >>>need to look ahead to distinguish these cases? (My vote is >>>for parentheses). >> >>My understanding is that we require parentheses, but I'm not sure this > > is > >>clearly documented. The examples above are actually all legal in XPath > > 1.0, > >>which has a known bug in that it doesn't describe how to disambiguate > > these > >>cases. Fortunately none of the above examples is likely to appear often > > in > >>real code. In XPath 2.0, though, it becomes more likely: for example "if > > (/ > >>is $n)" needs to be written as "if ((/) is $n)", or perhaps as "if (/. > > is > >>$n)". Or you can always write root(.)! >> >>Michael Kay >> > > -- -------------------------- Jeff Kenton DataPower Technology, Inc.
Received on Monday, 30 June 2003 12:07:57 UTC