Is there an XSLT name-of element ?
The difference in the definition of the functions name() and local-name().
- name(someNode) will return the full name of the node that includes the prefix and colon in case the node is an element or an attribute.
- local-name(someNode) will returns only the local name of the node which will not include the prefix and colon in case the node is an element or an attribute.
So, in some situations where a name belongs to two different namespaces, one should use the name() function in order for these names to be still distinguished.
BTW is possible to specify both functions without any argument:
- name() is an abbreviation for name(.)
- local-name() is an abbreviation for local-name(.)
Remember that not only the attributes and elements have names, these two functions will also be used on PIs and on these they are identical.