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

Re: New DOM Level 2 Working Draft

From: <keshlam@us.ibm.com>
Date: Mon, 27 Sep 1999 12:22:22 -0400
To: steve@rsv.ricoh.com (Stephen R. Savitzky)
cc: Arnaud Le Hors <lehors@w3.org>, www-dom@w3.org
Message-ID: <852567F9.0059EE72.00@D51MTA03.pok.ibm.com>
>So why not just use parentNode like everything else does?

Because an Attr is not a child. Parent/child was defined to be a bidirectional
relationship; if you can get to something via getParent, you can get back via
getFirstChild/getNextSibling. Since the latter relationship doesn't hold for
Attrs, the former really isn't applicable either. Hence the new, one-way,
relationship.

I suppose one could argue that getOwningElement() should be available on nodes
other than Attr, and on those nodes should equate to getParent. Nobody has
submitted a use case for that.

______________________________________
Joe Kesselman  / IBM Research
Received on Monday, 27 September 1999 12:22:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT