XPath 1.0: Literal with both ' and "?
"Perry A. Caro" <[email protected]> Fri, 16 Jan 2004 14:29:32 -0800
| Newsgroups | gmane.text.xml.xpath.general |
|---|---|
| Message-ID | <[email protected]> |
Production [29] of the XPath 1.0 spec says:
[29] Literal ::= '"' [^"]* '"'
| "'" [^']* "'"
Given that, how do I form a literal that has both ' and " in it? For
example, I want to search for an attribute whose value is an excerpt from
some dialog:
Tom said, "Why can't I read?"
In XML, this might be represented as:
<excerpt text='Tom said, "Why can't I read?"'/>
How would I form a predicate in XPath 1.0 that would match the value of the
text attribute?
I think this might be a bug in the specification, but I didn't see any
mention of it in the Errata.
Perry A. Caro
Adobe Systems Incorporated