<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html><body>
	<xsl:apply-templates select="data"/>
</body></html>
</xsl:template>


<xsl:template match="data">

<p>Value is: <xsl:value-of select="@number"/></p>
<p>Ceiling is: <xsl:value-of select="ceiling(@number)"/></p>

<!-- ***** THIS IS THE FAILURE ***** -->
<p>
<xsl:choose>
	<xsl:when test="@format = 'Y'">
		format-number(@number) = 
		<xsl:value-of select="format-number(@number,'#,###,###')"/>
	</xsl:when>
	<xsl:otherwise>
		Set data/@format = "Y" to call format-number.
	</xsl:otherwise>
</xsl:choose>
</p>
<!-- ******************************** -->

<hr width="30%" align="left"/>
Functions available in the XSLT Engine<br/>
<i>(http://www.zvon.org/xxl/XSLTreference/Output/xpathFunctionIndex.html)</i>:
<table>
<tr><td><b>Function</b></td><td><b>Available</b></td></tr>
	<xsl:for-each select="xsl-functions/function">
		<xsl:sort select="function-available(@name)"/>
		<xsl:sort select="@name"/>
		<tr>
			<td><xsl:value-of select="@name"/></td>
			<td><xsl:value-of select="function-available(@name)"/></td>
		</tr>
	</xsl:for-each>
</table>

</xsl:template>

</xsl:stylesheet>

<!-- Stylesheet edited using Stylus Studio - (c)1998-2001 eXcelon Corp. -->
