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

Change to Attr interface in light of XPath

From: Justin Summerlin <justin@inkling.com>
Date: Mon, 17 Feb 2014 13:38:31 -0800
Message-ID: <CAA2YHm47tRReYKch1HJiO7bLSUmSaQpG_5Ym6qii4Lh0P2ts8A@mail.gmail.com>
To: www-dom@w3.org
This comment is regarding the change in DOM4 to make Attr no longer inherit
from Node.

Recent comments from Mozilla and Google have indicated that this isn't a
significant change since you need an Element to get its attributes and
because it is rarely used.

We use XPath to query the DOM, and in some cases include attribute
selectors. With an XPath query like "//@*", you can get a list of all
attributes in the document. This is somewhat problematic since accessing
the parent element is needed for our use.

Was the possibility of obtaining attributes without knowing their parent
elements considered for this proposal? Additionally, is there any
straightforward workaround that doesn't require us to essentially
re-implement part of XPathEvaluator?

In my opinion, Attr should continue to inherit from Node.

Received on Tuesday, 18 February 2014 09:16:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:04 UTC