[xslt] math:max()/math:min() bug?



Hi,

Running the stylesheet below produces:

min: NaN
max: NaN

I tested the same stylesheet with saxon and got the expected, and I assume 
correct, result:

min: 1
max: 5


The stylesheet:

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:exsl="http://exslt.org/common";
                xmlns:math="http://exslt.org/math";
                extension-element-prefixes="exsl math"
                version='1.1'>
<xsl:output method="html" />

<xsl:template match="*">
<xsl:variable 
name="a"><o>1</o><o>2</o><o>5</o><o>4</o><o>3</o></xsl:variable>

min: <xsl:value-of select="math:min(exsl:node-set($a)/o)" />
max: <xsl:value-of select="math:max(exsl:node-set($a)/o)" />

</xsl:template>

</xsl:stylesheet>





Thanks,

Yuval

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]