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();


SVGPathElement path;
SVGList svgpathseglist = path.getSVGPathSegList():
SVGPathSeg seg = path.createSVGPathSeg();

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?  


Received on Monday, 24 April 2000 18:15:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:53:49 UTC