XPath 1.0: Literal with both ' and "?

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&apos;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

Received on Friday, 16 January 2004 18:18:43 UTC