Return-Path: X-Original-To: apmail-santuario-dev-archive@www.apache.org Delivered-To: apmail-santuario-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5506D9222 for ; Mon, 9 Jan 2012 17:56:01 +0000 (UTC) Received: (qmail 80770 invoked by uid 500); 9 Jan 2012 17:56:01 -0000 Delivered-To: apmail-santuario-dev-archive@santuario.apache.org Received: (qmail 80681 invoked by uid 500); 9 Jan 2012 17:56:00 -0000 Mailing-List: contact dev-help@santuario.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@santuario.apache.org Delivered-To: mailing list dev@santuario.apache.org Received: (qmail 80667 invoked by uid 99); 9 Jan 2012 17:56:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2012 17:56:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cantor.2@osu.edu designates 128.146.216.226 as permitted sender) Received: from [128.146.216.226] (HELO defang23.it.ohio-state.edu) (128.146.216.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2012 17:55:51 +0000 Received: from CIO-TNC-HT06.osuad.osu.edu (cio-tnc-ht06.osuad.osu.edu [164.107.81.171]) by defang23.it.ohio-state.edu (8.13.1/8.13.1) with ESMTP id q09HtNci006336; Mon, 9 Jan 2012 12:55:29 -0500 Received: from CIO-KRC-D1MBX01.osuad.osu.edu ([fe80::450b:35e6:80f4:f3e0]) by CIO-TNC-HT06.osuad.osu.edu ([fe80::3d16:84bd:8d88:7cfd%12]) with mapi id 14.01.0355.002; Mon, 9 Jan 2012 12:55:29 -0500 From: "Cantor, Scott" To: "dev@santuario.apache.org" , "coheigea@apache.org" Subject: Re: Id Resolution Observations and Suggestions Thread-Topic: Id Resolution Observations and Suggestions Thread-Index: AQHMv9pdkYzHXhTOXU+Y5JZydF+3lZX+cE6A///cbgCAAcYLgP//vq2AgATOqYD//7AJgAALi52A///DhYA= Date: Mon, 9 Jan 2012 17:55:27 +0000 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [164.107.160.193] Content-Type: text/plain; charset="us-ascii" Content-ID: <99B026567A1202468B08682CBF9BD2C2@exchange.osu.edu> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: 0.00 () [Tag at 4.50] SPF(pass,0) X-CanIt-Geo: ip=164.107.81.171; country=US; region=OH; city=Columbus; postalcode=43201; latitude=39.9930; longitude=-82.9985; metrocode=535; areacode=614; http://maps.google.com/maps?q=39.9930,-82.9985&z=6 X-CanItPRO-Stream: outbound X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.146.216.226 On 1/9/12 11:31 AM, "Colm O hEigeartaigh" wrote: > >Ok, so if I'm understanding you correctly, the purpose of the tree >search is to ensure that no two Elements are registered by the same Id >and so there is no ambiguity about what Document.getElementById() >returns. But it does not guard against the fact that there could be >two Elements in the document tree with the exact same Id, where one is >registered as an Id and the other isn't. Is this correct? Yes, because it allows the application to know that *it* knows what getElementById will return to both it and the library. If there are duplicates, then the result being undefined, you can't assume anything about what was returned to each part independently. If there are no duplicates, then you do know, provided nothing changes the DOM in between in this area. What this is for (to me) is getting around the lack of reference caching. If that exists, you don't need it, you just compare the cached reference node to what you expect. But today, that caching is not widely available (e.g. not available in the old API, or in C++). -- Scott