RE: Preserving base URI

> > The problem I have is that I simply don't know what should happen to
> > document nodes if you remove the xml:base attribute. 
> Suppose I remove
> > chap/@xml:base in the following example:
> >
> > <doc xml:base="http://foo.com">
> >   <chap xml:base="http://bar.com">
> >     <p>...</p>
> >   </chap>
> > </doc>
> >
> > If the 'base URI' property of the node is to be preserved, 
> the base URIs
> > of both the 'chap' and 'p' elements will remain 
> "http://bar.com". Or,
> > should the base URI of 'chap' and 'p' be recalculated so that it is
> > "http://foo.com" after removing chap/@xml:base?
> 
> I think the base URI property should be preserved. The infoset spec
> says that base URIs are calculated according to XML Base. Having been
> calculated, I don't think deleting the xml:base URI implies that they
> are re-calculated.

Hm, so you are saying there is a distinction between changing the value
of @xml:base (base URI gets updated on the infoset level) and removing
@xml:base (base URI does not get updated on the infoset URI)? Sounds
weird to me.

Anyway, if what you say is right, I can at at least be sure that if I
remove chap/@xml:base in the example I gave, and then serialize the
result, I will get:

<doc xml:base="http://foo.com">
  <chap xml:base="http://bar.com">
    <p>...</p>
  </chap>
</doc>

again, right?

Regards,
Vojtech

Received on Wednesday, 17 December 2008 17:43:16 UTC