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

Re: Attributes contain redundant properties?

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Thu, 30 Aug 2001 15:11:11 -0400
To: www-dom@w3.org
Message-ID: <OFBE8C112F.522DAE59-ON85256AB8.00690CE2@pok.ibm.com>

>Can anybody tell me why there are DOMStrings defined in the Attr interface

>for name and value of an attribute?

"DOM Level 0" compatability.  They're identical to and interoperable with
the corresponding Node properties.

>Then what does "value" field
>holds if a Text node already contains the attribute's value?

Don't confuse IDL attributes with fields. Everything in the DOM should be
considered an abstract interface, and most things that look like fields
should be considered accessors. In specific, reading an Attr node's value
returns the concatenation of the contents of all contained Text nodes,
while writing replaces the contents with a single text node having the new

Joe Kesselman  / IBM Research
Received on Thursday, 30 August 2001 15:11:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:09 UTC