W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2004

L3 Core: Calling setIdAttribute* when attr value is does not match Name production

From: Curt Arnold <carnold@houston.rr.com>
Date: Sat, 03 Jan 2004 10:19:52 -0600
Message-ID: <3FF6EBA8.8080503@houston.rr.com>
To: www-dom@w3.org

Element.setIdAttribute and similar all start with basically the same text:


    Declares the attribute specified by name to be of type ID, i.e. the
    Attr node becomes a user-determined ID attribute and its attribute
    Attr.isId will be true. Note, however, that this simply affects the
    attribute Attr.isId of the Attr node and does not change any schema
    that may be in use, in particular this does not affect
    theAttr.schemaTypeInfo of the specified Attr node.

The spec does not address what should occur if the value of the 
attribute does not match the Name production (which would be required to 
be "of type ID").  Other methods where values must be valid names (for 
example, createElement) throw an INVALID_CHARACTER_ERR when something 
that should match the Name construct does not.

My suggestion would be to remove "of type ID" from the description of 
these methods.  Something like:


    Declares the specified attribute to be a user-determined ID
    attribute. This affects the value ofAttr.isId of the Attr node and
    the behavior of Document.getElementById, but does not change any
    schema that may be in use, in particular this does not affect
    theAttr.schemaTypeInfo of the specified Attr node.
Received on Saturday, 3 January 2004 11:19:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:57 GMT