Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


empty() Function (SLAX and XSLT)


SLAX Syntax

XSLT Syntax


Test for the presence of a value and return true if the node set or string argument evaluates to an empty value.

The prefix associated with the namespace URI should be defined in the prefix-to-namespace mapping in the style sheet.


(node-set | string)

Argument to test for the presence of a value.

Return Value


Boolean value, which is true if the argument is empty.

Usage Examples

In the following example, if $set is empty, the script executes the enclosed code block:

The following example tests whether the description node for interface fe-/0/0/0 is empty. If the description is missing, a <message> tag is output.

Release Information

Function introduced in Junos OS Release 7.6

Support for the slax namespace added in Junos OS Release 12.2.