At 12:13 PM 09/19/2000 +0530, Balaji A.K. wrote:
>XML Parser Used : MSXML v2.0
That may be one possible problem. Is there a reason you can't upgrade to
the ver. 3 preview release?
>After appending these nodes usind DOM methods, when we extract the xml from
>the DOM, the newly added/replaced nodes
>n1...nx have a default (and unnecessary) attribute xmlns="" assigned to
>them. That is, the extracted xml looks like
><n1 xmlns=""> value </n1>
><n2 xmlns=""> value </n1>
><nx xmlns=""> value </n1>
I seem to remember reading a report of a problem like this. It had
something to do with a document whose root element included an explicit
namespace declaration for some prefix, e.g.
Note that there's no explicit declaration for the default namespace. In
this case, the parser in question (can't recall if it was MSXML) did
something apparently weird but also understandable in a way: it supplied
default namespace declarations for any element nodes whose names lacked a
prefix. The theory was that if you supplied a namespace declaration for
*any* prefix, you needed one for *all* (including the default "no prefix"
>Solutions tried out so far
>1. We tried setting the attribute value of xmlns (of say node n1) to some
>valid path, but when doing so, it sets the xmlns value of children (of n1)
Try putting a default declaration in the root element rather than on the n1
etc. nodes. Don't worry about the "validity" of the URI, just make it some
URI that's different from any of the other namespace URIs in the doc (and
if there aren't any others, just choose something fairly innocuous). E.g.:
<someroot xmlns="http://www.srasys.co.in/defaultns" >
You might check the archive for the XSL-List mailing list, at:
For that matter, you might consider joining that list, at least
temporarily, if explicitly declaring the default ns in the root element
doesn't help. People on the list have a *lot* of experience with MSXML. And
MSXML's author monitors the list and occasionally chimes in.
Hope that helps.
John E. Simpson | "If you were going to
http://www.flixml.org | shoot a mime, would you use
XML Q&A: http://www.xml.com | a silencer?" (Steven Wright)