Skip navigation.
Downloads | Product Documentation | Support

XQuery Developer's Guide

# Introducing the BEA XQuery Engine

This chapter briefly introduces the XQuery language and describes the version of the XQuery specification implemented in BEA Liquid Data for WebLogic. Links to more information about XQuery are also provided.

The following topics are covered:

- XML and XQuery
- XQuery Use in Liquid Data
- 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 Liquid Data

Liquid Data models the contents of various types of data sources as XML schemas. Once you have configured Liquid Data 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 Liquid Data. Liquid Data evaluates the query, fetches the data from the underlying data sources, and returns the query results.

For information on developing XQueries in Liquid Data see the Data Services Developer's Guide.

# Supported XQuery Specifications

Table 1-1 lists the XQuery and XML specifications with which the BEA 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 BEA 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 BEA XQuery engine implements functions and operators based on the following specification: http://www.w3.org/TR/2004/WD-xpath-functions-20040723/ For information about BEA extensions implemented in Liquid Data, see BEA XQuery Language Implementation.

# 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