Attribute

Hi,

The value of an Attribute is now not exposed anymore by an attribute of
type
Node in the Attribute interface. This is because the value is composed
by the
children of the Attribute (for XML anyway). There are two consequences:

- The value argument of the Document.createAttribute operation should be
dropped.
- The attribute Attribute.specified should be replaced by the
isSpecified
operation. One must not be able to set the attribute because it is
implicitly
set when a value is added to an Attribute object. If there is no value,
the
default value is looked up in the Attribute declaration.

The explanation of Attribute.specified says:
  "If this attribute was explicitly given a value in the original
document,
   this will be true; otherwise, it will be false."

The fact that the attribute is read-write and that the term "original
document"
was used leads me to think the intention is that if there is no value
for an
attribute, the default value should be put in it if any. Otherwise the
real
value is added and the specified attribute set to true. However, this
would
only reflect the condition at the time the document was loaded. That is
arbitrary because a change of physical representation doesn't imply a
change of
a document. In my opinion the DOM permanently is the original document.
So, the
specified attribute should reflect the current state. Because I think
the
default value should not be stored in the Attribute (at least not
logically),
the specified attribute does not have to be read-write.

With kind regards,
-- 
Werner Donné
Re BVBA
Leuvenselaan 172
B-3300 Tienen
tel: (+32) 16 810203
fax: (+32) 16 820826
E-mail: wdonne@ibm.net

Received on Tuesday, 21 April 1998 05:43:26 UTC