You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Travis Stevens <Tr...@noaa.gov> on 2004/12/23 21:34:55 UTC
xpath queries
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