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:
...
Once you have created a XSL template, you can use it to map elements. On the Manage XSL Template screen, by default the XSL Rules tab is selected. To create a XSL template using the Mapping Rules, click the Mapping Rules tab.
Steps to create an XSL template using the XSL Rules
...
Steps to map elements using an XSL Template
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
- Ensure that the source and target elements to be mapped are selected and displayed in the Mapping Graph Area.
Click the XSL template that you want to use for performing the required function, from the Templates list in the Parameters Panel. A Call XSL Template node is displayed in the Mapping Graph Area (see Figure 518).
Figure 518: Call XSL Template Node
- Create a link from the output of the first Source element to the first input of the Call XSL Template node.
- Create a link from the output of the second Source element to the second input of the Call XSL Template node.
Create a link from the output of the Call XSL Template function node to input of the Target element node (see Figure 519).
Figure 519: Create Links between Nodes for Mapping Elements using XSL Template
- Click Apply Mapping ( ) button. This maps elements using the Call XSL Template function node.