Skip to Content
XSLT, 2nd Edition
book

XSLT, 2nd Edition

by Doug Tidwell
June 2008
Intermediate to advanced
986 pages
27h 8m
English
O'Reilly Media, Inc.
Content preview from XSLT, 2nd Edition

Name

<xsl:sort>

Defines a sort key for the current context. The first <xsl:sort> defines the primary sort key, the second <xsl:sort> defines the secondary sort key, etc. You can have as many <xsl:sort> elements as you need.

Category

Subinstruction.

Required Attributes

None.

Optional Attributes

select

Determines the nodes to be sorted. You can also omit the select attribute and use the contents of the <xsl:sort> element to define the nodes to be sorted.

lang

A string that defines the language used by the sort. The language codes are defined in RFC1766, available at http://www.ietf.org/rfc/rfc1766.txt. Not all processors support all languages, so check your XSLT processor’s documentation.

data-type

An attribute that defines the type of the items to be sorted. Allowable values are number and text; the default is text. An XSLT processor has the option of supporting other values as well. Sorting the values 32 10 120 with data-type="text" returns 10 120 32, while data-type="number" returns 10 32 120.

[2.0] In XSLT 2.0, you can specify a QName that represents some other datatype. How (or if) that value is processed can vary from one XSLT processor to another.

order

An attribute that defines the order of the sort. Allowable values are ascending and descending.

case-order

An attribute that defines the order in which upper- and lowercase letters are sorted. Allowable values are upper-first and lower-first.

[2.0] collation

The collation order used by this sort. For example, in Spanish, the single letter ll

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

XSLT Cookbook, 2nd Edition

XSLT Cookbook, 2nd Edition

Sal Mangano
XSLT for Dummies

XSLT for Dummies

Richard Wagner
Learning XSLT

Learning XSLT

Michael Fitzgerald

Publisher Resources

ISBN: 9780596527211Errata Page