W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2003

RE: data model: parent of namespace nodes

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Tue, 13 May 2003 04:36:39 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DCE1E@daemsg02.software-ag.de>
To: Per Bothner <per@bothner.com>, "Kay, Michael" <Michael.Kay@softwareag.com>
Cc: public-qt-comments@w3.org

> Kay, Michael wrote:
> 
> > The intention is that the model is the same as the XPath 1.0 model, 
> > i.e. there is a one-to-many relationship between element nodes and 
> > namespace nodes, this relationship is called "dm:namespaces" in one 
> > direction and "dm:parent" in the other.
> 
> The XPath 1.1 specification (section 5.4) says:  "Elements 
> never share namespace nodes: if one element node is not the 
> same node as another element node, then none of the namespace 
> nodes of the one element node will be the same node as the 
> namespace nodes of another element node."

[I assume by 1.1 you mean 1.0?]
> 
> (This seems awfully wasteful, though I guess implementors can 
> create the namespace nodes on-demand.)

A na´ve implementation certainly is very wasteful. Even implementations that
create the nodes on demand (as I suspect most XPath 1.0 implementations do)
can incur considerable costs. This is why we have deprecated the namespace
axis: this means that an XPath 2.0 implementation never needs to expose
namespace nodes to the application, which in turn means that questions about
their identity and parentage are somewhat academic. Having deprecated the
namespace axis, it made sense to decide that where it is supported, it
should be supported with exactly the XPath 1.0 semantics. 
> 
> The quoted section expressly contradicts the Example in 
> appendix D of the Data Model document, where all the elements 
> have the same set of namespace nodes:
> dm:namespaces(E2)  =  ([N1], [N2], [N3], [N4], [N5])

It looks as if the appendix needs to be fixed.

Michael Kay
Received on Monday, 12 May 2003 22:36:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT