XPathBuilder xpath does not include attributes on caret move

Are you missing a feature? Request its implementation here.
csalsa
Posts: 97
Joined: Tue Apr 22, 2008 9:31 am

XPathBuilder xpath does not include attributes on caret move

Post by csalsa »

The attribute for a XML element is not included in the 'Expression' box of the 'XPath Builder' when the attributed is selected and the XPath Builder is configured for 'XPath update on caret move'. The problem occurs for XPath 1.0 and 2.0.

Elements are updated in the 'Expression' box correctly.

The xpath should have 'xsi:type' attributes for intermediate element nodes where 'xsi:type' has been used. Otherwise the xpath is not correct.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: XPathBuilder xpath does not include attributes on caret move

Post by sorin_ristache »

Hello,

We will consider adding an option in the configuration of the XPath toolbar for adding the xsi:type attribute to the expression that is placed in the XPath expression field when the toolbar is in the mode 'XPath update on caret move'.


Thank you for your suggestion,
Sorin
csalsa
Posts: 97
Joined: Tue Apr 22, 2008 9:31 am

Re: XPathBuilder xpath does not include attributes on caret move

Post by csalsa »

Hi Sorin
csalsa wrote:The attribute for a XML element is not included in the 'Expression' box of the 'XPath Builder' when the attributed is selected and the XPath Builder is configured for 'XPath update on caret move'. The problem occurs for XPath 1.0 and 2.0.
Are you planning to fix the XPath in the 'Expression' box?

Consider:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<document>
<chapter pageNumber="3" />
</document>
From the above code the 'Expression' box displays /document/chapter regardless if the element 'chapter' is selected or the attribute 'pageNumber' is selected. For the latter, the 'Expression' box should show /document/chapter/@pageNumber
tavy
Posts: 365
Joined: Thu Jul 01, 2004 12:29 pm

Re: XPathBuilder xpath does not include attributes on caret move

Post by tavy »

Hi,

I added this to our bug tracking tool so it will probably be implemented in a future version.
I think there must have been a performance issue to also determine the attribute, otherwise it would have been implemented from the beginning.

Regards,
Adrian Buza
http://www.oxygenxml.com

LE:
Sorry for the mistake, my colleague Octavian was already logged in, and I didn't notice.
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
csalsa
Posts: 97
Joined: Tue Apr 22, 2008 9:31 am

Re: XPathBuilder xpath does not include attributes on caret move

Post by csalsa »

Thanks tavy for your reply.
Post Reply