5 Introduction

This chapter provides an overview of the Oracle XQuery Mapper.

Oracle XQuery Mapper is a graphical mapping tool that enables you to transform data between XML, non-XML, and Java data types, allowing you to integrate heterogeneous applications rapidly. For example, you can package data transformations in Oracle WebLogic Integration (WLI) as controls and reuse the controls in multiple business processes and applications. You can also use .xq files created in XQuery Mapper as resources in Oracle Service Bus.

The output of XQuery Mapper is a query in the XQuery language, which is defined by the World Wide Web Consortium (W3C). For more information about W3C and the XQuery language, see http://www.w3.org/XML/Query/.

5.1 Overview of XQuery Mapper

You can use XQuery Mapper to transform data between XML, non-XML, and Java data types. For example, XML data that is valid against one schema can be converted to XML that is valid against a different schema. The data can be based on XML schemas, Web Service Definition Language (WSDL) file, and Message Format Language (MFL) files.

When you select the Simple source type, you can transform standard schema types, such as boolean, byte, double, float, int, long, short, String, and Date, to any other required target data format.

A data transformation can have multiple input types, but only one target type. For example, data can be transformed from two sources to one target, as shown in the following figure.

Figure 5-1 Data Transformation from Multiple Sources to One Target

Description of Figure 5-1 follows
Description of "Figure 5-1 Data Transformation from Multiple Sources to One Target"

5.2 Support for XQuery 2002 and 2004

Oracle Service Bus supports data transformation for the following versions of XQuery:

  • XQuery 2004: Graphical design view (XQuery Mapper), source view, and test view.

  • XQuery 2002: Source view and test view.

    Note:

    For XQuery 2002-compliant XQuery files, the source view does not show compilation errors.

When you open an XQuery 2002-compliant XQuery file, it opens automatically in the XQuery 2002 Transformation Editor, which has Source and Test views, but no Design view.

5.2.1 Restrictions Applicable to the XQuery Test View

Table 5-1 describes restrictions in XQuery test view.

Table 5-1 Restrictions Applicable to the XQuery Test View

Restriction Applicable to XQ2002? Applicable to XQ2004?

If an XQuery calls a Java user function, the Java method must be static.

Yes

Yes

If an input Java type argument to an XQuery is an abstract class or an interface, the test view can not process it. An error message is displayed in the results view.

Yes

No

The input Java type and its member variables (except those of type primitive, String, java.sql.Date and java.util.Date) must follow the standard Java Bean guidelines.

Yes

No