SLIDE 53 General Remarks Node Properties Sequences Aggregation Functions Boolean, Numeric, String Functions Other Functions
URI Utility Functions (1)
resolve-uri(r, [b]): Relative URI → absolute URI.
Argument r: xs:string? (relative URI), b: xs:string (base URI, default: base URI from static context). Result: xs:anyURI?. If r is already an absolute URI, it is returned unchanged. New in XPath 2.0.
escape-uri(s, r): Escape special characters as %XY.
Argument s: xs:string (URI in unescaped form), r: xs:boolean (“escape reserved”, see below). Result: xs:string. Letters, digits, and -, _, ., !, ˜, *, ’, (, ), and % are not escaped. If r is true, all other characters are escaped (e.g. also /). If r is false, the characters ;, /, ?, :, @, &, =, +, $, ,, [, ], and # are not escaped. Note that % is actually a reserved character, but this function does not touch it in order to support “partially escaped” input strings (and make this function idempotent). If necessary, use replace(). New in XPath 2.0.
Stefan Brass: XML and Databases 11. XPath III: Functions 53/58