Change to Attr interface in light of XPath

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.


Justin

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