You want to know how to exploit some of the useful extensions available in these popular XSLT implementations.
This recipe is broken into a bunch of mini-recipes showcasing the
most important Saxon and Xalan extensions. For all examples, the
saxon namespace prefix is associated with
http://icl.com/saxon, and the
xalan namespace prefix is associated with
This book has used Saxon’s facility
to output results to more than one file. Saxon uses the
saxon:output element. It also provides the
xsl:document element, but it will only work if the
stylesheet version attribute is 1.1 and is therefore not preferred.
href attribute specifies the output
destination. This attribute can be an attribute value template:
<saxon:output href="toc.html"> <html> <head><title>Table of Contents</title></head> <body> <xsl:apply-templates mode="toc" select="*"/> </body> </html> </saxon:output>
Xalan takes a significantly different approach to multidestination
output. Rather than one instruction, Xalan gives you three:
redirect:write. The extension namespace
associated with these elements is
xmlns:redirect = "org.apache. xalan.xslt.extensions.Redirect". For the most
common cases, you can get away with using
redirect:write by itself because if used alone, it
will open, write, and close the file.
Each element includes a file ...