[oXygen-user] Debugger stops showing parameters for a while?

George Cristian Bina george at oxygenxml.com
Fri Sep 7 02:20:29 CDT 2012


Hi Lars,

Sorry, we looked again into this and it seems an issue with the local 
variables/parameter detection when the context is inside an XPath 
expression. What happens is that we get the current XSLT element as a 
reference to collect the in-scope variables/parameters and the 
xsl:variable is not yet the current element, because it is about to be 
evaluated and thus we get the xsl:template instead thus failing to 
detect the local variables and parameters. We are working to find a 
solution to this problem.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 9/6/12 4:30 PM, Lars Huttar wrote:
> Thank you for this explanation ... it helps to have an idea of why this
> is happening, and to have a workaround.
> Two follow-up questions:
>
> 1) Why are these parameters not visible inside XPath expressions, when
> those expressions are in the scope where those parameters/variables
> should be visible? If the parameters were referenced within the XPath
> expressions, that would be a valid reference, so it's hard to understand
> why the evaluation context there doesn't show certain variables.
>
> 2) It seems unfortunate that turning on the trace of XPath expressions
> actually removes the ability to see the values of certain variables,
> relative to having the XPath trace turned off. Certainly there are times
> when stepping through XPath expressions will be very helpful (or even
> crucial), in which case one has to sacrifice visibility of variables. If
> these variables cannot be displayed while stepping through an XPath
> expression, could additional stepping points be inserted, so that the
> value of a variable can be inspected as soon as it is computed, before
> entering the XPath evaluation context?
>
> E.g. in the example I gave, I'm able to inspect the value of the first
> passed-in parameter, $mixedItemTypes, before the next <xsl:param> is
> evaluated. It would be very helpful (and consistent) to be able to do
> the same with the $tableScopeType parameter before entering the XPath
> expression in <xsl:variable name="file" select="."/>. Maybe this can be
> accomplished by inserting another stepping point after        <xsl:param
> name="tableScopeType" select="''" as="xs:string"/> ?
>
>
> Thanks as always for a great tool. My team and I have been annual
> subscribers for several years, and we continue to be convinced that
> we're getting a great value from oXygen.
>
> Lars
>
>
>
> On 9/6/2012 6:03 AM, Oxygen XML Editor Support wrote:
>> Dear Lars,
>>
>> At some point we added support for allowing the debugger to step also
>> inside XPath expressions. This is what happens in your case and the
>> evaluation context is changed, that is why those variables are not
>> visible at that moment. You can turn that off from
>> Options -> Preferences --  XML / XSLT-FO-XQuery / XSLT / Saxon /
>> Saxon-HE/PE/EE by disabling the "Debugger trace into XPath expressions
>> (applies to debugging sessions)" option.
>>
>> Best Regards,
>> George
>> --
>> George Cristian Bina
>> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
>> http://www.oxygenxml.com
>>
>> On 9/6/12 5:31 AM, Lars Huttar wrote:
>>> Hello,
>>>
>>> I'm using Oxygen 14.0, build 2012062215.
>>> In the debugger, with Saxon 9.4.0.3 PE. I have a stylesheet running with
>>> a specified XML document as input. A certain named template is called,
>>>
>>>      <xsl:template name="allowed-formats">
>>>         <xsl:param name="mixedItemTypes" select="false()"
>>> as="xs:boolean"/>
>>>         <xsl:param name="tableScopeType" select="''" as="xs:string"/>
>>>
>>>         <xsl:variable name="file" select="."/>
>>>         <xsl:variable name="typePlural" select="local-name($file/..)"/>
>>>
>>> I step through these lines one by one using "Step Into".
>>> When the cursor goes past the first <xsl:param> line, the debugger
>>> "Variables" window shows the mixedItemTypes parameter, as it should.
>>> But when I step past the second <xsl:param> line (and the cursor goes to
>>> the "."), the $mixedItemTypes parameter disappears from the Variables
>>> window, and the $tableScopeType parameter doesn't show up.
>>> After a few more steps in the same template, both parameters appear in
>>> the Variables window.
>>>
>>> This makes it very awkward to debug what's happening, if the time when
>>> you need to see the value of one of the parameters happens to be a time
>>> when it won't show up.
>>> Also, when these parameters are not showing in the "Variables" window,
>>> they also are inaccessible from expressions (e.g. "$tableScopeType") in
>>> the XWatch window.
>>>
>>> Thanks for helping me understand and overcome whatever is going on here.
>>>
>>> Lars
>>>
>>> _______________________________________________
>>> oXygen-user mailing list
>>> oXygen-user at oxygenxml.com
>>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>>
>>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>


More information about the oXygen-user mailing list