fn:in-scope-prefixes( $element as element() ) as xs:string*
Returns the prefixes of the in-scope namespaces for $element. For namespaces that have a prefix, it returns the prefix as an xs:NCName. For the default namespace, which has no prefix, it returns the zero-length string.
Parameters | |
---|---|
element | The element whose in-scope prefixes will be returned. |
xquery version "1.0-ml"; declare namespace a="a"; declare namespace b="b"; let $x := <a:hello>hello <b:goodbye>goodbye</b:goodbye> </a:hello> return fn:in-scope-prefixes($x) => ("a", "xml") xquery version "1.0-ml"; declare namespace a="a"; declare namespace b="b"; let $x := <a:hello>hello <b:goodbye>goodbye</b:goodbye> </a:hello> return fn:in-scope-prefixes($x/b:goodbye) => ("b", "a", "xml")