Re: cloneNode...

ANOQ,

Congratz on your C++ DOM implementation.

>I was wondering about the cloneNode method in the 980818 spec.
>As I read it, it says that it clones all attributes of an
>ElementNode, and all children of all nodes if it's a deep
>clone. However it also says that any other nodes except
>Element does only create a copy of the Node type without
>any data.

Actually the sentence reads:

"Cloning any other type of node simply returns a copy of this node. "

There is nothing about "without any data."

>Does this mean that for instance the subclasses of
>CharacterData nodes does not get their text-contents
>cloned? And how about tagName in Element and similar
>data?

When Comment, CDATASection, and Text nodes are cloned, their text contents
are also copied for both deep and shallow cloneNode.  Element.tagName is
also cloned.

I hope this helps,

Don Park
Docuverse

Received on Saturday, 29 August 1998 20:52:27 UTC