XML technologies / XSLT / Introduction to XSLT 2.0 / XSLT and XPath – round two / Sorting with xsl:sort
(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, Chapter 2.)
Once a sequence has been assembled, it is normally processed in its existing order, as it stands, unless further action is taken. This often corresponds to document order, which is frequently not particularly relevant. An order based on the content of the data to be output would be much more useful. In other words, sorting should be possible.
For this purpose, XSLT 2.0 provides the instruction xsl:sort, which directly sorts a sequence.
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