Re: SVG12: trait access on illegal names

* Robin Berjon wrote:
>>   From it
>> seems the draft is unclear how the various trait access operations will
>> behave when syntactically invalid parameters are passed, e.g.
>>   getTrait("+")
>> does not appear to raise an exception. Please change the draft such that
>> such illegal parameters raise an exception, e.g. a INVALID_CHARACTER_ERR
>> DOMException.
>For any unknown trait name, the implementation will throw a DOMException 
>with code NOT_SUPPORTED_ERR. Since there is no "+" trait, an exception 
>will be thrown for your case. Differentiating between various types of 
>non-existent traits incurs higher cost for implementations with no 
>obvious gain.

This does not satisfy me, the set of traits that must not be supported
is not defined in the draft, it's not clear in fact whether "+" is an
illegal trait, it's a perfectly valid CSS identifier and trait access
is supposed to work for CSS properties. Further, it is possible through
the traitDef element to setup an XML 1.1 trait and scripts could attempt
to set the trait in an XML 1.0 document, so this has nothing to do with
"non-existent traits". I see no reason why setAttributeNS must throw a
INVALID_CHARACTER_ERR exception while setTraitNS "must" throw a highly
misleading NOT_SUPPORTED_ERR exception in this case, in fact, I do not
see how using NOT_SUPPORTED_ERR here is appropriate at all.
Björn Höhrmann · ·
Weinh. Str. 22 · Telefon: +49(0)621/4309674 ·
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · 

Received on Sunday, 29 May 2005 11:44:23 UTC