namespace nodes

The new section 3.7.4 "Namespace Nodes on Constructed Elements"
raises a few (mainly editorial):

   Implementations may in many cases be able to choose a namespace
   prefix that is familiar to the user, such as a prefix that is
   associated with the corresponding namespace URI in either the
   source document or the query.

The term "the source document" is not defined and does not seem
applicable to XQuery.

Also, presumably there would be namespace nodes in a document
constructed from fn:doc or other sources (though that isn't
stated), and they would normally be "active".  So this would
be referring to to "non-active" (i.e. non-enclosing) namespace
declarations, which you probably wouldn't want to use anyway.

But my main concern is that this is very "operational", and 
overspecifies the implementation.  Worse, it specifies a needlessly 
inefficient implementation, since you cannot observe the "namespace 
nodes attached to an element" anyway.  This may mislead some users and 
naive implementors.  The terminology also conflicts with the "Functions 
and Operators" definitions of fn:get-namespace-uri-for-prefix and 
fn:get-in-scope-namespaces which does not talk about "namespace nodes" 
but uses the term "in-scope namespaces".

I'm not sure what the best solution is, but one approach may be to 
re-cast 3.7.4 to define "in-scope namespaces of an element" rather than 
"namespace nodes attached to an element".
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

Received on Monday, 25 August 2003 21:44:31 UTC