From http://www.w3schools.com (Copyright Refsnes Data)
| « Previous | Next Chapter » |
The <xsl:if> element is used to put a conditional test against the content of the XML file.
To put a conditional if test against the content of the XML file, add an <xsl:if> element to the XSL document.
|
<xsl:if test="expression"> ...some output if the expression is true... </xsl:if> |
To add a conditional test, add the <xsl:if> element inside the <xsl:for-each> element in the XSL file:
Example
Try it yourself » |
Note: The value of the required test attribute contains the expression to be evaluated.
The code above will only output the title and artist elements of the CDs that has a price that is higher than 10.
| « Previous | Next Chapter » |
From http://www.w3schools.com (Copyright Refsnes Data)