[xslt] exslt function supported by xsltproc



hello

According to the exslt website [1], the power function (math module) is
available in libxslt

Moreover if I make a test :

 xsltproc --dumpextensions
Registered XSLT Extensions
--------------------------
Registered Extension Functions:
{http://exslt.org/math}lowest
{http://exslt.org/math}constant
{http://exslt.org/math}power
...

So, I've got power :-)

Then, with a very simple test like this :

-------------- 8< ------- testpower.xsl  -------------------------------------
<xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
          xmlns:math="http://exslt.org/math";
          extension-element-prefixes="math">

<xsl:template match="/">
  <result>
    <xsl:call-template name="math:power">
      <xsl:with-param name="base" select="5" />
      <xsl:with-param name="power" select="2" />
    </xsl:call-template>
  </result>
</xsl:template>

</xsl:stylesheet>
-------------- 8< ------------------------------------------------------------

and a foo.xml
<root/>

I try to run and 

xsltproc testpower.xsl foo.xml
runtime error: file testpower.xsl line 8 element call-template
xsl:call-template : template power not found
no result for foo.xml

[1] http://exslt.org/math/functions/power/index.html


I don't understand what I have missed !
thanks for yours answers


-- 
Frédéric Laurent
http://www.opikanoba.org



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