RE: namespace node implementation

> 
> > let $a := <a xmlns:ns1="NS1"><b ns1:x="X"/></a>
> > let $c := <c xmlsns:ns2="NS2">{$a/b}</c>
> > 
> > what is the result of get-in-scope-namespaces($c/b)?  It could be:
> > [("ns2") or ("ns1") or: ]
> > ("ns1", "ns2"):  Works but requires merging or copying, which is
> > difficult to do efficiently.  (It could be a high-frequency 
> operation.)
> 
> Actually, I guess it wouldn't be difficult to return ("ns1", 
> "ns2") by 
> just adding the prefixes found in the ancestors of the copied 
> <b> node.
> 

It wouldn't be difficult (it's what Saxon does today), but it wouldn't be
correct.

Michael Kay

Received on Thursday, 23 October 2003 09:24:31 UTC