in-scope-prefixes
The prefixes that are in scope for an element
Description
The fn:in-scope-prefixes function returns a sequence of prefixes (as strings) that are used in the in-scope namespaces for the $element element. The results include a zero-length string if there is a default namespace declaration. It also always includes the xml prefix, which is built into the XML recommendation.
Note that the function uses in-scope namespaces, as opposed to statically known namespaces. For example, it does not necessarily include all the prefixes declared in the prolog, if they are not used by $element or one of its ancestors. .
Parameters |
Description |
---|---|
element:element() |
Examples
XPath |
Results |
---|---|
in-scope-prefixes($in-xml) |
(‘’, ‘prod2’, ‘xml’) |
See Also
namespace-uri-for-prefi.