resolve-uri
Resolves a relative URI to a base URI, returning an absolute URI
Description
The fn:resolve-uri function takes a base URI ($base) and a relative URI ($relative) as arguments, and constructs an absolute URI.
If $base is not provided, the base URI of the static context is used. This may have been set by the processor outside the scope of the query, or it may have been declared in the query prolog.
Parameters |
Description |
---|---|
relative:string() |
the relative URI |
base:string() |
the base URI to resolve it to |
Examples
XPath |
Results |
---|---|
resolve-uri(‘prod’, ‘http://datypic.com/’) |
|
resolve-uri(‘prod2’, ‘http://datypic.com/prod1’) |
|
resolve-uri(’http://example.org’,’http://datypic.com’) |
|
resolve-uri(’http://datypic.com’, ‘../base’) |
|
resolve-uri(‘’, ‘http://datypic.com’) |
|