I think that these two queries should return the same results:

1. /root/title[text() = 'A Test Record']/parent::root/parent::*
2. /root/title[text() = 'A Test Record']/parent::root/parent::node()

on the xml:
<root>
  <title>A Test Record</title>
</root>

Query 2 returns the document root and query 1 returns nothing when executing this query with xalan 2.5.1. The method I used is org.apache.xpath.XPathAPI.selectNodeList(Node,String).

thanks,
-Trav



Reply via email to