xsl-list
[Top] [All Lists]

Re: XPath Grammar

2003-06-03 12:41:09
Fatih TURKMEN wrote:
I need help about XPath grammar.
In W3C specification a literal is stated as the
following:

[29] Literal ::= '"' [^"]* '"' | "'" [^']* "'"

What does the production mean?
I think it can be translated as the following:
                        "\"" (~["\""])* "\""
| "'" (~["'"] )* "'"
but what [^"]* exactly mean?

In English, it means either a string delimited by two double quotes (") or two 
single quotes (').  In either case, the delimiting quote may not appear within the 
quoted string.

[^"]* means any number of characters not including a double quote.

Note that in XPath 2.0, you may include a double quote inside a double quoted 
string (similarly for single quotes) by having two of the quote characters in 
succession within the string.


--

--------------------------
Jeff Kenton
DataPower Technology, Inc.



XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>