If you're using the command line option to process an entire directory, you can control the filename extension of the output files by setting
<xsl:output method="html" media-type="text/html"/>
within the stylesheet.
A more flexible way to process a batch of input files is using the collection() function: see
This allows your stylesheet to iterate over selected files in a directory (optionally recursing into its subdirectories). For each one, you can create a corresponding output file using <xsl:result-document>
Michael Kay

From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Mark Evans
Sent: 10 July 2006 02:18
To: saxon-help@lists.sourceforge.net
Subject: [saxon] batch conversion to html


I'm hoping someone can help with this technical question. I am new to XSL and Saxon.

I want to use Saxon to batch-convert a folder of xml files to html. I have successfully converted a single file. I have also successfully converted a folder of xml files. The batch output files were converted correctly, in that they were valid HTML. The problem is that the file name extension of the converted files was .xml instead of .html.

How can I change the file name extension while doing a batch transformation?