A public review W3C Working Draft has been published for XQuery 1.0 Formal Semantics, providing the formal semantics of W3C XQuery as specified in XQuery 1.0: A Query Language for XML. "XQuery is a computer language designed to return information to users or their agents. It is applicable to XML data sources from documents to databases, search engines, and object repositories. Much of the WD document is the result of joint work by the W3C XML Query and XSL Working Groups, which are jointly responsible for XPath 2.0, a language derived from both XPath 1.0 and XQuery. The new document defines the formal semantics for XQuery 1.0, and a future version of the document will also define the formal semantics for XPath 2.0. XQuery is a powerful language, capable of selecting and extracting complex patterns from XML documents and of reformulating them into results in arbitrary ways. This document defines the semantics of XQuery by giving a precise formal meaning to each of the constructions of the XQuery specification in terms of the XQuery data model. The document assumes that the reader is already familiar with the XQuery language. Two important design aspects of XQuery are that it is functional (built from expressions, called queries, rather than statements) and typed. 'Types' can be imported from one or several XML Schemas (typically describing the documents that will be processed), and the XQuery language can then perform operations based on these types. In addition, XQuery also supports a level of static type analysis. This means that the system can perform some inference on the type of a query, based of the type of its inputs... These two aspects play an important role in the XQuery Formal Semantics."
Bibliographic information: XQuery 1.0 Formal Semantics. W3C Working Draft 26-March-2002. Version URL: http://www.w3.org/TR/2002/WD-query-semantics-20020326/. Latest version URL: http://www.w3.org/TR/query-semantics/. Previous version URL: http://www.w3.org/TR/2001/WD-query-semantics-20010607/; also http://www.w3.org/TR/2001/WD-query-algebra-20010215/. Edited by Denise Draper (XML Query WG), Nimble Technology; Peter Fankhauser (XML Query WG), Infonyte GmbH; Mary Fernández (XML Query WG), AT&T Labs - Research; Ashok Malhotra (XML Query and XSL WGs), Microsoft; Kristoffer Rose (XSL WG), IBM Research; Michael Rys (XML Query WG), Microsoft; Jérôme Siméon (XML Query WG), Lucent Technologies; Philip Wadler (XML Query WG), Avaya.
From the Introduction: "This document defines the formal semantics of XQuery. The present document is part of a set of documents that together define the XQuery 1.0 language:
- XQuery 1.0: A Query Language for XML introduces the XQuery 1.0 language, defines its capabilities from a user-centric view, and defines the language syntax.
- XQuery 1.0 and XPath 2.0 Data Model formally specifies the data model used by XQuery to represent the content of XML documents. The XQuery language is formally defined by operations on this data model.
- XQuery 1.0 and XPath 2.0 Functions and Operators lists the functions and operators defined for the XQuery language and specifies to which arguments they can be applied and what the result should be."