Change to Attr interface in light of XPath
Justin Summerlin <[email protected]>
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <CAA2YHm47tRReYKch1HJiO7bLSUmSaQpG_5Ym6qii4Lh0P2ts8A@mail.gmail.com> |
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