# Link Representations

A data link directly transforms data from a source node to a target node. For example the following figure shows a data link between the priceQuote/customerName element and the quote/name element.

Both priceQuote/customerName and quote/name are XML String elements. During run-time, the data from the priceQuote/customerName element is converted to the quote/name element as shown in the preceding figure.

The data link between these two elements is represented by a blue line in the mapper functionality of WebLogic Workshop as shown in the following figure:

If you modify the XQuery code linking these two elements, the link between these elements changes from a data link (represented as a blue line) to an implied link (represented as a light gray line) as show in the following figure.

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

For an example of modifying the XQuery code between elements, see the task: To Edit and Retest the Simple Query in the Step 3: Mapping Elements and Attributes in the Tutorial: Building Your First Data Transformation.

The following table summaries the different link representations.

Link Type | Is the Link a Mapper Generated Link? | Description | Is the Link Currently Selected in the Mapper? | Representation of Link
--- | --- | --- | --- | ---
Data Link | Link is generated by dragging-and-dropping. | A link that converts the value of the source node directly to the value of the target node. | Not Selected |
Selected |
Structural Link | Link is generated by dragging-and-dropping. | A link between two parent structures that does not map data directly. | Not Selected |
Selected |
Data Structural Link | Link is generated by dragging-and-dropping. | A data structural link is the combination of the following two links: A data link between two nodes—a link that converts the value of the source node directly to the value of the target node. A structural link—a link between two structures. Example: The link between the optional child nodes of a repeating element. | Not Selected |
Selected |
Constraint Link | Link is generated by dragging-and-dropping. | A link that constrains or limits the resulting data of a join between source parent structures. The constraint link is created with created with two source nodes. Example: You could add a constraint link to a join of two source repeating elements to only return the data when the values of a particular source element are equal to each other. To learn more, see Creating a Conditional Constraint Using the Constraints Tab. | Not Selected |
Selected |
Copy Link | Link is generated by dragging-and-dropping | A link between two identical schema substructures. During run time, the source data is directly copied as a block to the target data. A copy link is also generated when mapping between a untyped XML node and a typed XML complex-type node. | Not Selected |
Selected |
Implied Link | Link between the nodes is created by writing new XQuery or modifying existing XQuery code. | A link whose XQuery code can not be interpreted by the mapper to be another type of link. Examples: A data link that was modified using the General Expression section of the Target Expression tab or the Source View of the mapper. (For example, adding the xf:upper-case function to a link. To learn more see Invoking Functions or Operators in a Query.) The data links generated between a second set of child nodes when a union constraint has been applied a set of two structural links. The child nodes must be of the same subschema. To learn more see Using the Union Option of the Constraints Tab. | Not Selected |
Selected |

### Link Menu Options

This section describes the menu options available with links in the Design View of the mapper, as shown in the following table.

Menu Option | Invoke by . . . | Result . . .
--- | --- | ---
Delete All Links | In the Design View of the mapper, right-click on an empty section between the Source and Target panes and from the drop-down menu select Delete All Links. Note: Right-clicking on an empty section between the Source and Target panes causes all the nodes to be unselected. | In the Design View, the graphical representations of all the links are deleted and in the Source View the generated XQuery code linking the source nodes to the target nodes is deleted.
Induce Map | In the Design View of the mapper, right-click on a structural link and from the drop-down menu select Induce Map. Note: This menu option is only available when a structural link is selected in the Design View of the mapper. | Data links or data structural links will be created between the child nodes of the selected structural link if source and target child elements of the link are the same subschema type. The target and source child elements must have the same name, must be the data types, and must be in the same order for the Induce Map option to create child links.
View Code | In the Design View of the mapper, right-click on a link and from the drop-down menu select View Code. | The view changes from the Design View to the Source View and generated XQuery code between the links is displayed. The XQuery code for the selected link is highlighted in yellow.
Disable Target Node | In the Design View of the mapper, right-click on a link and from the drop-down menu select Disable Target Node. | Blocking XQuery code is added around the XQuery code of the selected link that prevents the XQuery code for the link from being executed during run time (either from the Test View or invoked from a JPD.)
Enable Target Node | In the Design View of the mapper, right-click on a disabled link and from the drop-down menu select Enable Target Node. | The blocking XQuery code is removed around the selected link. During run time, the XQuery code for the link is executed.
Delete Link | In the Design View of the mapper, right-click on a selected link and from the drop-down menu select Delete Link. | In the Design View, the graphical representations of the selected link is deleted and in the Source View the generated XQuery code linking the source node to the target node is deleted.