1
votes

Is it possible to specify output file extension with Saxon?

When processing multiple input files, the "o:" option specifies the top level target directory. All the generated files have an ".xml" extension. It would be possible to change these with a script, but it would be significantly easier if there was a way to specify the desired extension, command line or from within the XSL file.

1

1 Answers

1
votes

You can get the extension .html or .txt by setting <xsl:output media-type="text/html"/> or text/plain in the stylesheet, but apart from that there's no mechanism for changing the extension. If you want more flexibility, use Saxon's Java API rather than the command line.