W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2016

RE: What is the DOM4 Attr interface used for?

From: Roy Walmsley <roy.walmsley@ntlworld.com>
Date: Sun, 21 Feb 2016 10:31:12 -0000
To: "'Sebastian Zartner'" <sebastianzartner@gmail.com>
Cc: "'Anne van Kesteren'" <annevk@annevk.nl>, <www-dom@w3.org>
Message-ID: <003101d16c92$fcd94ee0$f68beca0$@ntlworld.com>


Thanks for the further clarification. One last question, I hope …


If the living standard supersedes level 4 then where does it tell me that? If I go to your general standards page (https://www.w3.org/TR/#tr_DOM) I see nothing that tells me that the DOM specifications have been superseded. There is no reference to the living standard. And, on the living standards page (https://dom.spec.whatwg.org/) there is no reference to it superseding level 4.


As a potential user and developer I need to be able to determine, unambiguously, and easily, what the latest, current standard is.






From: Sebastian Zartner [mailto:sebastianzartner@gmail.com] 
Sent: 21 February 2016 09:26
To: Roy Walmsley
Cc: Anne van Kesteren; www-dom@w3.org
Subject: Re: What is the DOM4 Attr interface used for?


On 20 February 2016 at 20:46, Roy Walmsley <roy.walmsley@ntlworld.com> wrote:


Many thanks for your response.

While I understand how the situation arose, it still doesn't solve the problem of the level 4 specification. As it stands at the moment, the "Attr" interface is not included either directly or indirectly in the "Element" interface. Consequently, elements have no attributes. So it is effectively impossible to implement.


That assumption is incorrect. The 'Element' interface has the 'attributes' property, which returns the DOM Level 3 'NamedNodeMap' (as you've already recognized).

I can see that the "NamedNodeMap" interface is defined in the level 3 core, so cannot be changed without breaking level 3 and lower. Why don't you redefine it in Level 4 with the current definition from the living standard?


The living standard *is* the current specification, superseding Level 4.



Leaving the level 4 specification in its current state requires, at the very least, a red comment highlighting the problem to users.



-----Original Message-----
From: Anne van Kesteren [mailto:annevk@annevk.nl]
Sent: 19 February 2016 13:40
To: Roy Walmsley
Cc: www-dom@w3.org
Subject: Re: What is the DOM4 Attr interface used for?

Hi Roy,

Welcome to the DOM community. These days we mostly hang out in https://github.com/whatwg/dom and https://wiki.whatwg.org/wiki/IRC.

On Wed, Feb 17, 2016 at 4:39 PM, Roy Walmsley <roy.walmsley@ntlworld.com> wrote:
> I, as a DOM novice, have been studying the DOM4 specification
> available on-line at https://www.w3.org/TR/dom/.

It's unfortunately not very clear, but you want to study https://dom.spec.whatwg.org/ instead.

> I make the assumption that, previously, individual “Element”
> attributes were defined as “Attr” objects which, inheriting the “Node”
> interface, could be listed in a “NamedNodeMap” attribute.


> Now, however, it seems to me, that “NamedNodeMap” is not an
> appropriate type for the “attributes” attribute in the “Element” interface.

It's not a correct name, but since it was only ever used by attributes, changing the type of the things it holds is actually possible. Having said that, we might have to change Attr objects back to being Attr node objects. It's a little up in the air.

> As I said at the start, I am a novice to the DOM, albeit that I have
> many years programming experience. So, apologies if I have this wrong.
> I would be very grateful for clarification.

You're correct that it's a little weird, but unfortunately we cannot right all wrongs, just a handful.

Kind regards,


Received on Sunday, 21 February 2016 10:31:50 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 21 February 2016 10:31:53 UTC