- From: Gareth Reakes <gareth@decisionsoft.com>
- Date: Tue, 17 Sep 2002 08:48:36 +0100 (BST)
- To: Joseph Kesselman <keshlam@us.ibm.com>
- cc: www-dom@w3.org
Hi Joe, thanks for the reply. I followed your lead and made the ownerElement the the element that the ns attr was on. I then noticed a section http://www.w3.org/TR/2002/WD-query-datamodel-20020816/#NamespaceNode which states that ns nodes have no parent. What is the use/need in setting the ownerElement if this is the case? Gareth On Fri, 13 Sep 2002, Joseph Kesselman wrote: > > On Friday, 09/13/2002 at 10:25 MST, rayw@netscape.com (Ray Whitmer) wrote: > > DOM Namespace nodes are clearly NOT created when the DOM element is > > created. > > They're created when the XPath runs, which I think is fine; anything > before that is "parse time" for XPath's purposes. > > The only thing which might make this distinction visible would be that we > may produce new objects each time. HOWEVER -- remember that object > identity is *not* the official way to test DOM node identity; that can > only be done portably via the DOM L3 isSameNode() method. That could be > appropriate jiggered to return true for namespace node objects created via > two separate queries, if they declare the same prefix and namespace and if > the ownerElements match (also conceptually tested via isSameNode()). > > > Note that in XPath 2.0 current draft the question of ownership of > namespace nodes pretty much goes away -- they allow it to be assigned > fairly arbitrarily, so it _could_ be the ownerElement of the actual Attr > this namespace came from. (Xalan takes that approach and trusts XPath 2.0 > will bless it. Fact is, almost nobody uses the namespace axis and of those > a vanishingly small number ever ask for the XPath-parent of a namespace > node, so this deliberate divergence from XPath 1.0 makes very little > real-world difference.) > > ______________________________________ > Joe Kesselman / IBM Research > > -- Gareth Reakes, Head of Product Development DecisionSoft Ltd. http://www.decisionsoft.com Office: +44 (0) 1865 203192
Received on Tuesday, 17 September 2002 03:53:58 UTC