RE: namespace node implementation

> > The tricky thing is that when you come to serialize, the XML 1.0
> > serialization is
> >
> > <c xmlns:ns2="NS2"><b xmlns:ns1="NS1" ns1:x="X"/></c>
> >
> > but the more accurate XML 1.1 serialization is:
> >
> > <c xmlns:ns2="NS2"><b xmlns:ns2="" xmlns:ns1="NS1" ns1:x="X"/></c>
> 
> ? which of the 1.1 documents implies this? is there something other 
> than the december namespaces cr or the recent xml cr, or is this 
> somehow expressed in c14n?

It's not implied by the namespaces specifications, it's implied by the XPath
serialization spec, which places the requirement on serialization that it
should "round trip": that is, it should generate the textual XML which, when
reparsed, will give you back the data model you started with. The data model
allows a namespace to be in scope for a parent element without being in
scope for its child element; this cannot round-trip through a 1.0
serialization, but it can round-trip through a 1.1 serialization.

Michael Kay

Received on Thursday, 23 October 2003 18:57:10 UTC