Returns the local name (as a string) of $node-var.
xf:local-name(xf:node? $node-var) —> xs:string
Returns the local name (as a string) of $node-var.
The following XML document defines the namespace called xacme:
<?xml version='1.0'?> <mydoc xmlns:xacme="http://www.acme.com/foo"> <xacme:n/> </mydoc>
The preceding XML Document associates the namespace prefix xacme to the URI: http://www.acme.com/foo. The string xacme:n is qualified name for the URI/local name pair: ("http://www.acme.com/foo", "n").
The following example query returns the local part of the URI/local name pair as shown in the following XQuery code:
let $a := <mydoc xmlns:xacme="http://www.acme.com/foo"> <xacme:n/> </mydoc> return <name>{xf:local-name($a/*[1])}</name>
The preceding query generates the following result:
<name>n</name>
W3C local-name function description.