You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Fr...@eFunds.com on 2001/08/30 12:46:36 UTC
DocumentFragment (bug?)
Does anyone have a rational explanation why when I replace a node's child
with a DocumentFragment, the later is emptied, or is it a bug?
For example if I have :
<a>
<b>
<b1/>
<b2/>
<b3/>
</b>
<c>
<c1/>
</c>
</a>
and I create a document fragment that contains b1 and b2, and then call
c.replaceChild( docFrag, c1), I get
<a>
<b>
<b2/>
</b>
<c>
<b1/>
<b3/>
</c>
</a>
which is correct. But I would expect the document fragment to still contain
b1 and b2, which it doesn't with Xerces 1.4.3.
Reading the DOM level 2 doc, I can't see a reasonable explanation either,
also it says "various operation --such as inserting nodes as children of
another node-- result in all the node of the docfrag being MOVED to the
child list of the node". But I would understand that as being moved from
<b> to <c>. After all, if I remove the children of a DocumentFragment, they
are not removed from their owner node are they?
Thanks for any answer.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org