-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[xq31] computed element and attribute constructors: can the name expression return "Q{uri}local"? #9
Comments
The fact that the text goes on to say "If the string value contains no namespace prefix, it is treated as a local name in the default element/type namespace. " strongly suggests that the WG simply overlooked this possibility. Nevertheless, it was clearly the WG's intent to allow uri-qualified names to be used in all contexts that lexical QNames are allowed, except where conformance to XML syntax dictates otherwise. For direct element constructors, the grammar clearly allows a name in the form Q{uri}local, but again, the rules do not say exactly how this should be interpreted. The text in §3.9.1 starting "If the element name in a direct element constructor has a namespace prefix,..." clearly overlooks the fact that the grammar has been extended. I think we have to generate a no-prefix name, which will result in a default namespace declaration. |
Also worth noting: in XSLT, |
Some thoughts on this:
|
Interpreting entities at run-time would be unprecedented and seems a really bad idea. XQuery only recognises entity references in literals because it's trying to mimic XML syntax as closely as possible. As regards XSLT, I now think that disallowing a braced URILiteral in I think it's probably the case that the only current usage of a dynamic BracedURILiteral in XQuery is in the 3rd argument of format-number, where it's defined by reference to the XPath (not XQuery) rules. These rules do invoke whitespace normalization (though XSD says that whitespace in URIs is "highly discouraged" and we have syntax in which it simply won't work, eg. xsi:schemaLocation). Perhaps, given that the rules aren't obvious, it's a mistake to interpret them as being allowed; but then, in the static case the syntax clearly allows them but the semantics are under-specified, so we have to consider that case too... |
Node constructors, EQNames (cont.). w3c/qtspecs#9
Node constructors, EQNames (cont.). w3c/qtspecs#9
In the specification for
element {expr} {content}
andattribute {expr} {content}
, it is stated that "If the atomized value of the name expression is of type xs:string or xs:untypedAtomic, that value is converted to an expanded QName." But it is not stated how that conversion is done. In particular, it is not stated whether it is acceptable for the expression to evaluate to a string in the format "Q{uri}local". It is clear that names in this format can be supplied statically, but it is unclear whether they can be supplied dynamically.The text was updated successfully, but these errors were encountered: