xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph_Kessel...@lotus.com
Subject Re: Potential Xerces regression (bug# 933)
Date Mon, 12 Mar 2001 15:13:04 GMT

>Anyway, someone is poorly mistaken if they think
>that newDocument() should create a magic root node.  I hope this can be
>fixed as soon as possible.

Possibly involved in this issue: The DOM Level 2 createDocument call
creates the root element at the same time, and you really aren't supposed
to be able to change the root element later. (For various reasons related
to allowing DOMs to subclass themselves intelligently based on the kind of
document they're processing.) So in theory, you shouldn't be calling
newDocument until you know what the root element is going to be.

(Yes, this is a nuisance for parsers and other DOMBuilders; they have to
cache comments and PIs and such until the root element has been seen. We're
considering alternative approaches.)

I would suspect that someone was trying to cheat past this by creating a
dummy root element that they never intended to expose to the outside world,
and then creating the "real" root under that...

In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message