Defining an XSL transformation

XSL is an industry-standard XML format scripting language. JavaScript can be used to define complex functions.

Some changes to the script will pass validation but the content is not valid for transformation. For example:

  • the source node is removed
  • the content is changed between the source tags <source></source>
  • the content is changed between the target tags <target></target>
  • the complete map is removed <map></map>

Then the source details are removed and the mapping set to Undefined.

  1. Open Transformation Designer.
  2. Select an existing XSL transformation and click Edit Transformation. Or click Create new Transformation and select Script Type as TML.
  3. Select an XSL transformation. The transformation source code is displayed in the Script View. You can click TML Details to edit the transformation in TML mode, but only if the script is valid.
    Note: Any transformation created in XSL view cannot be viewed in TML mapping.

    The script area displays with default content:

    <?xml version='1.0' encoding='utf-8' ?>
    <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
    	<xsl:output method='xml'/>
    	<!– Add templates below –!>
    	<xsl:template match='New Template'>
    		<xsl:apply-templates/>
    	</xsl:template>
    </xsl:stylesheet>
  4. Specify the transformation name and description.
  5. Specify the source and target format.
  6. Optionally, specify other items in the transformation.
    Note: If there are errors in the code, or the code is invalid, you cannot return to the TML Details view.
  7. Click Save to save the transformation.
  8. Validate and test the transformation.