<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="list" >
<even-odd>
<xsl:apply-templates />
</even-odd>
</xsl:template>
<xsl:template match="num" >
<xsl:choose>
<xsl:when test=" (number() mod 2) = 0">
<even>
<xsl:apply-templates />
</even>
</xsl:when>
<xsl:otherwise>
<odd>
<xsl:apply-templates />
</odd>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>