[Contents] [Prev] [Next] [Index] [Report an Error]


jcs:first-of()

Syntax

jcs:first-of(object,+ "expression")

Description

Return the first nonempty (non-null) item in a list.

Usage Examples

In the following example, if the value of a is empty, b is checked. If the value of b is empty, c is checked. If the value of c is empty, d is checked. If the value of d is empty, the string none is returned.

jcs:first-of($a, $b, $c, $d, "none")

The following example selects the description of a logical interface if there is a logical interface description. If not, it selects the description of the (parent) physical interface if there is a physical interface description. If not, it selects the concatenation of the physical interface name with a "." and the logical unit number.

<xsl:variable name="description"
        select="jcs:first-of(description, ../description, concat(../name, '.', name))"/>

See Also

Displaying DNS Hostname Information

jcs:hostname()

Syntax

jcs:hostname(expression)

Description

Return the fully qualified domain name of an address or hostname.

Usage Examples

<xsl:variable name="name" select="jcs:hostname($dest)"/>
<xsl:value-of select="concat($address, ' is ', jcs:hostname($address))"/>

See Also

Finding LSPs to Multiple Destinations


[Contents] [Prev] [Next] [Index] [Report an Error]