Debugging XSLT template, breakpoints and stepping

Here should go questions about transforming XML with XSLT and FOP.
daliboris
Posts: 18

Debugging XSLT template, breakpoints and stepping

Wed Aug 17, 2016 11:58 am

I see different behavior during debugging XSLT template with XML file:

When I set breakpoint on element in XSLT stylesheet, stepping Into, Over and Out works fine, but when the breakpoint is set on the element in XML file, these different types of steps can't be used: whatever I choose, only one step (line) is executed.

The solution is removing breakpoint in XML file, but when XSLT transformation continues, XML element with previously set breakpoint moves away.

Is it expected behavior of debugging, or I missed some option for debugging?
adrian
Posts: 2461

Re: Debugging XSLT template, breakpoints and stepping

Wed Aug 17, 2016 3:57 pm

Hello,

When I set breakpoint on element in XSLT stylesheet, stepping Into, Over and Out works fine, but when the breakpoint is set on the element in XML file, these different types of steps can't be used: whatever I choose, only one step (line) is executed.
Note that Step Over and Step Out are still subject to breakpoints. So, if a breakpoint is encountered during stepping over/out, the debugger will still stop for it. Only Run to Cursor and Run to End ignore breakpoints.

The "difference" between XML and XSL breakpoints is that when you set a breakpoint on an element from the XML file, you are setting a breakpoint for when the current XML context is that element. So, for as long as you are within an xsl:template that matches that element with the breakpoint, the breakpoint will match and the debugger will stop at each step, so stepping in/out/over will not get you further than the next step of the XSL code.

To answer your question, yes, it's expected behavior.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 1 guest