The JS glue just passes along whatever document.evaluate returns, after converting that array-like XPathResults list into a plain array:
function(doc,q,ref,cont) {
var xres = doc.evaluate(q,ref,null,XPathResult.ORDERED_NODE_SN
+APSHOT_TYPE, null );
var map;
if( cont ) {
map = cont;
} else {
// Default is identity
map = function(e){ return e };
};
var res = [];
for ( var i=0 ; i < xres.snapshotLength; i++ )
{
res.push( map(xres.snapshotItem(i)));
};
return res
}
I'm no expert on XPath and its semantics, but if somebody submits a bug report and preferrably a self-contained example, I can investigate things closer. |