fn:local-name

Returns the local part of the name of $arg as an xs:string that is either the zero-length string, or has the lexical form of an xs:NCName.

Signatures

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

Properties

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

Rules

If the argument is omitted, it defaults to the context item (.). The behavior of the function if the argument is omitted is exactly the same as if the context item had been passed as the argument.

If the argument is supplied and is the empty sequence, the function returns the zero-length string.

If the node identified by $arg has no name (that is, if it is a document node, a comment, a text node, or a namespace node having no name), the function returns the zero-length string.

Otherwise, the function returns the local part of the expanded-QName of the node identified by $arg, as determined by the dm:node-name accessor defined in node-name Accessor). This will be an xs:string whose lexical form is an xs:NCName.

Error Conditions

The following errors may be raised when $arg is omitted:

If the context item is absent, dynamic error [ERRXPDY0002]

If the context item is not a node, type error [ERRXPTY0004].