|
|
|
|
|
|
| |
XSLT Tutorial
XSLT Elements: xsl:if
xsl:if
<xsl:if test=boolean
expression>
template body
</xsl:if>
- The xsl:if element allows an instruction to be run if it meets a
criteria, like the if statement in most languages, except
that there is no else statement. The criteria for
entering the if statement is based on a test.
- Criteria: The criteria is evaluated by a test expression,
which returns a true boolean for the following:
- if the expression returns a node-set, there must be a node
in it,
- if the expression returns a string, the string cannot be
empty, and
- if the expression returns a number, it must not equal zero
(0).
- There is no else instruction
Open Worksheet 5 for an xsl:if example
|
|
|
|
|
|
|
|
|