This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This test needs to be split in two, for XP and XQ. In XP31 we have the grammar [118] BracedURILiteral ::= "Q" "{" [^{}]* "}" /* ws: explicit */ while in XQ31 we have [224] BracedURILiteral ::= "Q" "{" (PredefinedEntityRef | CharRef | [^&{}])* "}" <test-case name="eqname-909"> <description> EQName - braces cannot be escaped by using entity references</description> <created by="Abel Braaksma" on="2016-06-27"/> <dependency type="spec" value="XP30+ XQ30+"/> <test><![CDATA[Q{}http://www.w3.org/2005/xpath-functions/math}pi()]]></test> <result> <error code="XPST0003"/> </result> </test-case>
Test eqname-029 is similarly affected.
I agree.
I'm not convinced that eqname-909 is at all correct. It says "braces cannot be escaped by using entity references". Why not? It appears to be valid according to the XQuery grammar.
(In reply to Tim Mills from comment #3) > It says "braces cannot be escaped by using entity references". I honestly wouldn't know. The entity reference is in XML (the source of the test), gets parsed into "}", and then doesn't fit the production "Q" "{" [^{}]* "}". But I see it is written in a CDATA section. Which counters my suggestion above. It will result in a literal "}", which is indeed *not* illegal, but that may not have been the intent of the test when I wrote it.
Because it's in a CDATA section, the characters & # x 7 D ; appear literally as part of the XPath/XQuery. The XQUery spec isn't 100% explicit about what a CharRef within a BracedURILiteral means, but it's hard to avoid the interpretation that } represents a brace within the namespace URI. Equally, the XPath spec is pretty clear that } within a BracedURILiteral represents the sequence of characters & # x 7 D ; within the namespace URI. The meaning in XPath and XQuery is different, but in both cases it seems to be legal.
I've split eqname-909 into two and corrected each.