The name() function returns the entire QName (including the part before the colon, if there is one) of a node.
string name(node-set[optional])
Optionally, a node-set. If no argument is specified, the function uses the context node.
A string with the QName of the context node, if no argument is specified, the QName of the first node if a node-set is specified, or an empty string if an empty node-set is given. Root, text, and comment nodes are empty by definition.
Defined: XPath, section 4.1.