Debugging Style Sheets
Although there are some rudimentary tools available for debugging style sheets, the best method for locating problems is to trace or step through your style sheet. To step through a style sheet, it’s important to understand how a style sheet is executed. Chapter 2 described the data model and showed this process. Chapter 4 also described the process in greater detail.
However, it’s important to remember that template rules are not generally executed in the order you’ve written them. The root template is always executed first. How your other templates are executed depends entirely on how you’ve designed the rest of your style sheet.
In general, I promote the following structure for all style sheets:
<xsl:stylesheet xmlns:xsl=”namespaces ...
Get Special Edition Using XSLT now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.