Subject:Copy Xpath Query to Clipboard Author:Neal Walters Date:16 Jun 2005 09:38 AM
1) Why not just put the Xpath right in the query box at the top of the screen? Or maybe make a separate context menu item for this?
2) How about another context menu item that give you the choice of an "absolute" or not Xpath? Sorry if there is a better term - but you generate specific or absolute Xpath queries now - i.e. you embed the  in each level of the xpath statement. If I want to get all the items, then I have to remove each of the  statements.
Subject:Copy Xpath Query to Clipboard Author:Matt Dawson Date:22 Jun 2006 07:27 AM
>1) Why not just put the Xpath right in the query box at the
>top of the screen? Or maybe make a separate context menu
>item for this?
I think this is a request for a feature I'd like to see, but I'm not quite sure. There are a few ways I can see to interpret this:
a) The Copy XPath Query to Clipboard feature that is now on the right click menu in the tree view.
b) Keep a path text field open at the top of the screen, and update it as you click around an XML document. This would be like keeping the Address bar open in Windows Explorer (and ideally should be an optional toolbar, just like in Explorer). Or like the feature in XPath Explorer (http://sourceforge.net/projects/xpe), when you double click on part of an XML document.
c) When opening the XPath Query Editor by right clicking on an item in the tree view, prepopulate the Query tab with the XPath statement to find the current element/node.
b) and c) are both things I'd like to see implemented.
>2) How about another context menu item that give you the
>choice of an "absolute" or not Xpath? Sorry if there is a
>better term - but you generate specific or absolute Xpath
>queries now - i.e. you embed the  in each level of the
>xpath statement. If I want to get all the items, then I have
>to remove each of the  statements.
This is something else I'd like to see added. e.g. I just used the right click option mentioned above on a document I'm working with, and it returned:
This is an absolute path to the current element instance, but sometimes we want the path to the level in the structure rather than a specifc instance. Ideally I'd like to see an option to return something like this instead:
Another aspect of the preferred output above - it does not include unnecessary array elements in the XPath generated. i.e. Stylus currently outputs /Transmission/TransmissionBody ... even though the TransmissionBody element has a max/min occurs of 1, so specifying  to indicate the instance of that element is unnecessary. Even if the option to generate a non-"absolute path" is not added to the product, I still tend to think these unnecessary/irrelevant array elements should be removed from the generated XPath.
Any chance any of these might make it into a future update/release?