XML technologies / XSLT / XSLT and XPath functions / Alphabetical XSLT and XPath reference / node-name

(Excerpt from “XSLT 2.0 & XPath 2.0” by Frank Bongers, chapter 5, translated from German)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

fn:node-name

Category:

Node names, identifiers and URI information

Origin:

XPath 2.0

Return value:

A QName in expanded form which consists of a namespace URI portion and a local identifier.

Call/Arguments:

fn:node-name($node)

$node:

Any node whose expanded QName shall be determined.

Purpose of use:

The function returns the QName of the node on which it is applied in expanded form. Therefore, it is not possible to find out the namespace prefix of the node in this way, but only the namespace URI connected with it.

If the node is a nameless node, which means a document node, a text node or a comment node, the function returns the empty sequence. The same happens if the empty sequence is passed on to the function as argument.

Function definition:

XPath 1.0:

The function is not available.

XPath 2.0:

fn:node-name($arg as node()?) as xs:QName?

   

 

 

 

back to top