List items; are they intended to be unique?

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 Monday, 24 April 2000 18:15:39 UTC