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

#REQUIRED attributes

From: Steve Dickson <sdickson@savagesoftware.com>
Date: Mon, 29 May 2000 10:37:17 -0700
Message-id: <fc.0085846d00006a590085846d00006a59.6a77@savagesoftware.com>
To: www-svg@w3.org
Certain SVG element types contain attributes that are #REQUIRED e.g.
SVGSVGElement attributes 'width' and 'height', SVGCircleElement 'r'
attribute, etc.  However, there currently isn't any mechanism in the SVG
spec to ensure that these attributes are set (though I understand that
some sort of DTD validation mechanism will be part of the DOM3 spec).  
Given that these attributes _must_ be set at some point, wouldn't it make
sense for 
these attribute values to be passed as parameters to the appropriate
factory methods?  e.g. 

...
SVGSVGElement svg;
...
SVGLength r = svg.createSVGLength();
r.setValue(10.0);
svg.createSVGCircleElement(r);
...

This would ensure that all #REQUIRED attributes are set when the element
is created. 

 Note: SVGSVGElement would need to be bootstrapped, since it contains
#REQUIRED attributes 'width' and 'height' of type SVGLength and the
SVGLength factory method is contained in SVGSVGElement.

S.
Received on Monday, 29 May 2000 13:37:10 GMT

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