Firstly, your use of "//" is quite wrong. //NUMBER selects all the numbers in the document. You don't want to process all the numbers while generating one <NUMBERINT> result element, let alone doing it again in an inner loop.
Also, your use of xsl:choose is wrong. The only things allowed inside xsl:choose are xsl:when and xsl:otherwise.
There are two ways you can break the number up: using string manipulation or using arithmetic. For example:
<xsl:template match="NUMBER">
<NUMBERINT>
<xsl:value-of select="substring-before(., '.')"/>
</NUMBERINT>
<NUMBERDEC>
<xsl:value-of select="substring-after(., '.')"/>
</NUMBERDEC>
</xsl:template>
or if you prefer:
<xsl:template match="NUMBER">
<NUMBERINT>
<xsl:value-of select="floor(.)"/>
</NUMBERINT>
<NUMBERDEC>
<xsl:value-of select=". mod 1"/>
</NUMBERDEC>
</xsl:template>
These two solutions might not do quite the same thing if the numbers are negative.
Michael Kay
Michael Kay
http://saxon.sf.net/