An initial working draft specification for the XML Path Language (XPath) 2.0 has been prepared jointly by members of the W3C XML Query Working Group and W3C XSL Working Group. XPath 2.0 defines "a language for addressing parts of an XML document, and has been derived from both XPath 1.0 and XQuery. The XPath 2.0 and XQuery 1.0 Working Drafts are generated from a common source. These languages are closely related, sharing much of the same expression syntax and semantics, and much of the text found in the two Working Drafts is identical. The primary purpose of XPath is to address parts of an XML document. XPath uses a compact, non-XML syntax to facilitate use of XPath within URIs and XML attribute values. XPath operates on the abstract, logical structure of an XML document, rather than its surface syntax. This logical structure is known as the data model, and is described in the W3C XQuery 1.0 and XPath 2.0 Data Model documents. XPath gets its name from its use of a path notation as in URLs for navigating through the hierarchical structure of an XML document."
Bibliographic information: XML Path Language (XPath) 2.0. W3C Working Draft 20-December-2001. Edited by Anders Berglund (XSL WG), IBM Research; Scott Boag (XSL WG), IBM Research; Don Chamberlin (XML Query WG), IBM Almaden Research Center; Mary F. Fernandez (XML Query WG), AT&T Labs; Michael Kay (XSL WG), Software AG; Jonathan Robie (XML Query WG), Software AG; Jérôme Siméon (XML Query WG), Bell Labs, Lucent Technologies. Version URL: http://www.w3.org/TR/2001/WD-xpath20-20011220. Latest version URL: http://www.w3.org/TR/xpath20.
From the working draft:
XPath is designed to be embedded in a host language such as XSLT 2.0 or XQuery. XPath has a natural subset that can be used for matching (testing whether or not a node matches a pattern); this use of XPath is described in XSLT 2.0. XQuery Version 1.0 contains XPath Version 2.0 as a subset. Any expression that is syntactically valid and executes successfully in both XPath 2.0 and XQuery 1.0 will return the same result in both languages. Since these languages are so closely related, their grammars and language descriptions are generated from a common source to ensure consistency, and the editors of these specifications work together closely.
XPath also depends on and is closely related to the following specifications: (1) The XPath data model defines the information in an XML document that is available to an XPath processor. The data model is defined in XQuery 1.0 and XPath 2.0 Data Model. (2) The static and dynamic semantics of XPath are formally defined in XQuery 1.0 Formal Semantics. This is done by mapping the full XPath language into a 'core' subset for which the semantics is defined. This document is useful for implementors and others who require a rigorous definition of XPath. (3) The library of functions and operators supported by XPath is defined in XQuery 1.0 and XPath 2.0 Functions and Operators.
The basic building block of XPath is the expression. The language provides several kinds of expressions which may be constructed from keywords, symbols, and operands. In general, the operands of an expression are other expressions. XPath is a functional language which allows various kinds of expressions to be nested with full generality. It is also a strongly-typed language in which the operands of various expressions, operators, and functions must conform to designated types.
- XML Path Language (XPath) 2.0. W3C Working Draft 20-December-2001.
- XQuery 1.0 and XPath 2.0 Data Model
- XSL Transformations (XSLT) Version 2.0
- XQuery 1.0 Formal Semantics
- XQuery 1.0 and XPath 2.0 Functions and Operators
- XSL Working Group
- XML Query Working Group
- Mailing list archives for 'www-xpath-comments'. Send comments to email@example.com.
- "XML Linking Language" - Main reference page.