You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Henry Zongaro (JIRA)" <xa...@xml.apache.org> on 2005/04/22 16:47:34 UTC

[jira] Resolved: (XALANJ-2110) EXSTL Math cannot be used inside

     [ http://issues.apache.org/jira/browse/XALANJ-2110?page=all ]
     
Henry Zongaro resolved XALANJ-2110:
-----------------------------------

     Resolution: Fixed
    Fix Version: CurrentCVS

This was fixed in CVS, though no bug report was opened to do it.

> EXSTL Math cannot be used inside <xsl:template name>
> ----------------------------------------------------
>
>          Key: XALANJ-2110
>          URL: http://issues.apache.org/jira/browse/XALANJ-2110
>      Project: XalanJ2
>         Type: Bug
>   Components: Xalan-extensions, XSLTC
>     Versions: 2.6
>  Environment: windows jdk 1.4.2_06 xsltc
>     Reporter: arn44
>     Priority: Blocker
>      Fix For: CurrentCVS

>
> An RuntimeException occurs when math:max is used in a template with values passed in parameters.
> -----my stylesheet ---------
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:math="http://exslt.org/math"
> exclude-result-prefixes="math"
> >
> <xsl:output method="html" encoding="ISO-8859-1" indent="no" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"  />
>  
> <xsl:template match="/">
> <xsl:call-template name = "calcul" >
> 	<xsl:with-param name="list" select="items/item" />
> </xsl:call-template>
> </xsl:template>	 
> 	 
> <xsl:template name="calcul">
> <xsl:param name="list"/>
> 	<xsl:choose>
> 		<xsl:when test="$list"><xsl:value-of select="math:max($list)" /></xsl:when>	
> 		<xsl:otherwise>0</xsl:otherwise>
> 	</xsl:choose>	
> </xsl:template> 
> </xsl:stylesheet>
> ----xml file-------
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <items>
> <item>2</item>
> <item>3</item>
> </items>
> ---------stacktrace------------
> ERREUR :  'Method not found'
> javax.xml.transform.TransformerException: java.lang.RuntimeException: Method not found
> 	at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:604)
> 	at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:277)
> 	at test.XSLTest.execute(DetecteErreurXSLAction.java:86)
> 	at test.XSLTest.main(XSLTest.java:66)
> Caused by: java.lang.RuntimeException: Method not found
> 	at org.apache.xalan.xsltc.runtime.CallFunction.invokeMethod(CallFunction.java:66)
> 	at test2.calcul()
> 	at test2.template$dot$0()
> 	at test2.applyTemplates()
> 	at test2.transform()
> 	at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:580)
> 	at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:597)
> 	... 3 more
> ---------
> java.lang.RuntimeException: Method not found
> 	at org.apache.xalan.xsltc.runtime.CallFunction.invokeMethod(CallFunction.java:66)
> 	at test2.calcul()
> 	at test2.template$dot$0()
> 	at test2.applyTemplates()
> 	at test2.transform()
> 	at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:580)
> 	at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:597)
> 	at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:277)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org