W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

Re: What value for createAttributeNode().getSpecified()?

From: <keshlam@us.ibm.com>
Date: Wed, 9 Sep 1998 18:25:52 -0400
To: www-dom@w3.org
Message-ID: <8525667A.007A1B20.00@us.ibm.com>
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 GMT

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