W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

RE: [XQuery] IBM-XQ-018: Copying namespace nodes

From: Michael Kay <mhk@mhk.me.uk>
Date: Tue, 17 Feb 2004 14:29:50 -0000
To: <public-qt-comments@w3.org>
Message-ID: <000001c3f562$8100a890$6401a8c0@pcukmka>

D>(IBM-XQ-018) Section, Direct Element Constructors--Content:
This section says that element nodes that are copied by an element
constructor retain their namespace nodes. This seems to imply that the
copied nodes do not also inherit namespace nodes from their new parent.
Is this correct? 

MK> Yes, that's my understanding of the current spec. I do have some
anxieties about it, expressed in 

The analysis I did there suggests that we may be depending rather too
heavily on serialization (as XML 1.0) adding the required namespaces
back in, and that when you serialize as XML 1.1, you are going to get a
lot of namespace undeclarations, which will often be a waste of ink. It
also raises the problem that we invoke serialization as part of the
validation process, and we will need to define whether this is 1.0 or
1.1 serialization; and of course it can't be 1.1 serialization until XML
Schema supports XML 1.1. But if we change the rule so that namespaces
are inherited, then we need to think about some other mechanism for
generating a namespace undeclaration.

DC>If so, the copied node may have fewer namespace nodes than its
parent. How can such a node be serialized? Does this introduce a
dependency on "undeclaration" of namespaces, supported only by
Namespaces 1.1? 

MK>The serialization can cope with it, but I think there are wider
problems. The rules are that if you serialize as 1.0, the namespaces
don't get undeclared, which means you don't get perfect round-tripping.

DC>Similarly, in Section 3.7.4, Namespace Nodes on Constructed Elements:
Suppose that the namespace prefix "a" is defined in the Static Context.
Suppose that a constructed parent element has an attribute named "a:b"
but its constructed child element does not use the prefix "a" in any
name. According to the rules in this section, the parent element will
get a namespace node for "a" but the child will not. Again, how can
these elements be serialized? Is this another dependency on Namespaces

MK>I think you're just restating the same problem, or have I

Michael Kay

--Don Chamberlin
Received on Tuesday, 17 February 2004 09:29:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:54 UTC