Return local name of node.
The following construct(s) refer to this construct:
fn:local-name(node $node) => string
This function returns the local part of the name of $node
.
If $node
has no name, because it is a document node, a comment
node, or a text node, the function returns a string of length zero.
$node |
node |
---|
Retrieve local name from element nodes:
let $a := input()/bib/book[1] return local-name($a)
This query returns the string value "book"
Retrieve local name from comment nodes:
for $a in input()//comment() return local-name($a)
This query returns as many zero-length string values as there are comment nodes in the current collection.