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

List items; are they intended to be unique?

From: Steve Dickson <sdickson@savagesoftware.com>
Date: Mon, 24 Apr 2000 15:15:49 -0700
Message-id: <fc.0085846d000047c00085846d000047c0.47c9@savagesoftware.com>
To: www-svg@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 23:52:47 GMT