w3c / qt3tests

Tests for XPath and XQuery
27 stars 17 forks source link

Node constructors, EQNames (cont.). w3c/qtspecs#9 #25

Closed ChristianGruen closed 4 years ago

ChristianGruen commented 4 years ago

Additional tests, based on the assumption that entities in the URI string are not unescaped dynamically (see https://github.com/w3c/qtspecs/issues/9#issuecomment-667898198).

michaelhkay commented 4 years ago

Regarding Constr-compattr-eqname-entities-1, it uses the EQName Q{ }x and assumes that this delivers a QName with namespace-uri() = " " (a single space). I'm not convinced this is correct. The spec says "The namespace URI value in a URIQualifiedName is whitespace normalized according to the rules for the xs:anyURI type in Section 3.2.17 anyURI "; it doesn't say that writing the whitespace as a character references suppresses this. Although the value space for xs:anyURI technically allows a single space, no normal method of generating an xs:anyURI value will deliver such a value; the space will always get stripped in the process of conversion from a string. Saxon, in fact, is generating a node whose namespace URI is stored as " " (a space), but this is converted to an empty string by the string-to-URI conversion performed by the namespace-uri() function. That's thoroughly unsatisfactory. I think the correct action here is for the EQName Q{ }x to represent a QName with URI="".

ChristianGruen commented 4 years ago

You are obviously right; and I see you’ve already fixed both the attribute and element test (thanks).