When you enable back-mapping via the tool bar button, XSLT transformations will be carried out so that the result document can be mapped back on to the originating XSLT+XML documents. This means that when you click on a node in the result document, the XSLT instruction and the XML source data that generated that particular result node will be highlighted.
The back-mapping button also gives you the option to automatically tile the source, XSLT/XQuery, and result documents after transformation for easy review, as shown to the right.
You can click the transformed output in either text or browser view to back-map. What’s more, when you view the HTML output in Browser view, you can simply mouse-over the desired section and XMLSpy will automatically highlight the source XML node and XSLT expression.
Back-mapping in XMLSpy is revolutionary in two ways.
First, it will save you incredible amounts of time in debugging, refining, and perfecting your code as well as understanding inherited code written by other team members.
Second, XMLSpy does not make any changes or add additional code to the output document in order to achieve back-mapping!
For more indepth testing, you can use the XMLSpy XSLT Debugger.
The XSLT debugger includes a three-panel interface that displays the XML document, the associated XSLT stylesheet, and the output document as it is being built in real-time. Below the three panels, Context and Callstack information windows include multiple tabs that supply all the necessary debugging information.
The XSLT debugger allows you to move through the transformation step-by-step, and you can step into, step out, and step over nodes. It highlights the current instruction in the XSLT and the current node in the XML file, and produces output for each step, highlighted in the output pane. Seeing all three factors at the same time provides you with an immediate visual understanding of the way that your code is rendering the XML data.
As you’re debugging a stylesheet, the XSLT debugger presents you with several useful pieces of information. To supplement the information shown in the output pane and Trace window, the debugging information windows display additional important details in the Context Window:
Tabs in the Call Stack info window include: