.. _resolve-uri: =========== 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. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - relative:string() - the relative URI * - base:string() - the base URI to resolve it to Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - resolve-uri('prod', 'http://datypic.com/') - http://datypic.com/prod * - resolve-uri('prod2', 'http://datypic.com/prod1') - http://datypic.com/prod2 * - resolve-uri('http://example.org','http://datypic.com') - http://example.org * - resolve-uri('http://datypic.com', '../base') - http://datypic.com * - resolve-uri('', 'http://datypic.com') - http://datypic.com * - - See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`base-uri`. * :ref:`functx_is-absolute-uri`. * :ref:`encode-for-uri`.