fn:resolve-uri

Resolves a relative URI against a base URI.

resolve-uri($href as xs:string?, $base as xs:string?:=()) ➔ xs:anyURI?

Arguments

 

$href

xs:string?

A relative URI reference to be resolved against the specified base URI

 

$base

xs:string?

:= ()

The base URI used for resolving the relative reference; if not supplied or the supplied value is the empty sequence, then the static base URI from the context is used

Result

xs:anyURI?

Namespace

http://www.w3.org/2005/xpath-functions

Links to W3C specifications

XPath 3.1 Functions and Operators

XPath 4.0 Functions and Operators

Saxon availability

Available in XPath 2.0, XSLT 2.0, XQuery 1.0, and later versions. Available in all Saxon editions. Available for all platforms.

Notes on the Saxon implementation

The Saxon implementation recognizes the "jar:file:" URI scheme originally defined by Sun, which was never officially registered and which does not conform to RFC 2396. Technically, because these are not legal URIs, it is non-conformant to accept them, but Saxon does so in the interests of usability.

Saxon does NOT, however, accept Windows file names as URIs.