Structuring Stylesheets

We've looked at a couple of examples and some basic concepts. I'll now wrap up this portion of the chapter with a few more general issues before looking at some specific techniques you will find useful. One of these general issues relates to the way we structure our stylesheets.

A stylesheet can have more than one xsl:template. In fact, this is probably the norm. In the rule-based programming paradigm, templates can be applied from other templates in a fashion similar to expanding the nonterminal symbols in BNF. In a procedural paradigm, we can break out certain types of processing into a template and call it in much the same way we might call a function in C. We can even pass parameters to an xsl:template, similar to ...

Get Using XML with Legacy Business Applications 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.