RosettaCodeData/Task/Conditional-structures/XSLT/conditional-structures-3.xslt
Ingy döt Net 776bba907c Sync
2013-10-27 22:24:23 +00:00

11 lines
463 B
HTML

<xsl:if test="@attrib = 'foo'">...</xsl:if>
<xsl:if test="position() != last()">...</xsl:if>
<xsl:if test="not(false())">...</xsl:if>
<!-- Some XPath expressions must be escaped. -->
<xsl:if test='contains(node, "stuff") and (position() &gt; first())'>...</xsl:if>
<!-- The following two examples are synonymous because the test attribute is
implicitly converted to boolean. -->
<xsl:if test="boolean($expr)">...</xsl:if>
<xsl:if test="$expr">...</xsl:if>