John Ky wrote:
> 
> This was what I had thought ...
> 
> ... until, I was told that by mozilla developers that within
> the one implementation, cloneNode() can be used to
> copy nodes between documents.  I was told to use
> cloneNode() because mozilla has no plans to implement
> importNode(). 

If this is really the case, then the Mozilla developers need to get
their act together. They can't claim to be standard based and pick and
choose what they want in them.

> Is their use of cloneNode() per spec?

Yes, to clone a node to be used within the same document. To clone a
node within another document one has to use importNode().

Now, to get back to the original question, I have implemented in
xerces-j a method called "adoptNode" which I've also submitted to W3C
for consideration in DOM Level 3. Unlike importNode() it allows you to
actually *move* nodes from one document to another. The implementation
is quite primitive and needs to be revisited, now that I've got a
specification written down, but I'm interested in feedback on this!
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

Reply via email to