Chapter 7. Debugging XSLT stylesheets and XQuery documents

Table of Contents

Overview
Layout
Control Toolbar
Information views
Multiple output documents in XSLT 2.0
Working with the XSLT/XQuery Debugger
Steps in a typical debug process
Using breakpoints
Viewing processing information
Determining what XSL/XQuery expression generated particular output

Overview

The Debugger perspectives enables you to test and debug XSLT 1.0 /2.0 stylesheets and XQuery 1.0 documents. The interface presents simultaneous views of the source XML document, the XSLT/XQuery document and the result document. As you go step by step through the XSLT/XQuery document the corresponding output is generated step by step, and the corresponding position in the XML file is highlighted for each step. At the same time, special views in the interface provide various types of debugging information and events useful for understanding the transformation process.

The user benefits of a rich set of features for testing and solving XSLT/XQuery problems:

  • Support for XSLT 1.0 stylesheets (through the Saxon 6.5.5 and Xalan XSLT engines) , XSLT 2.0 stylesheets (through the Saxon 8B XSLT engine) and XQuery 1.0 (through the Saxon 8B XQuery engine).

  • Stepping capabilities: step in, step over, step out, run, run to cursor, run to end, pause, stop.

  • Back mapping between every piece of output and instruction element /source context who generate it .

  • Breakpoints on both source and XSLT/XQuery documents.

  • Call stack view on both source and XSLT/XQuery documents.

  • Trace history on both source and XSLT/XQuery documents.

  • Support for XPath expression evaluation during debugging.

  • Step into imported/included stylesheets as well as included source entities.

  • Available templates and hits count.

  • Variables view.

  • Dynamic output generation.