XSLT and XPath function reference in alphabetical order

(Excerpt from “XSLT 2.0 & XPath 2.0” by Frank Bongers, chapter 5, translated from German)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z



Association and localisation of nodes and resources at runtime


XPath 2.0

Return value:

A xs:string string; the IRI string of the input argument converted into a valid URI string.




A xs:string string; an IRI string which shall be converted into a valid URI string. If the empty sequence is passed on to the function, it returns an empty string.

Purpose of use:

In order to map an IRI on a URI, which is the task of the fn:iri-to-uri() function, firstly all characters contained in the IRI are converted to UTF-8 and then those characters which are forbidden within URI strings are replaced by escape characters. The function returns a valid URI string of xs:anyURI type.


An IRI (Internationalized Resource Identifier) is understood to mean the generalised, internationalised version of a URI (Uniform Resource Identifier) which in turn is the generalised version of a URL (Uniform Resource Locator). The IRI expands in the sense of the internationalisation the character repertoire which is permitted for the description of a resource from the ASCII characters permitted for URIs (according to RFC 2396) to the entire range of the Universal Character Set (Unicode/ISO 10646).

For a detailed description see fn:escape-html-uri()
A detailed description of the escaping process and the characters to be escaped can be found in the explanations for the fn:escape-html-uri() function and in the explanations for the fn:encode-for-uri() function.

Function definition:

XPath 1.0:

The function is not available.

XPath 2.0:

fn:iri-to-uri($iri as xs:string?) 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