XPath at the cursor position in the XML Editor perspective

Oxygen general issues.
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

XPath at the cursor position in the XML Editor perspective

Post by Zby »

Hi,

Is there any way to see the XPath of the element where the text cursor is placed? Maybe the status bar is a good place for it?
I know I can copy and paste the current XPath but this is only a workaround.
I have searched the Oxygen documentation for XPath but have not found anything on this matter.

Thanks,

Zby
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

No there is not. As you mentioned you can use the Copy XPath action (you can define a shortcut for that in options) to copy the current XPath to clipboard and then paste it wherever you need it.
We discussed a couple of times adding the XPath of the current element somewhere on the GUI but we were not able to find a satisfactory solution. One possibility was to use the XPath field on the XPath toolbar plus a two state button that should control if the current XPath should go in the XPath field or not but the problems here are that the XPath values and also can change quite frequently thus they can became annoying. In the status bar there is not a lot of space available. Also computing the XPath at each caret move can affect performance.
The idea is - we compute the information as we have it on Copy XPath but how can that be integrated so that it is more useful than distracting?

Best Regards,
George
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

I think one of the acceptable solutions is that after the Copy XPath action, the current XPath could be copied to the XPath Builder panel and, at the same time, displayed in the status bar, thus overriding the original content (which is mostly the file name--I think, this is unnecessary since it is visible in the editor's window title, right?). The cursor move would restore the original status bar content. Such a solution would provide some history of the shortcut usage and would preserve the original functionality of the status bar.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Zby,

I logged a bug on our bugzilla to analyze what we can do to make the current XPath visible to the user.
Assuming you edit in the XPath toolbar and just want to insert the current path somewhere there it is not ok to have the XPath entry in the XPath toolbar with the current exression after Copy XPath as your changes will be lost. Anyway, as I sayd I logged this as a bug and we will try to find a solution to have the current XPath visible. One possibility is to add a section in the XPath Builder view with the current XPath.

Best Regards,
George
Post Reply