XML technologies / XSLT / Introduction to XSLT 2.0 / Getting started with XSLT and XPath / Stylesheets with multiple templates

(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, Chapter 1.)

The stylesheet examined so far has only one processing rule, activated by the document node. Usually, however, a stylesheet contains multiple template rules. In simple cases, all processing can be performed within one template, but this quickly reaches its limits. Distributing tasks across multiple templates is also simpler and clearer.

Remember:
Each template rule should be kept as simple as possible. This makes debugging a stylesheet easier and also facilitates reusing individual template rules in other stylesheets.

   

   

back to top