How to Create an XSL Map File in Oracle Mediator

The XSLT Map Editor enables you to create an XSL file to transform data from one XML schema to another in Oracle Mediator. After you define an XSL file, you can reuse it in multiple routing rule specifications. This section provides an overview of creating a transformation map XSL file with the XSLT Map Editor.

The XSLT Map Editor is available from the Applications window in Oracle JDeveloper by clicking an XSL file or from the Mediator Editor by clicking the transformation icon, as described in the following steps. You can either create a new transformation map or update an existing one.

To launch the XSLT Map Editor from the Mediator Editor and create or update a data transformation XSL file, follow these steps.

To create an XSL map file in the Mediator Editor:

  1. Open the Mediator Editor.
  2. To the left of Routing Rules, click the + icon to open the Routing Rules panel.

    The transformation map icon is visible in the routing rules panel.

  3. To the right of the Transform Using field shown in Figure 41-6, click the appropriate transformation map icon to open the Transformation Map dialog.

    The appropriate Transformation Map dialog displays with options for selecting an existing transformation map (XSL) file or creating a new map file. For example, if you select the transformation map icon in the Synchronous Reply section, the dialog shown in Figure 41-7 appears.

    Figure 41-7 Reply Transformation Map Dialog

    Description of Figure 41-7 follows
    Description of "Figure 41-7 Reply Transformation Map Dialog"

    If the routing rule includes a synchronous reply or fault, the Reply Transformation Map dialog or Fault Transformation Map dialog contains the Include Request in the Reply Payload option. When you enable this option, you can obtain information from the request message. The request message and the reply and fault message can consist of multiple parts, meaning you can have multiple source schemas. Callback and callback time-out transformations can also consist of multiple parts.

    Each message part includes a variable. For a reply transformation, the reply message includes a schema for the main part (the first part encountered) and an in.partname variable for each subsequent part. The include request message includes an initial.partname variable for each part.

    For example, assume the main reply part is the out1.HoustonStoreProduct schema and the reply also includes two other parts that are handled as variables, in.HoustonStoreProduct and in.HoustonStoreProduct2. The request message includes three parts that are handled as the variables initial.expense, initial.expense2, and initial.expense3. Figure 41-8 provides an example.

  4. Choose one of the following options:
    • Click the Search icon to browse for an existing XSLT map file (or accept the default value).

    • Click the Add icon, to create a new XSLT map file, and then enter a name for the file (or accept the default value).

      If the source message in the WSDL file has multiple parts, variables are used for each part, as mentioned in Step 3. When the target of a transformation has multiple parts, multiple transformation files map to these targets. In this case, Oracle Mediator's transformation dialog has a separate panel for each target part. For example, Figure 41-9 shows a request in which the target has three parts:

    Figure 41-9 Request Transformation Map Dialog

    Description of Figure 41-9 follows
    Description of "Figure 41-9 Request Transformation Map Dialog"
  5. Click OK.

    If you chose to create a new XSLT map, the XSLT Map Editor opens to enable you to correlate source schema elements to target schema elements.

  6. Go to Introduction to the XSLT Map Editor for an overview of using the XSLT Map Editor.