Running multiple transforms.

Oxygen general issues.
eof
Posts: 1
Joined: Fri Feb 16, 2007 2:19 am

Running multiple transforms.

Post 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.
--
DemonWare
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post 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
Post Reply