batch output file names

2005-07-17
2012-10-08
  • Brock Filer
    Brock Filer
    2005-07-17

    When you give saxon directories for input and output files, it creates output files with an .xml extension. It'd be nice if the extension were based on the xsl:output method attribute instead.

     
    • Michael Kay
      Michael Kay
      2005-07-18

      Yes, I suppose it would. In fact, I think there was a time when I did this, and then it got difficult because xsl:output was changed to allow the method to be computed dynamically; but now it's changed back again... It doesn't help, of course, in the common case where HTML output is chosen by default because the first element output is <html>...

      I'll think about it. I'm reluctant to let this feature get too elaborate; this really needs a more sophisticated control language such as a pipeline processing language.

       
    • Michael Kay
      Michael Kay
      2005-07-18

      I've just looked at the code - should have done that before responding. You should be able to get the suffix ".html" by setting <xsl:output media-type="text/html"/>. I'm not sure why I based it on media-type rather than method, but that's the way it is...

       
    • Brock Filer
      Brock Filer
      2005-07-18

      Yay, I can delete a tmp directory. And thank you for another quick and helpful response.