|
Perhaps the most obvious way to shorten stylesheets is to move repeated logic or code bits out into named templates. This can often dramatically shorten a stylesheet, and of course also contributes to its legibility.
Another trick is to inline templates whenever possible. That is, rather than keep something in a separate <xsl:template match="whatever">... you can just inline it through judicious use of <xsl:when> and <xsl:foreach>. Again, this also helps greatly to make the stylesheets more readable.
|