Page 1 of 1

Running multiple transforms.

Posted: Fri Feb 16, 2007 2:23 am
by eof
Problem:
I am using oxygen to generate C & C++ code with many
files being generated from a single XML file using many
XSLTs [1 per file]

To save me a lot of time it would be really useful if there was a way
to script or automate having many transforms applied to an xml file.

Is this possible ?

Eoin ó Fearghail.

Posted: Fri Feb 16, 2007 6:30 pm
by sorin_ristache
Hello,

To apply different transformations to the same XML file with only one action you can create an external tool in Options -> Preferences -> External Tools which will be added in the combo box on the External Tool toolbar so that you can launch it with a click on the toolbar. For example the external tool can be the command line which calls Ant with an Ant build file as parameter. The Ant build file can contain a target with one xslt task per transformation.

I think a better solution is to apply only one XSLT stylesheet which will create all the C/C++ files in one transformation. For this you can use the xsl:result-document in XSLT 2.0 or the builtin extensions of Saxon or Xalan for creating more than one output file in a transformation.


Regards,
Sorin