1

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.

Captain Normal
  • 441
  • 4
  • 14

1 Answers1

2

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.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164