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

Re: SVG12: trait access on illegal names

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 29 May 2005 13:45:05 +0200
To: Robin Berjon <robin.berjon@expway.fr>
Cc: www-svg@w3.org
Message-ID: <4299a2e5.61360515@smtp.bjoern.hoehrmann.de>

* Robin Berjon wrote:
>>   From http://www.w3.org/TR/2005/WD-SVGMobile12-20050413/svgudom.html 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 · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Sunday, 29 May 2005 11:44:23 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:30 GMT