Layout

The Debugger perspective interface looks like below. This interface is comprised of 4 panes as follows:

Figure 7.1. Debugger Mode Interface

Debugger Mode Interface
Source document view (XML)

Displays and allows editing of data or document oriented XML files (documents).

XSL/XQuery document view (XSL/XQuery)

Displays and allows editing of XSL files(stylesheets) or XQuery documents.

Output document view

Displays the transformed output that results from the input of a selected document (XML) and selected stylesheet (XSL) or XQuery document to the transformer. The result of transformation is dynamically written as the transformation is processed.

Control view

The control view provides functionality for configuration and control of debugging operations. It also provides a series of Information views types. This pane is comprised of two parts:

XML documents and XSL stylesheets or XQuery documents that were opened in Editor perspective are automatically sorted into the first two panes. When multiple files of each type are opened, the individual documents and stylesheets are separated using the familiar tab management system of the Editor perspective. Selecting a tab brings the document or stylesheet into focus and enables editing without toggling back to the Editor perspective.

During debugging the current execution node is highlighted on both document (XML) and XSL/XQuery views.

Control Toolbar

The toolbar contains all actions needed in order to configure and control the debug process. Items are described below from left to right as they appear in the toolbar.

Figure 7.2. Control Toolbar

Control Toolbar
XML source selector

The selection represents the source document to be used as input by the transformation engine. The selection list is filled-in with all opened files (the XML ones being emphasized). This gives you the possibility to use other file types as source. In case of XQuery debugging session this selection field can be set to default value NONE, as usually XQuery documents do not require an input source.

XSL/XQuery selector

The selection represents the stylesheet or XQuery document to be used by the transformation engine. The selection list is filled-in with all opened files (the XSL/XQuery ones being emphasized).

XSLT/XQuery engine selector

Lists the available XSLT/XQuery processors

(Saxon and Xalan Java - see specifications for XSLT or Saxon8B for XQuery.)

XSLT/XQuery parameters

XSLT/XQuery parameters to be used by the transformation.

Edit extensions

Add and remove the Java classes and jars used as XSLT extensions.

Enable profiling

Enable/Disable current transformation profiling.

Step into (F7)

Starts the debugging process and runs until the next stylesheet node (next step in transformation).

Step over (F8)

Executes the current stylesheet node (including its sub-elements) and goes to next node in document order (usually the next sibling of the current node).

Step out (Shift + F7)

Steps out to the parent node (equivalent to the Step over (F8) on the parent).

Run

Starts the debugging process and runs until the first breakpoint is encountered or until the end of transformation occurs, if no breakpoints are encountered (see the section called “Breakpoints view”).

Run to cursor (Ctrl + F5)

Starts the debugging process and runs until one of the following conditions occur: the line of cursor is reached, a valid breakpoint is reached or end of execution.

Run to end (Alt + F5)

Runs the transformation until the end, without taking into account any enabled breakpoints that might be set.

Pause (Shift + F6)

Interrupts the current transformation. This is useful for long transformations (Docbook for instance) when you want to find out what point the transformation has reached. The transformation can be resumed after.

Stop (F6)

Ends the transformation process.

Information views

The information view is comprised of two panes that are used to display various types of information used to understand the transformation process. For each information type there is a corresponding tab. While running a transformation, relevant events are displayed in the various information views. This enables the developer to obtain a clear view of the transformation progress. Using the Debug controls developers can easily isolate parts of stylesheet therefore they may be understood and modified. The information types include (for a more detailed discussion on each information type see Viewing processing information):

Right side information views

Multiple output documents in XSLT 2.0

For XSLT 2.0 stylesheets that store the output in more than one file by using the xsl:result-document instruction the content of the file created in this way is displayed dynamically while the transformation is running in an output view. There is one view for each xsl:result-document instruction so that the output of different instructions is not mixed but is presented in different views.

Figure 7.3. Multiple output documents in XSLT 2.0

Multiple output documents in XSLT 2.0