Tools for debugging xslt

Jonathan Adelson picture Jonathan Adelson · Oct 20, 2008 · Viewed 32.5k times · Source

I have a Java servlet which generates xml, translates it with an xslt stylesheet, and then displays the resulting HTML. This is the first time I've worked with xslt. What's a good way to debug xslt? I have (or can get) some sample XML files to apply the transform too. But I'm not really even sure of the syntax so something that would give me syntax warnings would be great.

Answer

chiborg picture chiborg · Feb 23, 2010

If you want to do "printf-style" debugging and don't want to litter your output with debugging data, use the <xsl:message> tag to generate debugging output while processing the stylesheet. With the terminate="yes" attribute you can even halt the processing of the stylesheet.