
fn.prefixFromQName( arg as xs.QName? ) as xs.NCName?
Returns an xs:NCName representing the prefix of $arg.
The empty sequence is returned if $arg is the empty sequence or
if the value of $arg contains no prefix.
| Parameters | |
|---|---|
| arg | A qualified name. |
fn.prefixFromQName(
fn.QName("http://www.example.com/example", "person") )
=> empty sequence, because the QName constructed
by fn.QName does not have a prefix
const foo = xdmp.unquote('<foo xml:lang="en"/>');
const node = fn.head(foo).xpath("./foo/@xml:lang");
fn.prefixFromQName(fn.nodeName(node));
=> xml