Debugging XSLT template, breakpoints and stepping

Here should go questions about transforming XML with XSLT and FOP.
daliboris
Posts: 28
Joined: Thu Feb 11, 2010 5:00 pm

Debugging XSLT template, breakpoints and stepping

Post by daliboris »

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: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Debugging XSLT template, breakpoints and stepping

Post by adrian »

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
Post Reply