This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27736 - K2-ComputeConAttr-37
Summary: K2-ComputeConAttr-37
Status: RESOLVED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-03 17:56 UTC by Benito van der Zander
Modified: 2015-04-14 22:24 UTC (History)
1 user (show)

See Also:


Attachments

Description Benito van der Zander 2015-01-03 17:56:47 UTC
The K2-ComputeConAttr-37 (attribute xmlns:localName {"content"}) assumes that no namespace is bound to the prefix xmlns.

But the default namespaces are implementation defined, so there might be a namespace, and the test should also accept the error XQDY0044
Comment 1 Michael Kay 2015-01-03 18:29:03 UTC
I don't follow your reasoning. No attribute node can ever have the prefix "xmlns", because that's reserved for namespace declarations. Indeed, no namespace can ever be bound to the prefix "xmlns".
Comment 2 Benito van der Zander 2015-01-03 18:40:46 UTC
I have "http://www.w3.org/2000/xmlns/" always bound to xmlns.



That is what this url is for, isn't it?
Comment 3 Michael Kay 2015-01-03 20:01:50 UTC
No, that's not how it works.

Data model,6.1: "A Namespace Node must not have the name xmlns nor the string-value http://www.w3.org/2000/xmlns/".

XQUery 4.13: The namespace prefix specified in a namespace declaration must not be xml or xmlns [err:XQST0070]. The namespace URI specified in a namespace declaration must not be http://www.w3.org/XML/1998/namespace or http://www.w3.org/2000/xmlns/ [err:XQST0070].

And closer to home for this test, XQuery 3.9.3.2: A dynamic error is raised [err:XQDY0044] if the node-name of the constructed attribute node has any of the following properties:

Its namespace prefix is xmlns....
Its namespace URI is http://www.w3.org/2000/xmlns/.

In XDM, the prefix "xmlns" and the URI "http://www.w3.org/2000/xmlns/" are both reserved, but they are not bound to each other in a namespace binding.
Comment 4 Benito van der Zander 2015-01-03 20:46:41 UTC

>Data model,6.1: "A Namespace Node must not have the name xmlns nor the
string-value http://www.w3.org/2000/xmlns/".

Well, it is not a node

>XQUery 4.13: The namespace prefix specified in a namespace declaration must not
be xml or xmlns [err:XQST0070]. The namespace URI specified in a namespace
declaration must not be http://www.w3.org/XML/1998/namespace or
http://www.w3.org/2000/xmlns/ [err:XQST0070].

And not a declaration

Just a hardcoded entry in the namespace resolver

>And closer to home for this test, XQuery 3.9.3.2: A dynamic error is raised
[err:XQDY0044] if the node-name of the constructed attribute node has any of
the following properties:


That is why I think the test should accept XQDY0044
Comment 5 Michael Kay 2015-02-10 12:11:24 UTC
Considered today by the WG.

We noted in 2.2.5, penultimate bullet: "In the statically known namespaces, the prefix xml must not be bound to any namespace URI other than http://www.w3.org/XML/1998/namespace, and no prefix other than xml may be bound to this namespace URI. The prefix xmlns must not be bound to any namespace URI, and no prefix may be bound to the namespace URI http://www.w3.org/2000/xmlns/."

Technically this means that if your product has a static context in which the prefix xmlns is bound to a namespace, then the results of all queries are undefined by the spec. This would make the test suite rather useless. Therefore, we have to assume for the purposes of the test suite that the static context satisfies the consistency constraints, and in this case raising XQST0081 is the correct outcome.

We are therefore closing the bug as invalid.
Comment 6 Benito van der Zander 2015-02-10 13:23:12 UTC
>We noted in 2.2.5, penultimate bullet

Well, that would clear it up, BUT that was added in XQuery 3. In XQuery 1 xmlns is not mentioned there.

And the test does not have an XQuery 3 dependency
Comment 7 Michael Kay 2015-04-14 22:24:12 UTC
The WG decided today that it was not prepared to spend WG time maintaining or adjudicating XQuery 1.0 tests. The tests are there as a resource for people who want to use them, and members of the WG may debate them and improve them if they wish, but it is not an activity that the WG as a group will track.

I'm herefore going to close this as WON'T FIX.

Personal observation on this particular test: XQuery 1.0 is underspecified in this area; this was remedied in XQuery 3.0. The WG clearly indicated in XQ 3.0 how it felt this situation ought to be handled; for anyone still developing or testing an XQ 1.0 processor you can take this as evidence of the WG's intent, but ultimately if the published XQ 1.0 spec doesn't tell you the answer, it's up to you what you do.