
Is it possible to run a transformation scenario from the command line? [Mac OS X - make based builds] The reason I want to do this, is typesetting a programming book, where xinclude files are generated from source code, marked up with special comments
I don't quite follow the details of your reason for wanting to do this, and as we've just learned from Sorin, you can't actually run a transformation scenario from the command line. That said, I run transformations (including XInclude) from the command line, a bash script, or occasionally a make file almost every day. (Mostly on Mac OS X.) E.g.: $ xmllint --xinclude --noent ingredients.xml | xsltproc bake.xslt - > /tmp/bread.xml OR, equivalently $ xsltproc --xinclude bake.xslt ingredients.xml -o /tmp/bread.xml OR, almost equivalently, for XSLT2 $ saxon -xi:on -xsl:bake.xslt -s:ingredients.xml -o:/tmp/bread.xml Although in truth, I often have to operate on multiple files at once (whitespace added for readability): $ for f in ingredients/*.xml ; do echo "---------$f:" ; xsltproc --xinclude bake.xslt $f > /tmp/baked/$f ; done OR, for XSLT2 $ saxon -xi:on -xsl:bake.xslt -s:ingredients/ -o/tmp/baked/ HTH