W3C home > Mailing lists > Public > public-webapi@w3.org > March 2008

[selectors-api] NSResolver moving nodes between documents

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 12 Mar 2008 14:23:54 -0500
Message-ID: <47D82DCA.2030600@mit.edu>
To: "Web APIs WG (public)" <public-webapi@w3.org>

What is the correct behavior if a lookupNamespaceURI call moves nodes 
between documents?  In particular, what is the correct behavior is the 
Element node the call is being made on is moved to a different document 
during the lookupNamespaceURI call (using adoptNode)?

The reason this matters is that the case-sensitivity of selectors 
depends on the host language.  At the moment, in Gecko, this is 
determined by the Document object.  In particular, the obvious object to 
use for purposes of querySelector(All) is the ownerDocument of the 
Element the method is called on (if the call is made on a Document, 
there is no problem here at all).  But if the ownerDocument can change 
during a lookupNamespaceURI call, then the parsed selector's 
case-sensitivity may no longer match the host language of the Element's 

The spec should clearly specify what a UA is expected to do here.  My 
personal preference is that if the ownerDocument has changed the UA 
should throw an exception, since there is no way to return a "correct" 
result at that point.

Received on Wednesday, 12 March 2008 19:24:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:25 UTC