[Webkit-unassigned] [Bug 11815] Incorrect results with XPathEvaluator

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 12 14:45:56 PST 2006


http://bugs.webkit.org/show_bug.cgi?id=11815





------- Comment #1 from jcostell at tibco.com  2006-12-12 14:45 PDT -------
// #1:
// An empty node value causes the substring() function to return true when it
should return false.

var strXML = '<data><record id="-a-"></record><record
id="a-a">-hi-</record></data>';
var doc = (new DOMParser()).parseFromString(strXML, "text/xml");
var xpe = new XPathEvaluator();
var objResult = xpe.evaluate("//record[substring(.,1,1)='-']", doc, null, 0,
null);
var itm = null;
var objNodes = [];
while (itm = objResult.iterateNext()) objNodes.push(itm);

assertEquals(1, objNodes.length); // Safari yields 2


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list