- From: <keshlam@us.ibm.com>
- Date: Wed, 9 Sep 1998 18:25:52 -0400
- To: www-dom@w3.org
I think I've concluded that I was confusing my stopgap implementation of default attributes with the real answer. In fact, Specified is a read-only IDL attribute in the DOM spec, so it had better default to true if XML Attribute objects returned from the factory are to be useful to DOM applications. In Level 1, Parsers and other DOM generators will have to use non-DOM methods to create and manage default Attributes. Creating and setting an attribute on a node via the normal DOM API should indeed set only the Specified attribute. The longterm answer will probably be to hang the default attributes off the DTD rather than attaching them directly to Elements, and to tell the Elements to consult the DTD if they don't have a local value for a given attribute. Among other things, that approach avoids duplicating default attribute objects all over the tree and means that changes to the DTD will immediately be visible throughout the document. It also nails down the fact that if you want to change the defaults, you do so by talking to the DTD. But default attributes are one of those areas that Level 1 left fuzzy, so we'll probably have to wait for Level 2 to nail down the loose corners on this issue. ______________________________________ Joe Kesselman / IBM Research Unless stated otherwise, all opinions are solely those of the author.
Received on Wednesday, 9 September 1998 17:24:24 UTC