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

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 UTC