Can someone tell my why the following use of fn:max
does not work?
XML document:
<?xml version="1.0" encoding="UTF-8"?>
<a>
<b>1</b>
<b>2</b>
<b>3</b>
</a>
XSLT stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<p><xsl:value-of select="count(a/b)"/></p>
<p><xsl:value-of select="max(a/b)"/></p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
The call to count()
returns the correct result, but every XSLT engine that I have used (namely Firefox and Apache FOP) reject the call to max()
, even though Apache says that FOP supports it.
What am I doing wrong?