fn:nilled
Returns true for an element that is nilled.
Signatures
fn:nilled() as xs:boolean?
fn:nilled($arg as node()?) as xs:boolean?
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 $arg
is the empty sequence, the function returns the empty sequence.
Otherwise the function returns the result of the dm:nilled
accessor as
defined in [Data Model (XDM) 3.1] (see nilled Accessor).
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].
Notes
If $arg
is not an element node, the function returns the empty
sequence.
If $arg
is an untyped element node, the function returns false.
In practice, the function returns true
only for an element node that has
the attribute xsi:nil="true"
and that is successfully validated against a
schema that defines the element to be nillable; the detailed rules, however, are defined
in [Data Model (XDM) 3.1].