1 May 2006 01:03
document.evaluate and xpath function position()
Sebastian Fey <sebastian.fey <at> web.de>
2006-04-30 23:03:54 GMT
2006-04-30 23:03:54 GMT
hi there, i just tried to use position() in document.evaluate. i failed :) position() returns the position of the current context node in the current context node-set. I want to determine the position of contextNode (type ELEMENT_NODE). var xpathResult = document.evaluate( "position()", contextNode, null, XPathResult.NUMBER_TYPE, null); xpathResult == 1, no matter which position contextNode has. It seems like evaluate() does not see the current context node-set, but takes contextNode as the current context node-set. Or do i miss anything?
RSS Feed