Saving the results of a batch transformation

Here should go questions about transforming XML with XSLT and FOP.
akyrios
Posts: 4
Joined: Tue Jul 23, 2013 9:53 pm
Location: Moscow, Idaho

Saving the results of a batch transformation

Post by akyrios »

I must be missing something obvious here. I've transformed about 300 files with an XSLT in project mode, but I can't figure out how to save all the transformed results as a group. Surely I don't have to save them one by one?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Saving the results of a batch transformation

Post by adrian »

Hi,

The results panel from Oxygen is mostly meant for error reporting and output previewing (a few output files at a time).
In short, you cannot save in one step all the transformed results presented in the results panel, but then again, you don't have to.
The solution is to edit and configure the transformation scenario which applies the XSLT to save the output file directly to the file system. This also allows you to provide a proper name for the output files.

To edit the transformation scenario, right click on an input file in the Project view and from the contextual menu pick Transform > Configure Transformation Scenario(s), select the scenario and press Edit (you can do the same in the Transformation Scenarios view: Window > Show View > ...).

In the Output tab select the Save as radio option and in the field provide a pattern for the file path and name. Note that the pattern has to expand to a file path, not a folder.
e.g. ${cfd}/out/${cfn}-out.xml which translates to <current-file-directory>/out/<current-file-name>-out.xml
If you don't need the XML preview in the results panel, you can clear the XML checkbox from the section Show in results view as.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply