Setting Breakpoints & Tracepoints
Breakpoints halt the XSLT debugger when a particular node, element, or attribute is accessed by an XSLT instruction, allowing you to view the output to that particular point in the transformation. When you start the debugger, the XSLT processor stops at the first breakpoint and displays all data relevant to the node in the debugger info windows.
In contrast to breakpoints, tracepoints do not halt the XSLT debugger. When a tracepoint is hit during an XSLT debugging session, the instruction is executed, and information is written to the Trace window. Once the transformation is complete, the trace window displays the list of tracepoints as well as the output produced by each. This allows you to view exactly how each XSLT instruction is executed.
- Open the XSLT File in Altova XMLSpy Edito
- Specify the output XML file
- Insert break point/Trace point at desired node, attribute or element
- Review the output in output window
- To debug the XSLT, you will need the output XML file. So edit the search core result web part
- Click on XSL Editor under ‘Display Properties’
- Copy-Paste following code in editor:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- Copy the output and save it in an XML File say output.xml
- Open the XSLT file with Altova XMLSpy editor
- Set breakpoint/trace point to attribute/node/element
- Click on XSL/Query menu and select Start Debugger/Go
- Specify the output.xml file location
- Start debugging!!!!