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

for-each Statement

The SLAX for-each statement functions like the <xsl:for-each> element. The statement consists of the for-each keyword, the parentheses-delimited expression, and a curly braces-delimited block.

for-each ($inventory/chassis/chassis-module/
           chassis-sub-module[part-number == '750-000610']) {
    <message> "Down rev PIC in " _ ../name _ ", " _ name _ ": " _ description;
}

The XSLT equivalent:

<xsl:for-each select="$inventory/chassis/chassis-module/
             chassis-sub-module[part-number == '750-000610']">
    <message>
        <xsl:value-of select="concat('Down rev PIC in ', ../name, ', ', name, ': ',                 description)"/>
    </message>
</xsl:for-each>

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