W3C home > Mailing lists > Public > www-svg@w3.org > October 2000

Re: List insertion problems

From: Jon Ferraiolo <jferraio@Adobe.COM>
Date: Fri, 27 Oct 2000 16:15:54 -0700
Message-Id: <>
To: bbrodie@savagesoftware.com (Blaine Brodie)
Cc: www-svg@w3.org
Thanks for the post.

At 01:28 PM 10/27/00 -0700, Blaine Brodie wrote:
>When inserting, replacing or appending an item into a list a user can use
>the same item multiple times.  Here are a couple examples of the problem.
>Assume I have a pathElement named 'path1' and 'path2' and a path segment
>named 'pathSeg':
>  1)     path1.getPathSegList().appendItem(pathSeg);
>         path1.getPathSegList().appendItem(pathSeg);
>Two items in the list refer to the same object.

DOM doesn't allow this. If you look at the definition of appendChild() in 
the Node interface in the Core DOM, you see that if newChild is already in 
the "tree", it is removed from the tree first.

>2)      path1.getPathSegList().appendItem(pathSeg)
>         path2.getPathSegList().appendItem(pathSeg)
>In this case, the same object is attached to two lists.

Same thing.

The SVG spec needs to add a sentence to the XXXList interface methods such 
as appendItem() to clarify that if newItem is already in a list, it needs 
to be removed from its previous list first.

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated

Received on Friday, 27 October 2000 19:16:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:49 UTC