- From: Philippe Le Hegaret <plh@w3.org>
- Date: Mon, 05 Jan 2004 18:50:50 -0500
- To: Curt Arnold <carnold@houston.rr.com>
- Cc: WWW DOM <www-dom@w3.org>
On Sat, 2004-01-03 at 11:19, Curt Arnold wrote: > 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. setIdAttribute* sets the ID-ness of the attribute, not its name. Attribute methods on the Element interface that are manipulating attributes without modifying don't have the INVALID_CHARACTER_ERR exception (see getAttribute, hasAttributeNS, ...). I would propose to leave the specification as is and return a NOT_FOUND exception in case of invalid character in the name. > 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. done. (modulo other changes I did for Andrew Clover). Philippe
Received on Monday, 5 January 2004 18:51:05 UTC