Creating Maps

To create maps between elements, you must have selected at least one input source schema and the output target schema. For instructions, see To Select the Source and Target Types and To Change the Selected Source or Target Parameters.

  1. Select a Transformation file.
  2. For instructions on creating a Transformation file see To Create a Transformation File From the Menu Bar.

    To select an existing Transformation file:

    1. In the Application tab, expand the folders that contain the Transformation file. (If the Application tab is not visible in WebLogic Workshop, choose View —> Application from the menu bar.)
    2. In the Application tab, double-click the Transformation file (ends in the .dtf extension).
  3. Select a Transformation method from a Transformation file.
  4. For instructions on creating a method in a Transformation file, see To Add a Transformation Method to Transformation File.

    To select an existing method, in the Design View of the Transformation file:

    1. Right-click the arrow representing the method.
    2. From the drop-down menu, select Goto XQuery Document.

    The mapper pane is displayed.

  5. Select the Design View tab.
  6. The selected input source documents are listed in the Source pane and the selected output target document is listed in the Target pane.

    Warning: If a schema is not listed in the Source or Target panes, you will not be able to create links. For instructions to import the schema, see To Select the Source and Target Types and To Change the Selected Source or Target Parameters.

    Note: A schema may not be listed in the Source or Target panes while an application is building. Wait until the build has completed before selecting the schema.

    The Design View displays the a graphical representation of the selected source schemas in the Source pane.

  7. Drag a node from the Source pane to a node in the Target pane.
  8. While dragging a node from the Source pane over nodes in the Target pane, a temporary link (a dashed line) appears between the two nodes. The color of the dotted line changes depending on the compatibility between the source and target node, as shown in the following table:

    The Color of the Dashed Line is . . .
    Means . . .

    Red

    No link can be created between the source node and the target node. The data type of the target node cannot be converted to the data type of the source node. (The link represents a illegal mapping.) For example, a node of data type XML string can not be converted to an XML repeating node. A red error dialog box will be displayed when you drag the source node over the target node.

    Orange

    A link can be created between the source node and the target node but the data types are not completely compatible. An orange warning dialog box describing the incompatibility or any necessary conversion will be displayed when you drag the source node over the target node.

    Green

    A link can be created between the source node and the target node. The data type of the target node is compatible with the data type of the target node.

    Warning: Be careful when creating links between a Java Strings and a typed XML parameters. When the XQuery code, which is generated when you create a map between these two types, is run in the XQuery engine, the result is an empty typed XML target document. The XQuery engine does not parse the String into a typed XML document.

    After the target node has been dropped on the source node, a line representing a link will be displayed. Depending on the target and source nodes, a dashed line or a solid line will be displayed. To learn more, see Link Representations.

  9. Repeat the preceding step until all the desired nodes are mapped.

Note: To learn more about the menu options available for links including information on how to delete links, see Link Menu Options.

Note: Instead of mapping nodes, you can create a constant for a node in Target pane. During run-time, the node will return the value of the constant. This functionality may be useful during the development of your application. For example, you might have the transformation return constants, so you can test the actions that occur after the transformation, before mapping source to target nodes. To create a constant, right-click a node in the Target pane and from the drop-down menu, select Create Constant. In the Constant Value field, enter the value of the constant, and click OK.

Previous Document Next Document