W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

Re: Document cleanup suggestions: Node

From: Mike Champion <mcc@arbortext.com>
Date: Wed, 29 Jul 1998 19:42:44 -0400
Message-Id: <98Jul29.193905edt.26886@thicket.arbortext.com>
To: keshlam@us.ibm.com, www-dom@w3.org
At 07:01 PM 7/29/98 -0400, keshlam@us.ibm.com wrote:
>Pls. pardon a few more questions/suggestions from a language lawyer...
>These are all re your description of Node.
>
>Re childNodes: As we've seen, it's very unclear right now whether "live"
>means that the individual nodes referenced by the NodeList are live, or the
>NodeList itself is live and will track the children as they are added and
>removed. 

Both.


>The discussion of previous/next sibling is defined by comparison to "a
>breadth-first traversal of the tree". I think you mean breadth-ONLY
>traversal of the children of this one node. A real breadth-first would mean
>the first child's "prevous" and last child's "next" would point to
>non-siblings -- not what you intended. Beware of needless formalisms --
>sometimes they obscure rather than illuminate, and may hide errors as a
>result.

Fair enough.

>It looks as if insertBefore and appendChild, when passed a
>DocumentFragment, should not only transfer all its contents (nice concept)
>-- but should also cause the DocumentFragment to be removed from _its_
>parent. Which almost makes sense, but are you really sure you want us to
>make it an orphan (implicitly child of the "null DocumentFragment" we've
>discussed) as opposed to keeping it around for possible reuse? If so, you
>should probably warn the reader that this will happen; if not, you need to
>make it an explicit exception.

I'll take this up with the WG.  

>
>One can argue that there's an obvious "Do The Right Thing" interpretation
>if insertBefore or replace/remove/appendChild is called with Attribute(s)
>as arguments. On the other hand, Attributes aren't children in the usual
>sense, so throwing a DOMException is also a reasonable interpretation and I
>_think_ it's what you intended. You might want to explicitly cite them as
>an example to illustrate where the line is drawn.

In the next draft we're clarifying that Attributes aren't REALLY in the
tree in the sense that other Nodes are, so the usual parent/sibling
relationships don't apply.
>
>The description of equals() might want to contain, or reference, the text
>in clone() that describes the interpretation of shallow rather than leaving
>it implicit from context. And there's some fuzziness here about exactly
>what should and shouldn't be tested -- for example, will two Nodes which
>belong to Documents of different DocumentTypes but otherwise have the same
>structure be equal?

This has been clarified in the next draft.

>
>
>
Received on Wednesday, 29 July 1998 19:42:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT