--TEST--
bug #69168 (DomNode::getNodePath() returns invalid path)
--EXTENSIONS--
xsl
--FILE--
bobjoe
EOB;
$xsl = <<
EOB;
function getPath($input){
$input[0]->nodeValue .= 'a';
return $input[0]->getNodePath() . ' = ' . $input[0]->nodeValue;
}
$proc = new XSLTProcessor();
$proc->registerPHPFunctions();
$xslDoc = new DOMDocument();
$xslDoc->loadXML($xsl);
@$proc->importStyleSheet($xslDoc);
$xmlDoc = new DOMDocument();
$xmlDoc->loadXML($xml);
echo @$proc->transformToXML($xmlDoc);
// Tests modification of the nodes
var_dump($xmlDoc->firstChild->firstChild->firstChild->getNodePath());
var_dump($xmlDoc->firstChild->firstChild->firstChild->nodeValue);
?>
--EXPECT--
/allusers/user[1]/uid = boba
/allusers/user[2]/uid = joea
string(21) "/allusers/user[1]/uid"
string(4) "boba"