98
XSLT <xsl:if> Element
The XSLT <xsl:if> element is used to specify a conditional test against the content of the XML file.
Parameter explanation
test: It specifies a condition in xml data to test.
XSLT <xsl:if> Element Example
Let’s take an example to create a table of element with its attribute “id” and its child <firstname>, <lastname>, <nickname>, and <salary> by iterating over each employee. Let’s take a condition which takes salary to be greater than 15000 and then prints the employee’s details.
Employee.xml
Employee.xsl
Output:
Next TopicXSLT <choose>