
XML DEVELOPER
Say hello to XPath 2.0
Ed Tittel 03.28.2007
Rating: -3.83- (out of 5)




|
Amidst the many new recommendations approved by the W3C on January 23, 2007, you'll find a brand spanking new version of XPath—namely, 2.0—to ponder. Formally entitled TR/xpath20/XML Path Language (XPath) 2.0, this document caps off what some might call the "Holy Trinity" of XML, all of which have been recently revised (or added) of late: XPath 2.0, XQuery 1.0, and XSLT 2.0. In the words of the recommendation itself "XPath 2.0 is an expression language that allows the processing of values conforming to the data model defined in [XQuery/XPath Data Model (XDM)]. The data model provides a tree representation of XML documents as well as atomic values such as integers, strings, and Booleans, and sequences that may contain both references to nodes in an XML document and atomic values. The results of an XPath expression may be a selection of nodes from the input documents, or an atomic value, or more generally, any sequence allowed by the data model."
In somewhat simpler terms this means that XQuery and XPath work together to let XML users locate and interrogate XML documents in general, and to navigate around inside a tree-structured representation of such documents for systematic end-to-end processing. XQuery handes the interrogati
To continue reading for free, register below or login
To read more you must become a member of SearchSOA.com
');
// -->

on, and XPath the navigation. XPath expressions provide a way to address one, some, or all of the nodes in any tree representation of some XML document.
What's different between XPath 1.0 and 2.0 is that XPath 2.0 adds richer data types and gains the ability to access type information that validating documents through XML Schema can provide. In fact, strictly speaking XPath 1.0 is a subset of XPath 2.0, where 80% of the latter comes from the former. The other 20% is what's of greatest interest and includes the following kinds of materials and mechanisms:
I have to agree with Lenz's assertion that XPath 2.0, despite a relatively low percentage of change, is a major reworking of and extension to XPath 1.0. It offers lots of power and capability that XML content developers should find interesting, compelling and useful.
About the author
Ed Tittel is a full-time writer and trainer whose interests include XML and development topics, along with IT Certification and information security topics. Among his many XML projects are XML For Dummies, 4th edition, (Wylie, 2005) and the Shaum's Easy Outline of XML (McGraw-Hill, 2004). E-mail Ed at etittel@techtarget.com with comments, questions or suggested topics or tools for review.
 |

|
|
 |
|
 |