Creating a new file with output in XSL
Sometimes its useful to create several files from one huge input XML file. To do this in version 1.0 you have to make use of extensions in your XSL processor.
XSL 1.0
Section titled “XSL 1.0”Use the saxon:output command
<saxon:output method="xml" href="articles.xml"> <fishtank> <fish>Green fish</fish> <fish>Blue Fish</fish> </fishtank></saxon:output>XSL 2.0
Section titled “XSL 2.0”Finally you do not have to rely on extensions but can use official XSL to do this.
<xsl:result-document href="articles.xml"> <fishtank> <fish>Green fish</fish> <fish>Blue Fish</fish> </fishtank></xsl:result-document>xsl:output attributes
Section titled “xsl:output attributes”encoding
Section titled “encoding”When outputting HTML you can set this to US-ASCII. This might help if you see strange chars such as  in your output.