Determining what XSL/XQuery expression generated particular outputIn order to quickly spot the XSL templates or XQuery expressions with problems
it is important to know what XSL template in the XSL stylesheet or XQuery
expression in the XQuery document and what element in the source XML document
generated a specified area in the output. Some of the debugging capabilities,
for example "Step in" can be used for this purpose. Using "Step in" you can see
how output is generated and link it with the XSL/XQuery element being executed
in the current source context. However, this can become difficult on complex
stylesheets or XQuery documents that generates a large output. Output to source mapping is a powerful feature that makes this output to
source mapping persistent that is you can click on the text from the Output document view and the editor will
select the XML source context and the XSL/XQuery element that generated the
text.
If you are in the Editor
perspective
switch
to the XSLT or XQuery Debugger
perspective
with one of the actions (here
explained for XSLT):
→ or the toolbar button
Debugger
→ → or the toolbar button
Debug scenario
. This action initializes the Debugger perspective
with the parameters of the transformation scenario. Any
modification applied to the scenario parameters (the
transformer engine, the XSLT parameters, the transformer
extensions, etc) will be saved back in the scenario when
exiting from the Debugger perspective.
Select the source XML document in the XML source selector of the Control toolbar. In case
of XQuery debugging without an implicit source choose the NONE
value. Select the XSL/XQuery document in the XSL/XQuery selector of the Control toolbar Select the XSLT/XQuery engine in the XSLT/XQuery engine selector of
the Control
toolbar Set XSLT/XQuery parameters from the button available on the Control toolbar
Apply the stylesheet or XQuery transformation using the
button
Run to end
available on the Control
toolbar:
Inspect the mapping by clicking a section of the output from the Text view tab or from the XHTML view tab of the
Output document
view
to have the
XSL/XQuery element and the source context highlighted.
© 2008 syncRO soft ltd. |