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

validation and exception handling

From: Steve Dickson <sdickson@savagesoftware.com>
Date: Wed, 24 May 2000 10:23:48 -0700
Message-id: <fc.0085846d000063160085846d00006316.6325@savagesoftware.com>
To: www-svg@w3.org

In the current draft of the spec, there is very little provision for data
validation on most of the attribute set/mutator functions.  There seems to
be a tacit assumption that the data provided by the user will be
well-formed and valid.  To give a concrete example, the SVGGradientElement
interface contains an attribute gradientUnits which takes one of the
constants defined in SVGUnitTypes.  The SVGUnitTypes interface states that
it is invalid to attempt to assign an attribute a value of
SVG_UNIT_TYPE_UNKNOWN.  However, no mechanism is provided in the spec to
inform a user attempting to assign this value that they are performing an
invalid or illegal operation.  This is one example, though there are many
more.  In fact, the instances where a warning is raised on invalid data
are the exception rather than the rule (pardon the pun).

Is a more rigourous data validation and exception handling mechanism
likely to be added?  If not, I think it's almost inevitable that
implementors are going to break/extend the spec by adding their own.  

S.
 
Received on Wednesday, 24 May 2000 13:23:41 GMT

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