Page 1 of 1

Copy Xpath without position

Posted: Thu Oct 13, 2011 11:06 am
by daliboris
It would be helpful, for example for constructing XSLT stylesheet (see @match attribute), if there would be option to copy XPath without absolute position of elements, for example beside

Code: Select all

/t:TEI/t:teiHeader[1]/t:fileDesc[1]/t:publicationStmt[1]/t:availability[1]
there could by also variant

Code: Select all

/t:TEI/t:teiHeader/t:fileDesc/t:publicationStmt/t:availability

Re: Copy Xpath without position

Posted: Thu Oct 13, 2011 11:50 am
by adrian
Hello,

We have this logged on our issue tracking tool. I've added your vote.
This will be analyzed and implemented in a future version of Oxygen.


Note that there is a simple workaround for this. In the XPath toolbar you can enable XPath update on caret move(toolbar button to the right of the XPath combo with two arrows, grey and red, pointing left).

After enabling this, whenever you move the caret in the edited document, the XPath expression from the combo will be updated to the generic XPath(without absolute position) of the element/attribute found at the location of the caret.
You can then simply copy to clipboard the content of the XPath combo.

The same can be accomplished in the XPath Builder view(Window > Show View > XPath Builder).

Regards,
Adrian