Xwatch doesnt update nodes/Values set correctly

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
jokester01au
Posts: 64
Joined: Tue May 17, 2005 9:16 am

Xwatch doesnt update nodes/Values set correctly

Post by jokester01au » Wed Jan 03, 2007 8:38 am

Hi,

when you type an xwatch expression and press enter, the "nodes/values set" pane does not update.

To workaround this, it is possible to force the "nodes/values set" pane to update by selecting a different xwatch expression and then selecting the new one once more, however this is obviously not desirable behavior.

Additionally, it appears that XWatch expressions always evaluate to a node set, and hence never give any useful information in the value column. For example, the xwatch expressions

1

or

't'

both evaluate to node sets. While it is possible to see their atomic value in the "nodes/values set" pane, this is not ideal.

I am using:
Oxygen 8.0
XSLT 2.0
Saxon 8
Eclipse 3.3M3
Windows Vista
Sun JDK1.6.0RC

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache » Wed Jan 03, 2007 6:59 pm

Hello,

Does it happen also with a stable version of Eclipse, for example 3.2.1 (build M20060921-0945) ? I see that you use Eclipse 3.3 milestone 3 but we do not support milestone releases as specified on the Download page and in the User Manual, the Requirements section.


Regards,
Sorin

jokester01au
Posts: 64
Joined: Tue May 17, 2005 9:16 am

Xwatch doesnt update nodes/Values set correctly

Post by jokester01au » Thu Jan 04, 2007 1:14 am

Fair enough that you don't support milestone releases.

Both of these issues also occur using 3.2.1.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache » Thu Jan 04, 2007 11:28 am

The expressions 1 and 't' are presented as node sets in the XWatch view only if you run the transformation with Saxon 8. This happens because in XSLT 2.0 they are evaluated as sequences.


Regards,
Sorin

jokester01au
Posts: 64
Joined: Tue May 17, 2005 9:16 am

Xwatch doesnt update nodes/Values set correctly

Post by jokester01au » Fri Jan 05, 2007 3:04 am

The expressions 1 and 't' are presented as node sets in the XWatch view only if you run the transformation with Saxon 8. This happens because in XSLT 2.0 they are evaluated as sequences.
I understand that in XPath 2.0/XSLT 2.0 everything is a sequence. However, given that this is the case, it would be great if Oxygen was able to identify when a sequence can be displayed in a single line, and in those cases display it in the XWatch/Variable pane. This would make debugging substantially easier.

Resolving the xwatch pane updating issue mentioned in the previous post is also something that would make debugging much easier.

Regards,
Joe.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Xwatch doesnt update nodes/Values set correctly

Post by sorin_ristache » Mon Jan 08, 2007 1:44 pm

jokester01au wrote:I understand that in XPath 2.0/XSLT 2.0 everything is a sequence. However, given that this is the case, it would be great if Oxygen was able to identify when a sequence can be displayed in a single line, and in those cases display it in the XWatch/Variable pane. This would make debugging substantially easier.
We think that all sequences should be displayed the same even if they contain a single value. If some sequences are displayed in a different way the user is confused about the data type of that value.
jokester01au wrote:Resolving the xwatch pane updating issue mentioned in the previous post is also something that would make debugging much easier.
I think the Value column is not updated because the debugger is not started when you enter the XWatch expression. If you enter the expression when the debugger is started the evaluation is done when you press enter in the Expression column. XWatch expressions are evaluated only if the debugger is started.


Regards,
Sorin

jokester01au
Posts: 64
Joined: Tue May 17, 2005 9:16 am

Re: Xwatch doesnt update nodes/Values set correctly

Post by jokester01au » Tue Jan 09, 2007 2:39 am

We think that all sequences should be displayed the same even if they contain a single value. If some sequences are displayed in a different way the user is confused about the data type of that value.
I can see the logic behind this. However it substantially increases the complexity of the UI. What about modifying it so that all expressions and variables always display in the xwatch or variables panes (respectively), but you can expand them as a tree view as required. (In fact this is exactly the same as eclipse's java debugger variable view, which is excellent).

Perhaps you can even reuse a lot of the eclipse code?
I think the Value column is not updated because the debugger is not started when you enter the XWatch expression. If you enter the expression when the debugger is started the evaluation is done when you press enter in the Expression column. .
No, this is not the case. I am entering the XWatch expression when the debugger is paused at a breakpoint.

Regards,
Joe.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Xwatch doesnt update nodes/Values set correctly

Post by sorin_ristache » Tue Jan 09, 2007 3:10 pm

jokester01au wrote:What about modifying it so that all expressions and variables always display in the xwatch or variables panes (respectively), but you can expand them as a tree view as required. (In fact this is exactly the same as eclipse's java debugger variable view, which is excellent).
We will consider your suggestion. Thank you.
jokester01au wrote:No, this is not the case. I am entering the XWatch expression when the debugger is paused at a breakpoint.
I am sorry, I cannot reproduce the problem. Can you send us sample files and specify the line number of the breakpoint and the expression entered into the XWatch view ?

Regards,
Sorin

jokester01au
Posts: 64
Joined: Tue May 17, 2005 9:16 am

Post by jokester01au » Fri Feb 02, 2007 5:49 am

If I use this XML

<root>
<anotherElement>
<element attribute="true"/>
</anotherElement>
</root>

and this stylesheet

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:variable name="element" select="root/anotherElement"/>
<xsl:variable name="blah">
<lala/>
</xsl:variable>
<xsl:apply-templates select="$element"/>
<xsl:apply-templates select="$blah"/>
</xsl:template>
</xsl:stylesheet>

with Saxon8B, in Oxygen 8.1 standalone edition, Windows XP, JRE1.5.0_04, I get the problem.

Enter the debugger by pressing "step into" once, then type "1" into the XWatch expression box.

When you hit enter, the expression becomes unselected, so you don't get to see the result of your expression.

Then overwrite the 1 with "2". Hit enter. Again, the expression is deselected, and "Nodes/Values Set" is not updated. Only once you click on the expression to reselect it do you get to see the result in "Nodes/Values Set".

This obviously isn't a critical problem, but having to select the expression twice each time quickly becomes annoying.

When you repeat the process inside eclipse 3.2.1, the expression does stay selected, but "Nodes/Values Set" still doesn't update.

Then, press step-into, switch to the variables view, and select "element". Press step-into again. Substantially worse, the "element" variable stays selected, but the nodes/values set view re-displays the result of the xwatch expression. This appears to be new in 8.1, I don't believe that it happened in 8.0.

Regards,
Joe.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache » Tue Feb 06, 2007 3:30 pm

jokester01au wrote:This obviously isn't a critical problem, but having to select the expression twice each time quickly becomes annoying.
We will fix that.
jokester01au wrote:Then, press step-into, switch to the variables view, and select "element". Press step-into again. Substantially worse, the "element" variable stays selected, but the nodes/values set view re-displays the result of the xwatch expression.
Yes, I can reproduce it in the Eclipse plugin. Thank you for the steps for reproducing it.


Regards,
Sorin

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache » Tue Apr 24, 2007 5:43 pm

Hello Joe,

We fixed the problems with the expressions entered in the XWatch view and the refresh of the Nodes/Values Set view. The version 8.2 which will be released in a short time should work fine.


Regards,
Sorin

jokester01au
Posts: 64
Joined: Tue May 17, 2005 9:16 am

XWatch problems

Post by jokester01au » Wed Apr 25, 2007 6:46 am

Hi Sorin,

Great! Thanks. I look forward to the new version.

Regards,
Joe.

Post Reply