Hi Neil, I thought over your response. You are right, when I look at it with a different perspective, it makes sense.
Thanks for the response. -Vinayak > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 11, 2003 4:35 PM > To: [EMAIL PROTECTED] > Subject: Re: About "Conflicting namespace declaration" > > > Hi Vinayak, > > I think you might be attaching over-much importance to the > serialized form > of the document. > > Nowadays--where everything XML'ish tends to get cast in terms > of the XML > Information Set--I think the DOM spec writers don't think of > the DOM as > conveying information about particular serialized forms, but > rather they > think in terms of modeling an abstract collection of > information--an XML > serialization of which is another alternative. Looked at in > this way, the > original child2 element doesn't inherit anything from its > parent: it has > its own namespace and namespace prefix property which the DOM models. > When you rename the child1 node in this way, abstractly what > you're doing > it changing its namespace infoset property. > > The DOM3 serialization API's are meant to provide as lossless > a bridge as > possible between the DOM rendering of the infoset and its > serialized form. > So it makes all the sense in the world not to change anything > about the > child2 node, while simultaneously avoiding declaring > redundant namespace > prefixes everywhere. > > Hope that makes some sense. :) > > Cheers, > Neil > Neil Graham > XML Parser Development > IBM Toronto Lab > Phone: 905-413-3519, T/L 969-3519 > E-mail: [EMAIL PROTECTED] > > > > > |---------+----------------------------> > | | <[EMAIL PROTECTED]| > | | gcast.com> | > | | | > | | 03/11/2003 03:19 | > | | PM | > | | Please respond to| > | | xerces-c-dev | > | | | > |---------+----------------------------> > > >------------------------------------------------------------- > -------------------------------------------------------------- > ------------------| > | > > | > | To: <[EMAIL PROTECTED]> > > | > | cc: > > | > | Subject: About "Conflicting namespace declaration" > > | > | > > | > | > > | > > >------------------------------------------------------------- > -------------------------------------------------------------- > ------------------| > > > > I have a doubt regarding section B.1.2: in the dom 3 core > spec and how the > new normalization routines will be implemented. > > In the example : > <root> > <ns:child1 xmlns:ns="http://www.example.org/ns1"> > <ns:child2/> > </ns:child1> > </root> > > here child2 intends to use the parent's interpretation of > namespace ns (" > http://www.example.org/ns1"). THEN, > > Using the method Node.renameNode, the namespace URI of the > element child1 > is renamed from "http://www.example.org/ns1" to "http://www.example.org/ns2 ". Here is where the normalization is supposed to happen and the result, as per the standards, is supposed to look like : <root> <ns:child1 xmlns:ns="http://www.example.org/ns2"> <ns:child2 xmlns:ns="http://www.example.org/ns1"/> </ns:child1> </root> I am not debating the standards. But logically, doesnt this look incorrect ? I mean, child2 is not specifying the value for the namespace and intends to use the parent's namespace decl. So, if we rename the parent's namespace ns, child should automatically inherit that same name. Logically, I would expect the normalization routine to change nothing in this scenario and let the output be : <root> <ns:child1 xmlns:ns="http://www.example.org/ns2"> <ns:child2/> </ns:child1> </root> Any comments ? bricks ? -Vinayak --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
