xsl:if
Used for conditional processing. It takes a mandatory test
attribute, whose value is a boolean expression. The contents of the
xsl:if
element are expanded only of the expression is true.
Category: instruction
Content:
sequence-constructor
Permitted parent elements:
any XSLT element whose content model is
sequence-constructor; any literal result element
Attributes
|
|
The boolean expression to be tested. The full syntax of boolean expressions is outlined in XPath Expression Syntax. |
Examples
Includes a hyperlink in the output only if the current element has a
preface
attribute: