Debugging XSLT Publishing Scripts
Requirements:
- Visual Studio (Preferably 2012)
- The following files in the same directory
- The format definition file you are authoring - links to the sample XSLT file from the XslHandler Use document
- Sample "UberDom" XML file - links to the sample output from the XslHandler
- AssetTrackDelimitedOutput.xslt - This is a file that is a) compiled into the server solution, b) gets included by the format definition file, and c) contains the helper templates used by many of our XSLT recipes
Steps:
- Open Visual Studio
- Open all three files (that are in the same directory) by File > Open > File
- In the format definition file, delete "ami://" from the <xsl:include> tag's URI
- Begin transformation by XML > Start XSLT Without Debugging
- Choose the Sample "UberDom" XML file from the prompt
- Visual Studio will apply the Format Definition XSLT to the Sample "UberDom" XML and show you the output of that XSLT operation.
Notes
- You can set breakpoints in the Format Definition XSLT to see runtime variable values and step through as the XML and XSLT is evaluated.