Re: [xslt] exslt function supported by xsltproc



On Wednesday 16 April 2003 10:16, Daniel Veillard wrote:
> On Wed, Apr 16, 2003 at 10:08:10AM +0200, Frédéric Laurent wrote:
> > Registered Extension Functions:
> > {http://exslt.org/math}power
>
> [...]
>
> >     <xsl:call-template name="math:power">
> >       <xsl:with-param name="base" select="5" />
> >       <xsl:with-param name="power" select="2" />
>
> [...]
>
> > I don't understand what I have missed !
>
>   it's registered as a function, call-template is not the proper
> construct to call it then, it looks suspicious to use a template
> to call a math function, that doesn't look right at all.
>
> Daniel

ok, you're right, so stupid am I :-(
in fact, I misread the exslt howto where the following example 

<xsl:choose>
   <xsl:when test="function-available('math:min')">
      <xsl:value-of select="math:min($values)" />
   </xsl:when>
   <xsl:otherwise>
      <xsl:call-template name="math:min">
         <xsl:with-param name="nodes" select="$values" />
      </xsl:call-template>
   </xsl:otherwise>
</xsl:choose>

makes me follow the wrong way...

so 

<result>
    <xsl:value-of select="math:power(2,5)"/>
</result>

works better !

Thanks Daniel, my problem of the day is solved, I can go back to
bed :-D

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



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