XPath Relative Queries
Submitted by Wednesday, 17 December, 2003 - 10:36
on
Hi,
The XPath plug-in is a good idea, however it is relatively useless and I hardly ever use it purely because you cannot perform XPath queries relative to a specific node (they are always executed relative to the root node) and therefore you can never test out and optimise your XPath queries. For example:
If I had the some XML representing a page and the current node I was matching (using XSLT for example) was the "body" node, but I wanted to find out the title of the page from this node the best way to do this would be to use the query "ancestor::page/@title". However this is not possible to test in the current XPath plugin.
Are there any plans to implement this functionality?
Thanks.
Graeme
The XPath plug-in is a good idea, however it is relatively useless and I hardly ever use it purely because you cannot perform XPath queries relative to a specific node (they are always executed relative to the root node) and therefore you can never test out and optimise your XPath queries. For example:
If I had the some XML representing a page and the current node I was matching (using XSLT for example) was the "body" node, but I wanted to find out the title of the page from this node the best way to do this would be to use the query "ancestor::page/@title". However this is not possible to test in the current XPath plugin.
Are there any plans to implement this functionality?
Thanks.
Graeme