W3C home > Mailing lists > Public > www-archive@w3.org > August 2011

Firefox bug: XPath root node selection on isolated nodes

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 30 Aug 2011 02:30:02 +0200
To: www-archive@w3.org
Message-ID: <eibo57le8fhpi68pd6i8nerjbca0k6gcrd@hive.bjoern.hoehrmann.de>
Hi,

  Firefox does not implement the path to the root node correctly for
nodes not in the document, this should alert true but alerts false.

  var doc = new DOMParser().parseFromString("<y/>", "text/xml");
  var elm = doc.createElement("t");
  var re1 = doc.evaluate("/", doc, null, 9, null);
  var re2 = doc.evaluate("/", elm, null, 9, null);
  alert(re1.singleNodeValue === re2.singleNodeValue);

regards,
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Tuesday, 30 August 2011 00:30:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:34:02 UTC