XSLT Workshop: Creating a Transformation Scenario in oXygen (version 14)

What is a transformation scenario?

A transformation scenario is like a macro which enables you to run an XML file quickly through an XSLT transformation, save the resulting output, and then view it in an appropriate program such as a browser. So in a transformation scenario, you specify:

Getting started

 

Click on the toolbar button to configure the transformation scenario. You’ll see this dialog box, showing all the transformation scenarios that are available now:

Click on the "New" button to create your new scenario.

Specify the scenario name, the XSLT file and the processor

 

Give your transformation a name, then navigate to the XSLT file you want to use to do the transformation. Finally, make sure you select Saxon 9 as your transformer. The minor version may vary, but you want to use version 9 or above, not an older version.

Configure the output

 

Choose the Output tab, then specify the name to save the file to. In the screenshot, you see ${cfn}.htm; this means "use the same file path and name as the input file, but give it an extension of .htm". This is appropriate if (for instance) you are transforming an XML file into XHTML. Next, select the "Open in browser" option so that you can see the result in your browser automatically. Finally, press "OK" to save your scenario into the list.

Using your scenario

 

You should now see your scenario in the list of scenarios available. You can run it immediately by clicking on "Transform now", or you can use the scenario on the XML file you happen to be working on by clicking on the appropriate button in the toolbar: