[Bug 29273] Adaptive Serialization: serialization of strings, result of fn:string

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29273

--- Comment #2 from Christian Gruen <christian.gruen@gmail.com> ---
> I don't agree. XQuery doesn't require ampersands to be escaped in a string
> literal, and XPath doesn't even allow it. We shouldn't encourage users to
> think of using XML escaping outside XML text and attribute nodes.

I didn’t reflect about XPath; but the XQuery grammar for string literals is as
follows:

[222] StringLiteral ::= ('"' (PredefinedEntityRef | CharRef | EscapeQuot |
[^"&])* '"') | ("'" (PredefinedEntityRef | CharRef | EscapeApos | [^'&])* "'")

So I was assuming that ampersands would always need to be escaped? And
otherwise, "&amp;" would be ambiguous, as long as the ampersand character *may*
be escaped?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 9 November 2015 17:02:27 UTC