Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected links that should have been relative instead of absolute.

An XSL template is a customized template. If you need to repeatedly perform a set of functions, you can create an XSL template defining those functions, and then later call that XSL template whenever required. For example, if you need to perform addition of two numbers at regular intervals, you can define the addition function in an XSL template. You can then call this XSL template whenever required. 
The XSL Template option enables you to manage XSL templates. You can add, update or delete an XSL template using this option. Once you have added an XSL template, you can use it to map elements. You can also define the scope of an XSL template while creating and saving it. Scope of an XSL Template is the context within which it is defined. An XSL template can be defined in any of the following scope:

...

  1. Click Add Parameters icon from Parameters Panel and select XSL Template option.



  2. Manage XSL Template window will display.



  3. Enter the name of the new XSL template that you want to create in the Name field. This displays the XSL tags in the XSL Template area.
  4. Select the scope of the XSl Template. The default scope of an XSl Template is Local.


    If you want to save the template as the Global Template, select the Global option. This will save the XSL template as Global XSL template and can be used in any mapping activity. In the Parameters panel, the XSL template will be displayed under the folder hierarchy Templates/Global.

    If you want to save the template within the current user group, select the Group option. This will save the XSL template as Group XSL template and can be used in any mapping activity within the current user group. In the Parameters panel, the XSL template will be displayed under the folder hierarchy Templates/Group.

     

    Info
    You cannot change the scope of a XSL Template once you have saved the XSL template. The respective radio buttons become non-editable thereafter.


  5. Click the Add Parameters button to add parameters for the new XSL template.
  6. Enter the name of the parameter you want to add in the Name field. It also generates the corresponding XSL in the XSL Template editor on the Manage XSL Template screen
  7. Click the Add Param to add the required parameters and click the Add Param icon again to insert a new row. This will add a row immediately next to the row which is currently selected.

     Image Modified

    If you need to delete any row, select the respective row and click the Delete icon.

     
  8. Enter the code for the function that you want to perform, for example, addition of two numbers, in the 'add here' line, in the XSL Template field. The syntax of the addition function would be:
    <xsl:value-of select ="$param1 + $param2"/>

    where:
    value-of is the syntax for the value to be returned
    param1 and param 2 are the defined parameters



  9. Once you have entered the code, click Save. The new XSL template is also displayed under Templates in the Parameters Panel.


...