Re: List items; are they intended to be unique?

Steve,
I believe you are correct. I believe there should be a new exception in the
SVG DOM if you attempt to insert the same object into two different lists.

I will raise the issue within the working group.

Thanks.
Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated

At 03:15 PM 4/24/00 -0700, Steve Dickson wrote:
>The WD of 2000/03/03 seems to allow the user to insert a given object into
>more than one list,  or to insert the object into the same list more than
>once.  eg.
>
>SVGSVGElement svg;
>...
>SVGPolylineElement polyline = svg.createSVGPolylineElement();
>SVGPolygonElement polygon = svg.createSVGPolygonElement();
>SVGList polylinePointlist = polyline.getPoints();
>SVGList polygonPointlist = polygon.getPoints();
>SVGPoint point = (SVGPoint)polylinePointlist.createItem();
>polylinePointlist.append(point);
>polygonPointlist.append(point);
>
>or, 
>
>SVGPathElement path;
>SVGList svgpathseglist = path.getSVGPathSegList():
>SVGPathSeg seg = path.createSVGPathSeg();
>svgpathseglist.append(seg);
>svgpathseglist.append(seg);
>
>
>Is this considered legal?  The DOM2 spec handles a similar situation with
>Attr nodes by throwing a DOMException::INUSE_ATTRIBUTE_ERR, forcing the
>user to clone Attr nodes if they are to be reused.  Since SVG lists are
>essentially an extension of DOM Attr nodes, shouldn't they produce the
>same behaviour i.e. list items can be be inserted into at most one list at
>any given time?  
>
>S.
>
>
>
> 
> 

Received on Wednesday, 3 May 2000 23:23:52 UTC