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

Michael Kay wrote:

>>Then perhaps the XSLT spec can describe things in terms of namespace 
>>nodes - these are equivalent descriptions, and the XSLT spec could 
>>describe how to map between them.
>>    
>>
>
>It's very easy to have a language that doesn't make use of some of the
>information content in the data model, such as the identity and
>parentage of namespace nodes. It's much harder, and less desirable, for
>a language to supplement the data model with additional information.
>  
>
But it's also undesirable for a language to represent abstract 
declarations, such as namespace declarations, with concrete nodes that 
have identity and must be serializable, although they have no direct 
representation in an XML document. XSLT could achieve the nice 
properties you desire by making the same change XQuery wants to make, 
defining the scope of namespaces without using namespace nodes - but 
there are, of course, backwards compatibility issues.

I don't think XQuery should be burdened by these backwards compatibility 
issues.

>And don't forget that XPath supports the namespace axis too.
>  
>
Yes, but it is deprecated. I suppose a compromise position would be to 
define the namespace axis in terms of the namespaces that are in scope - 
let it create "namespace nodes" to represent the namespaces that are in 
scope. This kind of crud is less objectionable in the description of a 
deprecated feature.

>And I strongly suspect that when XQuery users discover the need to
>create namespaces that aren't known statically (as they will), then
>XQuery will want this capability too.
>  
>
Possibly, but I doubt very much that XQuery would do this by explicitly 
creating namespace nodes - it is much more likely that we would remove 
the restriction that the URI for a namespace declaration attribute must 
be a constant.

Jonathan

Received on Thursday, 12 February 2004 14:57:32 UTC