# XQuery and XQSE Developer’s Guide

# Introducing the Oracle Data Service Integrator XQuery Engine

This chapter briefly introduces the Oracle Data Service Integrator XQuery language and describes the version of the XQuery specification implemented in Oracle Data Service Integrator. Links to more information about XQuery are also provided.

The following topics are covered:

- XML and XQuery
- XQuery Use in Oracle Data Service Integrator
- Supported XQuery Specifications
- Learning More About the XQuery Language

## XML and XQuery

XML is an increasingly popular markup language that can be used to label content in a variety of data sources including structured and semi-structured documents, relational databases, and object repositories. XQuery is a query language that uses the structure of XML to express queries against data, including data physically stored in XML or transformed into XML using additional software. XQuery is therefore a language for querying XML-based information.

The relationship between XQuery and XML-based information is similar to the relationship between SQL and relational databases. Developers who are familiar with SQL will find XQuery to be conceptually a natural next step.

The W3C Query Working Group used a formal approach by defining a data model as the basis for XQuery. XQuery uses a type system and supports query optimization. It is statically typed, which supports compile-time type checking.

However, unlike SQL, which always returns two-dimensional result sets (rows and columns), XQuery results can conform to a complex XML schema. An XML schema can represent a hierarchy of nested elements that represent very detailed and complicated business data and information.

## XQuery Use in Oracle Data Service Integrator

Oracle Data Service Integrator models the contents of various types of data sources as XML schemas. After you have configured Oracle Data Service Integrator access to the data sources you want to use, such as relational databases, Web Services, application views, data views, and so on, you can issue queries written in XQuery to Oracle Data Service Integrator. Oracle Data Service Integrator evaluates the query, fetches the data from the underlying data sources, and returns the query results.

For more information on developing data service XQueries see the Data Services Developer’s Guide.

## Supported XQuery Specifications

Table 1-1 lists the XQuery and XML specifications with which the Oracle implementation complies.

Table 1-1 Supported XQuery and XML Standards
Topic | Specification
XQuery 1.0 and XPath 2.0 Data Model | The XQuery and XPath data model implementation is based on the following specification: http://www.w3.org/TR/2004/WD-xpath-datamodel-20040723/
XQuery 1.0 Specification | The Oracle XQuery engine implements XQuery 1.0 based on the following specification: http://www.w3.org/TR/2004/WD-xquery-20040723/
XQuery 1.0 and XPath 2.0 Functions and Operators | The Oracle XQuery engine implements functions and operators based on the following specification: http://www.w3.org/TR/2004/WD-xpath-functions-20040723/ For information about Oracle extensions implemented in Oracle Data Service Integrator, see “Oracle XQuery Language Implementation” on page 2-51.

## Learning More About the XQuery Language

You can learn more about XQuery and related technologies at the following locations:

- XQuery

- http://www.w3.org/XML/Query

- XML Schema

- http://www.w3.org/XML/Schema