XSLT templates are your friends!
This transformation:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/*">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="num">
<li>
<xsl:value-of select="."/>
</li>
</xsl:template>
<xsl:template match="num[1]">
<li>
<b><xsl:value-of select="."/></b>
</li>
</xsl:template>
</xsl:stylesheet>
when applied on this XML document:
<nums>
<num>01</num>
<num>02</num>
<num>03</num>
<num>04</num>
<num>05</num>
<num>06</num>
<num>07</num>
<num>08</num>
<num>09</num>
<num>10</num>
</nums>
produces the wanted special processing of the first (top) of the <num>
elements:
-
01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
Do note, that you even don't have to use an <xsl:if>
or <xsl:choose>
in your code.
Use the enormous power of templates as much as possible.