Rutger, Did you have a look at the email I sent you on this topic ?
Gert > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Rutger M. Dijkstra > Sent: zaterdag 28 mei 2005 10:25 > To: nant-developers@lists.sourceforge.net > Subject: [nant-dev] RFC: Xml Namespace handling > > I'm currently fixing nant's handling of namespaces and > stumbled accros a mysterious piece of code. Could someone > confirm or deny that the following is a redundant relic of > some (failed) experiment in the past: > > nant/src/NAnt.Core/Project.cs, lines 1214-1227 [CtorHelper] > > if > (StringUtils.IsNullOrEmpty(doc.DocumentElement.NamespaceURI)) { > string defURI; > > if (doc.DocumentElement.Attributes["xmlns", "nant"] == > null) { > defURI = @"http://none"; > } else { > defURI = doc.DocumentElement.Attributes["xmlns", > "nant"].Value; > } > > XmlAttribute attr = doc.CreateAttribute("xmlns"); > > attr.Value = defURI; > doc.DocumentElement.Attributes.Append(attr); > } > > Adding an "xmlns" attribute to a document that has already > loaded does not change the namespace of any of the nodes. > Moreover, the > only > way I can get the condition of the inner conditional to be > true is with > something like: <project xmlns:nantns="nant" > nantns:xmlns="whatever">... > which serves no purpose that I can see. > > Dropping the code does not break any of the unit-test, so whatever > it achieves is not covered. > > cheers, rutger > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > nant-developers mailing list > nant-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nant-developers > ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers