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 4975 - Incorrect expected result for Constr-namespace-13
Summary: Incorrect expected result for Constr-namespace-13
Status: CLOSED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0.2
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-21 22:57 UTC by John Snelson
Modified: 2007-09-17 11:50 UTC (History)
0 users

See Also:


Attachments

Description John Snelson 2007-08-21 22:57:20 UTC
The query is:

<foo:elem xmlns:foo="http://www.example.com/parent"><child xmlns:foo=""/></foo:elem>

and the expected result is either err:XQST0085 or:

<foo:elem xmlns:foo="http://www.example.com/parent"><child/></foo:elem>

As far as I can see, the "child" element ought to have the xmlns:foo="" attribute on it.
Comment 1 Andrew Eisenberg 2007-09-11 19:56:17 UTC
I believe that the expected result for this test case is correct.

XQuery 1.0 says, in section 3.7.1.2, Namespace Declaration Attributes, that:

"If the namespace URI is a zero-length string and the implementation supports
[XML Names 1.1], any existing namespace binding for the given prefix is
removed from the in-scope namespaces of the constructed element and from the
statically known namespaces of the constructor expression."

and

"A namespace declaration attribute does not cause an attribute node to be created."


So I believe that the "child" element does not have an in-scope namespace binding for "foo".


Serialization, in section 5.1.7, XML Output Method: the undeclare-prefixes Parameter, says:

"The Data Model allows an element node that binds a non-empty prefix to have
a child element node that does not bind that same prefix. In Namespaces in
XML 1.1 ([XML Names 1.1]), this can be represented accurately by undeclaring
prefixes. For the undeclaring prefix of the child element node, if the
undeclare-prefixes parameter has the value yes, the output method is XML or
XHTML, and the version parameter value is greater than 1.0, the serializer
MUST undeclare its namespace. If the undeclare-prefixes parameter has the
value no and the output method is XML or XHTML, then the undeclaration of
prefixes MUST NOT occur."


Finally, XQuery 1.0, in section C.3, Serialization Parameters, says that the value for undeclare-prefixes is "no".


Please close this bug report if you agree with this resolution.


Comment 2 John Snelson 2007-09-17 11:49:41 UTC
I agree with this resolution, but note that XQuery serialization is an optional component which the products I am testing do not currently implement.