XML technologies / XSLT / XSLT and XPath functions / Alphabetical XSLT and XPath reference / in-scope-prefixes

(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:in-scope-prefixes

Category:

Functions in connection with qualified identifiers (QNames)

Origin:

XPath 2.0

Return value:

A sequence of items of xs:string type which contain all namespace prefixes being valid for the element passed on, each in the lexical form of a xs:NCName NCName. If the element is in no namespace, the empty sequence is returned.

Call/Arguments:

fn:in-scope-prefixes($elementNode)

$elementNode:

A node of element() type. The empty sequence is not permitted as value.

Purpose of use:

The fn:in-scope-prefixes() function returns the namespace prefixes being valid for the element passed on. This is achieved in the form of a sequence which contains all appropriate prefixes as string items.

If the element is in the default namespace which has no prefix, fn:in-scope-prefixes() returns the empty string. If, however, the element passed on to the function has no namespace, an empty result sequence is returned.

Function definition:

XPath 1.0:

The function is not available.

XPath 2.0:

fn:in-scope-prefixes($element as element()) as xs:string*

   

 

 

 

back to top