Running transformation scenario

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 ------------------------------------------- Engineers supporting greenpeace: Comparable to Afroamericans who wants to join the Ku Klux Klan ---------------------------------------- Tommy Nordgren tommy.nordgren@comhem.se

Hello, Sorry, a transformation scenario cannot be executed from a command line. It is not just a problem of saving some scenario parameters to an Ant file or Make file and run the commands saved in the file. For example in your case you have to set an XInclude aware parser configuration to the XML parser that reads the book from disk. We will consider creating a script from a scenario that can be executed from a command line. Maybe you can try to create an Ant script with the parameters that you set in the Oxygen scenario. You can find an XInclude task for Ant at: http://people.freebsd.org/~znerd/xinclude-task/ Regards, Sorin Tommy Nordgren wrote:
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 ------------------------------------------- Engineers supporting greenpeace: Comparable to Afroamericans who wants to join the Ku Klux Klan ---------------------------------------- Tommy Nordgren tommy.nordgren@comhem.se

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

I very much like Sorins and Tommy's idea, as i know my transformation scenarios to work but have to spend time to develop ant build file and making sure the 2 are in sync. I oxygen could (to some degree) help this process the would be highly appreciated and in our organization seen as a plus. its one thing to click a scenario together, its a whole different ball game to write one from scratch. just my 2 cents bram On 12 May 2009, at 23:03, Syd Bauman wrote:
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
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (4)
-
Bram Vogelaar
-
Sorin Ristache
-
Syd Bauman
-
Tommy Nordgren