As more and more information is either stored in XML, exchanged in
XML, or presented as XML through various interfaces, the ability to
intelligently query our XML data sources becomes increasingly
important. XML documents are structured documents – they blur the
distinction between data and documents, allowing documents to be
treated as data sources, and traditional data sources to be treated as
documents.
XQL is a query language designed specifically for
XML. In the same sense that SQL is a query language for relational
tables and OQL is a query language for objects stored in an object
database, XQL is a query language for XML documents. The basic
constructs of XQL correspond directly to the basic structures of XML,
and XQL is closely related to XPath, the common locator syntax used by
XSL and XPointers. Since queries, transformation patterns, and links
are all based on patterns in structures found in possible XML
documents, a common model for the pattern language used in these three
applications is both possible and desirable, and a common syntax to
express the patterns expressed by that model simplifies the task of the
user who must master a variety of XML-related technologies. Although
XQL originated before XSL Patterns, there were strong similarities
between the two languages, and we have adopted XPath syntax for the
constructs which differed. Not all constructs found in XPath were
needed for queries, and some constructs used in XQL are not found in
XPath, but the two languages share a common subset.
The XQL
language described in this paper contains several features not found in
previously published versions of the language, including joins, links,
text containment, and extensible functions. These new features are
inspired in large part by discussions stemming from the W3C QL '98
Workshop, and make it possible to combine information from
heterogeneous data sources in powerful ways. Great care has been made
to maintain the fundamental simplicity of XQL while adding these
features.
This paper is intended as input for the upcoming W3C Query Language Activity, and for the further development of XPath.
Read More