Chapter 16. XSLT 2.0 and XPath 2.0

Although XSLT 2.0 and XPath 2.0 are still working drafts at the time of this writing, they are nearing completion, and there are some partial implementations available for these specs, such as Saxon 7.7 (check http://saxon.sourceforge.net for the latest version). This chapter attempts to summarize some of the more interesting features in these specifications, and demonstrates a few of them, too. But it won't be an exhaustive review of XSLT 2.0 or XPath 2.0, partly because these specs are still changing, and partly because an exhaustive review would take up a whole book by itself.

The material in this chapter is based on the May 2003 working drafts of XSLT 2.0 and XPath 2.0, so it is possible that things will change in those drafts by the time you read this.


First of all, I'll highlight some of the changes that have been made since XSLT 1.0 and XPath 1.0, and I'll also mention a few of the features that have been added. Then I'll show you how you can put some of this new stuff to work today.

Rather than just two specifications, as is the case with XSLT 1.0 and XPath 1.0, the next versions of these specs are broken into five documents. Three new documents have been broken out for those features of XSLT and XPath that also support the XML Query Language (see http://www.w3.org/TR/xquery/).


XSL Transformations (XSLT) Version 2.0 (see http://www.w3.org/TR/xslt20/)

This evolution of the XSLT 1.0 specification is about twice as long as its predecessor. Although it's lengthy, I think this spec is clearer than 1.0, and it even sports a glossary.


XML Path Language (XPath) 2.0 (see http://www.w3.org/TR/xpath20/)

XPath has also evolved; the data model and functions are now documented in separate specifications.


XQuery 1.0 and XPath 2.0 Data Model (see http://www.w3.org/TR/xpath-datamodel/)

XPath has an upgraded data model that applies to XQuery as well. The terminology used to describe the data model has been changed and refined, so although the data model for XSLT 2.0 is technically very similar to XPath 1.0, it is now described in more formal language.


XQuery 1.0 and XPath 2.0 Functions and Operators (see http://www.w3.org/TR/xpath-functions/)

Many functions that also support XQuery have been added to XPath. The function library has tripled in size, from under 30 functions in 1.0 to over 100 in 2.0 (counting functions in all signatures).


XSLT 2.0 and XQuery 1.0 Serialization (see http://www.w3.org/TR/xslt-xquery-serialization/)

This description of how result trees are serialized, which was previously an integral part of the XSLT spec, has been pulled out into a separate document so that it can be used in non-XSLT environments such as XQuery.



Learning XSLT
Learning XSLT
ISBN: 0596003277
EAN: 2147483647
Year: 2003
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net