# Examples: Manipulating and Constraining Data Using XQuery

This section provides information and examples on how to use the mapper functionality of WebLogic Workshop to constraint or manipulate data in a transformation, as summarized in the following table.

If You Want to Manipulate Your Data to . . . | As Shown in . . . | To Learn More, See the Following Example . . .
--- | --- | ---
Combine the contents of two different schemas. Subelements of the repeating elements are not merged. | Figure: Combining Data From Different Schemas | Combining Data From Different Schemas
Merge the contents of repeating elements. Subelements of repeating elements are merged. | Figure: Merging the Contents of Repeating Elements | Merging the Contents of Repeating Elements
Combine sets of data of the same type (same schema) into larger sets of data. Subelements of the repeating elements are not merged. | Figure: Combining Sets of the Same Data | Using the Union Option of the Constraints Tab
Combine data and repeating elements based on a passed in key value. | Figure: Merging Data Using a Key Value | Using the Group by Key Fields Option of the Constraints Tab
Add a condition constraint which limits the repeating elements that are returned. | Figure: Using a Conditional Constraint to Merge Data | Creating a Conditional Constraint Using the Constraints Tab
Add a complex condition constraint which limits the repeating elements that are returned. A complex conditional constraint contains two or more conditions joined together one of the following join type: and, or. | Figure: Complex Constraint | Adding a Constraint With Multiple Conditions
Return a different value for target node based on the outcome a simple if-then-else containing a simple condition. | Figure: If-Then-Else | Adding If-Then-Else Constructs to a Link
Return a different value for target node based on the outcome of nested if-then-else(s) with complex conditions. | Figure: Complex If-Then-Else | Adding Nested If-Then-Else Expressions with Complex Conditions to a Link
Convert data from a XML Schema simple type to a complex type. | Figure: Non-Repeating Source Element to Repeating Target Group | Creating a Transformation Between a Non-Repeating Source Element and Repeating Target Group
Convert data from a XML Schema complex type to a simple type. | Figure: Repeating Source Group to Non-Repeating Target Element | Creating a Transformation Between a Repeating Source Group and Non-Repeating Target Element
Create mappings with schemas that have recursive elements. | Figure: Non-Recursive Source Elements to a Recursive Target Element | Using Recursive Schemas in Transformations

Related Topics

To learn more about how to use the mapper functionality of WebLogic Workshop to create a data transformation graphically, see Transforming Data Using XQuery.

For a step-by-step walk through of the mapping functionality, see Tutorial: Building Your First Data Transformation.

To learn about the XQuery language, see the XQuery 1.0: An XML Query Language Specification - W3C Working Draft 16 August 2002 available from the W3C web site at the following URL:

http://www.w3.org/TR/2002/WD-xquery-20020816/

The WebLogic XQuery engine which is invoked by the Transformation method conforms to the August 16, 2002 draft of the XQuery Specification.

To learn more about XML and XML Schemas, see Java and XML Basics.