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

[DM] IBM-DM-031: No need for namespace nodes

From: Don Chamberlin <chamberl@almaden.ibm.com>
Date: Wed, 11 Feb 2004 15:24:46 -0800
To: public-qt-comments@w3.org
Message-ID: <OF5CD95DA7.8B241428-ON88256E37.00803A8C-88256E37.00809D47@us.ibm.com>
(IBM-DM-031) The Data Model document lists namespace nodes as one of the 
seven kinds of node. But a node is needed only to preserve identity and to 
represent a position on an axis. The identity of a namespace node is never 
used, and the namespace axis is deprecated in XPath 2.0 and not supported 
in XQuery. Neither XPath nor XQuery provides a way to construct a 
namespace node independently of an element node. Therefore there is no 
reason to retain the concept of a namespace node in XPath 2.0. It should 
be replaced by the concept of "in-scope namespaces" as a property of an 
element node. The term "in-scope namespaces" is already widely used (13 
times in the Data Model document and 10 times in the Functions and 
Operators document). We should make "in-scope namespaces" one of the 
properties of an element node, supported by two accessors 
(get-namespace-uri-for-prefix() and get-in-scope-prefixes(), which are 
already documented in Functions and Operators). We should leave it up to 
the implementation how to support these accessors. Various strategies are 
possible, including storing all the in-scope prefixes in each element 
node, or only storing the "new" prefixes that are introduced by each node 
(different from its parent). 

Replacing namespace nodes with the existing concept of "in-scope 
namespaces" will shorten and simplify the Data Model document, removing 
various accessors on namespace nodes which XQuery does not provide any way 
to invoke. Implementations that choose to support the (deprecated) 
namespace axis can synthesize "namespace nodes" from the "in-scope 
namespaces" property of an element node. Implementations that do not 
support this deprecated axis need not be aware of namespace nodes at all. 
All references to "namespace nodes" in XPath and XQuery-related documents 
(such as the Serialization document) can be rephrased in terms of the more 
abstract concept of "in-scope namespaces" for an element; this provides 
greater implementation flexibility and in many cases simplifies the 
documents.

--Don Chamberlin
Received on Wednesday, 11 February 2004 18:25:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:13:57 UTC