XSLT and XPath function reference in alphabetical order
(Excerpt from “XSLT 2.0 & XPath 2.0” by Frank Bongers, chapter 5, translated from German)
Association and localisation of resources
A xs:string string which indicates the default collation, provided that it is defined in the system environment.
Purpose of use:
A collation serves as the basis for comparing and processing strings. For example, a collation determines the sorting order of Unicode characters (Unicode sort order) and the Unicode code page to be used and thus the codepoints. The sorting order may be different, for instance by following the conventions of lexica, ignoring case sensitivity or using the codepoint values as a basis (default). See also the W3C „Character Model for the World Wide Web 1.0: Fundamentals - Units of collation“. Since each time different alphabets can be used, a collation also depends on the language of the resources to be processed or the localisation of the processing software. In principle, a collation must always be available. Therefore a default collation defined in the static context of the stylesheet exists which is used by default, unless otherwise specified.
The fn:default-collation() function returns the value of the default-collation property from the static context of the stylesheet. This may be the URI of the default collation or a string identifying this collation.
If no explicit default collation is defined, the function returns an empty string. However, the default-collation property itself cannot be undefined: If no collation is declared or implicitly provided by the system, the Unicode Codepoint Collation is used.
More information on the Unicode Collation Algorithm:
Detailed information on the comparison and sorting of strings according to the Unicode Collation Algorithm can be found at the web address: http://www.unicode.org/reports/tr10/.
Example - default collation in Saxon:
returns the following URI string:
However, this URI does not point to a real existing resource, but is to be understood in the sense of an identifier. The currently used collation performs a string comparison according to the codepoint values of the characters.
The function is not available.
fn:default-collation() as xs:string
|<< back||next >>|
Copyright © Galileo Press, Bonn 2008
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "XSLT 2.0 & XPath 2.0" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.
Galileo Press, Rheinwerkallee 4, 53227 Bonn, Germany