XML technologies / XSLT / Introduction to XSLT 2.0 / XSLT and XPath – round two / Summary and exercises
(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, Chapter 2.)
The second chapter develops your XSLT knowledge to the point where you can write moderately complex stylesheets. Filter predicates, essential for constructing sequences, are particularly important.
At this point, you should be ready for the following practical tasks:
Writing path expressions with predicates
Using the context functions
fn:position()andfn:last()Conditions with
xsl:ifandxsl:chooseSorting and numbering sequences
Constructing loops and groups
The following XSLT declarations and instructions were introduced: xsl:if, xsl:choose, xsl:when, xsl:otherwise, xsl:sort, xsl:number, xsl:for-each, xsl:for-each-group, xsl:copy, xsl:copy-of as well as instructions for constructing nodes.
Important XPath functions introduced here include fn:position(), fn:last(), fn:count(), fn:sum(), fn:round-half-to-even(), the XSLT function format-number() and others. More complex XPath constructs, such as conditions and loops, were also discussed. A detailed discussion of all XSLT elements and their attributes is collected in the XSLT 2.0 reference, and a description of the functions in the XSLT and XPath function reference.
Copyright © Galileo Press, Bonn 2008
You may print the online version for your private use.
Otherwise, this chapter from "XSLT 2.0 & XPath 2.0 ― Das umfassende Handbuch" is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Galileo Press, Rheinwerkallee 4, 53227 Bonn