Table 4-3: XML style sheet for a one-to-one relationship – country_dest.xsl
The XML style sheet in Table 4-3 introduces the if statement as well as the ability to sort elements.
The if statement executes code based on the evaluation of the condition given in the "test" attribute,e.g.
<xsl:if test="population >= 10000">
Big Town
</xsl:if>
<xsl:if test="population < 10000">
Small Town
</xsl:if>
Possible expressions for the condition are
Operator
Meaning
=
equality of two values
!=
inequality of two values
<
less than
>
greater than
<=
less than or equal
>=
greater than or equal
and
logical and-conjunction
or
logical or-conjunction
Output can be sorted based on the value of the select attribute of the <xsl:sort> element.