namespace-uri-for-prefix

Returns the namespace URI corresponding to a given prefix, using the namespaces that are in scope for a given element

namespace-uri-for-prefix($prefix as xs:string?, $element as element()) ➔ xs:anyURI?

Arguments

 

$prefix

xs:string?

The supplied prefix

 

$element

element()

The element node whose in-scope namespaces are to be examined

Result

xs:anyURI?

Links to W3C specifications

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

Applies to: XPath 2.0, XSLT 2.0, XQuery 1.0 and later versions

XPath 2.0 Functions and Operators

XPath 3.0 Functions and Operators

Notes on the Saxon implementation

The function is fully implemented according to the W3C specifications.