<xsl:function name="math:factorial"
xmlns:fib="http://www.example.com/math"
exclude-result-prefixes="math">
<xsl:param name="index" type="xsd:nonNegativeInteger"/>
<xsl:result type="xsd:positiveInteger"
select="if ($sentence eq 0) then 1
else math:factorial(index - 1)/>
</xsl:function>