[Bug 4463] [XQuery] Missing rules for misuse of the xmlns namespace

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4463





------- Comment #2 from chamberl@almaden.ibm.com  2007-07-31 19:09 -------
Michael,
On June 27, 2007, the Query working group agreed in principle with your
suggested changes and asked me to prepare a draft of the revised text.
This draft is attached below (in six parts). Will you please let me know
whether you find the draft changes to be acceptable?
Thanks,
--Don Chamberlin (for the Query working group)

(a) In Section 3.7.3.1, Computed Element Constructors:
Add the following new paragraph, just following the reference to
[err:XQDY0074]:
It is a dynamic error [err:XQDY0044] if the node-name of the constructed 
element node has the namespace URI http://www.w3.org/2000/xmlns/, 
or has the namespace prefix xmlns.

(b) In Section 3.7.3.2, Computed Attribute Constructors:
Old Text:
The node-name property of the constructed attribute (an expanded QName)
is checked as follows: If its URI part is http://www.w3.org/2000/xmlns/
(corresponding to namespace prefix xmlns) or if it is in no namespace and
its local name is xmlns, a dynamic error [err:XQDY0044] is raised.
Replacement Text:
It is a dynamic error [err:XQDY0044] if the node-name of the constructed 
attribute node has the namespace URI http://www.w3.org/2000/xmlns/, 
or has the namespace prefix xmlns, or has no namespace prefix and has the 
local name xmlns.

(c) In Section 4.12, Namespace Declaration:
At the end of the paragraph that begins with "The namespace prefix" and
ends with [err:XQST0033], add the following sentence:
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].

(d) In Section 4.12, Namespace Declaration:
In the paragraph that begins with "XQuery has several predeclared namespace
prefixes", change the parenthesized text as follows:
Old text:
(however, the prefix xml may not be redeclared, and no other prefix may
be bound to the namespace URI associated with the prefix xml [err:XQST0070]).
Replacement text:
(however, the binding of the prefix xml may not be overridden [err:XQST0070]).

(e) Change to text of error code XQDY0044:
Old text:
It is a dynamic error if the node-name property of the node constructed by
a computed attribute constructor is in the namespace
http://www.w3.org/2000/xmlns/
(corresponding to the namespace prefix xmlns), or is in no namespace and has
local name xmlns.
Replacement text:
It is a dynamic error if the node-name of the node constructed by a
computed element or attribute constructor has the namespace URI 
http://www.w3.org/2000/xmlns/ or has the namespace prefix xmlns.
It is also a dynamic error if the node-name of the node constructed by a
computed attribute constructor has no namespace prefix and has the local name
xmlns.

(f) Change to text of error code XQST0070:
Old text:
A static error is raised if a namespace URI is bound to the predefined prefix
xmlns, or if a namespace URI other than http://www.w3.org/XML/1998/namespace
is bound to the prefix xml, or if the prefix xml is bound to a namespace URI
other than http://www.w3.org/XML/1998/namespace.
Replacement text:
It is a static error if the namespace prefix specified in a namespace
declaration is xml or xmlns, or if the namespace URI specified in a
namespace declaration is http://www.w3.org/XML/1998/namespace or
http://www.w3.org/2000/xmlns/.

Received on Tuesday, 31 July 2007 19:10:01 UTC