XPath/XQuery in-scope-prefixes function

Summary

Returns the prefixes of the in-scope namespaces for an element node.

Signature

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

Properties

This function is nondeterministic-wrt-ordering, context-independent, and focus-independent.

Rules

The function returns a sequence of strings representing the prefixes of the in-scope namespaces for $element.

For namespace bindings that have a prefix, the function returns the prefix as an xs:NCName. For the default namespace, which has no prefix, it returns the zero-length string.

The result sequence contains no duplicates.

The ordering of the result sequence is implementation-dependent.

Notes

The XML namespace is in scope for every element, so the result will always include the string "xml".