# Transforming Data Using XQuery

Data transformation is the mapping and conversion of data from one format to another. This section describes how to build a data transformation using the mapper functionality of WebLogic Workshop. To transform data using an existing eXtensible Stylesheet Language Transformation (XSLT), see Transforming Data Using XSLTs.

The mapper functionality of WebLogic Workshop enables the conversion of data of different types. For example, XML data can be transformed from XML data valid to one XML Schema to another XML document valid to a different XML Schema.

The source types and target type of a data transformation can be any of the following data types:

- XML Data
- Non-XML Data
- Java Primitives
- Java Classes—To learn more, see Using Java Classes in Transformations.

A data transformation can have multiple input sources but only one output target. For example you can transform data from three input data sources to one target source, as shown in the following figure.

This section describes how to use the mapper functionality of WebLogic Workshop to create a data transformation graphically. From this graphical representation of a data transformation, WebLogic Workshop generates a query. The query is written in the XQuery language—a language defined by the W3C that provides a vendor independent language for the query and retrieval of XML data.

This section contains the following topics:

- Creating Schemas Projects
- Importing Schemas
- Creating a Transformation File and a Transformation Method
- Selecting Source and Target Types
- Creating Maps
- General Steps to Open or Create a Query in the Mapper
- Viewing and Editing the Generated Code of Maps
- Testing Maps in the Test View
- Link Representations
- Modifying Links Using the Target Expression Tab
- Using the Constraints Tab
- Using Java Classes in Transformations
- The Association Between XQ and DTF Files
- Using the Data Palette of the Mapper
- Validating
- Using the Property Editor of the Mapper
- XML Global Elements, Global Types, and Local Elements

Related Topics

To learn more about data transformations and for a step-by-step walk through of the mapping functionality, see Tutorial: Building Your First Data Transformation.

For more information and examples on how to use the mapper functionality to constraint or manipulate data see Examples: Manipulating and Constraining Data Using XQuery.

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.