RE: XML Infoset Comment Resolution: issue-query-*

> Comment: I do not see the problem when performing cut-and-paste of
> elements. Every element has it's own namespace associated to itself.

Right, but the in-scope namespaces are needed for resolving prefixes
within content or attributes.  If you copy the element y from

  <x xmlns:foo="http:/foo"><y>foo:bar</y></x>

then it should continue to have the foo prefix in scope
so that if the content (foo:bar) is interpreted as a QName, it is
interpreted correctly.

> On the contrary, I believe
> that having all in-scope namespaces associated with an element
> information item will make XInclude or an update language much harder
> to implement, since now all in-scope namespaces have to be recomputed
> for the infoset.

The intention is the in-scope namespaces never have to be recomputed.
They are just copied with the element.  Namespace *attributes* may
have to be recomputed to make them consistent with the in-scope
namespaces if the infoset is re-serialized, but only if it is
re-serialized.

<a:A xmlns:a="uri1" xmlns:b="uri2">
   <b:B>
      <c:C xmlns:c="uri3"/>
   </b:B>
</a:A>

<a:D xmlns:a="uri4">
  <e:E xmlns:e="uri5"/>
</a:D>

> With the current infoset, the inscope namespaces of b:B and c:C
> in the old document are (uri1, uri2) and (uri1, uri2, uri3)
> respectively. For a:D and e:E they are
> (uri4) and (uri4, uri5) respectively.

Right.

> After the move they are:

> b:B: (uri4, uri2)
> c:C: (uri4, uri2, uri3)
> a:D: (uri4)
> e:E: (uri4, uri2, uri3, uri5)

According to the current infoset, they are the same as they were before.

Why do you want them to be different after the move?  Surely they
should be the same!  It is unfortunately impossible to serialize the
document so that this remains completely true - there is no way to
unbind prefixes - but surely it is essential that, for example, b:B
continues to have prefix a in scope in case it contains a QName using
that prefix.

-- Richard

Received on Monday, 26 March 2001 11:19:50 UTC