<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="../../_utils/stylesheets/admin-tei.css"?>
<?oxygen RNGSchema="../schema/handout.rnc" type="compact"?>
<!-- To generate XHTML for browsing use the stylesheet at
  ../../_utils/stylesheets/admin.xslt. The command would be
  $ saxon [this_file].xml ../../_utils/stylesheets/admin.xslt > [output-file].xhtml
  presuming you have a "saxon" front-end that does the right thing.
  Could also add
  out-SystemLiteral=/Applications/oxygen/frameworks/xhtml/dtd/xhtml1-strict.dtd
  if desired.
-->
<TEI xml:lang="en-US" xmlns="http://www.tei-c.org/ns/1.0" version="P5.1.0.1">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>XSLT Workshop: Creating a Transformation Scenario in oXygen (version 14)</title>
        <author xml:id="mholmes">Martin Holmes</author>
      </titleStmt>
      <publicationStmt>
        <p>An unpublished document used for training.</p>
        <p>Available under GFDL, no invariant sections</p>
        <p>Copyleft 2013 Martin Holmes</p>
      </publicationStmt>
      <sourceDesc>
        <p>Born digital. Screenshots from oXygen.</p>
      </sourceDesc>
    </fileDesc>
    <revisionDesc>
      <change when="2013-03-12" who="#mholmes">
	<list>
	  <item>Created the document</item>
	</list>
      </change>
    </revisionDesc>
  </teiHeader>
  <text>
    <body>
      <div type="section">
        <head>What is a transformation scenario?</head>
        <p>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:</p>
        
        <list>
          <item>An input file (this is optional)</item>
          <item>An XSLT file</item>
          <item>An XSLT engine to do the work</item>
          <item>An output file pattern</item>
          <item>An action to take when the transformation is complete (such as opening the result in a browser)</item>
        </list>
        
      </div>

      <div type="section">
        <head>Getting started</head>
        <p>&#160;</p>
        <figure>
          <graphic url="../../_utils/gfx/trans_scen_ox_14_01.png" mimeType="image/png" width="332px" height="56px" />
          <!--<figDesc>Click on the toolbar button to configure the transformation scenario.</figDesc>-->
        </figure>

        <p>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:</p>
        
        <figure>
          <graphic url="../../_utils/gfx/trans_scen_ox_14_02.png" mimeType="image/png" width="641px" height="535px" />
          <!--<figDesc>Transformation scenarios available.</figDesc>-->
        </figure>
        
        <p>Click on the "New" button to create your new scenario.</p>
        
      </div>
      
      <div type="section">
        <head>Specify the scenario name, the XSLT file and the processor</head>
        <p>&#160;</p>
        <figure>
          <graphic url="../../_utils/gfx/trans_scen_ox_14_03.png" mimeType="image/png" width="625px" height="565px" />
          <!--<figDesc>Configuring the XSLT component of the scenario.</figDesc>-->
        </figure>
        
        <p>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.</p>
      </div>
      
      <div type="section">
        <head>Configure the output</head>
        <p>&#160;</p>
        <figure>
          <graphic url="../../_utils/gfx/trans_scen_ox_14_04.png" mimeType="image/png" width="624px" height="563px" />
          <!--<figDesc>Configuring the output component of the scenario.</figDesc>-->
        </figure>
        
        <p>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.</p>
      </div>
      
      <div type="section">
        <head>Using your scenario</head>
        <p>&#160;</p>
        <figure>
          <graphic url="../../_utils/gfx/trans_scen_ox_14_05.png" mimeType="image/png" width="648px" height="498px" />
          <!--<figDesc>Using your transformation scenario.</figDesc>-->
        </figure>
        
        <p>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:</p>
        
        <figure>
          <graphic url="../../_utils/gfx/trans_scen_ox_14_06.png" mimeType="image/png" width="299px" height="87px" />
          <!--<figDesc>Using your transformation scenario.</figDesc>-->
        </figure>
      </div>
      
    </body>
  </text>
</TEI>
