Subject: RE: XPath Grammar
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sat, 7 Jun 2003 17:13:32 +0100
|
> I need help about XPath grammar.
> In W3C specification a literal is stated as the
> following:
>
> [29] Literal ::= '"' [^"]* '"'
> | "'" [^']* "'"
>
XPath uses the strange convention of mixing BNF and regular expressions
in a single production rule.
A more conventional approach would be either to write this in BNF (using
the "-" operator to mean "except") as
> [29] Literal ::= '"' (Char - '"')* '"'
> | "'" (Char - "'")* "'"
or to do the whole thing as a regular expression:
Literal ::= ("[^"]*"|'[^']*')
Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|