XML technologies / XSLT / XSLT and XPath functions / Alphabetical XSLT and XPath reference / static-base-uri

(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

fn:static-base-uri

Origin:

XPath 2.0

Return value:

A xs:anyURI URI string which corresponds to the base URI of the static context.

Call/Arguments:

fn:static-base-uri()

No arguments.

Purpose of use:

The function determines the base URI of the static context and returns it as xs:anyURI. If no base URI is defined in the static context, the function returns an empty result sequence.

The base URI is always an absolute URI. Relative URI indications can be resolved towards it. This can be achieved with the help of the fn:resolve-uri() function.

Example – resolving a relative URI:

fn:resolve-uri( 'examples/example_1',

fn:static-base-uri()

)

The relative URI passed on as string is resolved towards the base URI of the static context which is determined by fn:static-base-uri().

Function definition:

XPath 1.0:

The function is not available.

XPath 2.0:

fn:static-base-uri() as xs:anyURI?

   

 

 

back to top