Loading TOC...

fn.prefixFromQName

fn.prefixFromQName(
   $arg as xs.QName?
) as xs.NCName?

Summary

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.

Example

fn.prefixFromQName(
   fn.QName("http://www.example.com/example", "person") )

=> empty sequence, because the QName constructed
   by fn.QName does not have a prefix

Example

var foo = xdmp.unquote('<foo xml:lang="en"/>');
var node = fn.head(foo).xpath("./foo/@xml:lang");
fn.prefixFromQName(fn.nodeName(node));

=> xml

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy