Hi Cocoon Users, I get a ProcessingException: Language Exception when passing parameters to a logicsheet (cocoon2.0, Tomcat 4.0.1, Win2k).
This happens _only_ when passing the a parameter within the content of a custom tag via <xxx.customTag> <xxx:param name="start">0</xxx:param> </xxx:customTag> (not as an attribute). The generated code is invalid: start = Strings.isDigit(this.characters("0");) ? --------------------^ Strings.toInt(this.characters("0");) : 0 ; --------------------^ A transformation of the same xml / xsl with Xalan-J 2.2 (without cocoon) seems to work. Did anybody experience or solve this problem ? Thanks in advance, Friedrich Schuster Heidelberg, Germany -------- xml -------- <vstring:indexOfAnyBut s=" hello old world !! " c=" helod" ignoreCase="false" > <vstring:param name="start">0</vstring:param> </vstring:indexOfAnyBut> ------ xsl-logic ------ <!-- INDEXOFANYBUT TAG --> <xsl:template match="vstring:indexOfAnyBut"> <xsl:variable name="s"> <xsl:call-template name="get-parameter"> <xsl:with-param name="name">s</xsl:with-param> <xsl:with-param name="required">true</xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name="c"> <xsl:call-template name="get-parameter"> <xsl:with-param name="name">c</xsl:with-param> <xsl:with-param name="required">true</xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name="start"> <xsl:call-template name="get-parameter"> <xsl:with-param name="name">start</xsl:with-param> <xsl:with-param name="required">false</xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name="ignoreCase"> <xsl:call-template name="get-parameter"> <xsl:with-param name="name">ignoreCase</xsl:with-param> <xsl:with-param name="required">false</xsl:with-param> </xsl:call-template> </xsl:variable> <xsp:logic> s = <xsl:copy-of select="$s" />; c = <xsl:copy-of select="$c" />; start = Strings.isDigit(<xsl:copy-of select="$start"/>) ? Strings.toInt(<xsl:copy-of select="$start"/>) : 0 ; ignoreCase = Strings.equals(<xsl:copy-of select="$ignoreCase"/>,"true",true) ; indexOfAnyBut=String.valueOf(ViolinStrings.Strings.indexOfAnyBut(s, c, start, ignoreCase)); </xsp:logic> <xsp:expr>indexOfAnyBut</xsp:expr> </xsl:template> .... deleted ... <!-- Utility templates --> <!-- --> <!-- DO NOT TOUCH --> <!-- --> <!-- Keep all unknown tags --> <xsl:template match="@*|node()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <!-- START: util templates from Apache Cocoon Logicsheet Concepts --> <xsl:template name="get-parameter"> <xsl:param name="name"/> <xsl:param name="default"/> <xsl:param name="required">false</xsl:param> <xsl:variable name="prefix">vstring</xsl:variable> <xsl:variable name="qname"> <xsl:value-of select="concat($prefix, ':param')"/> </xsl:variable> <xsl:choose> <xsl:when test="@*[name(.) = $name]"> "<xsl:value-of select="@*[name(.) = $name]"/>" </xsl:when> <xsl:when test="(*[name(.) = $qname])[@name = $name]"> <xsl:call-template name="get-nested-content"> <xsl:with-param name="content" select="(*[name(.) = $qname])[@name = $name]"/> </xsl:call-template> </xsl:when> <xsl:otherwise>""</xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="get-nested-content"> <xsl:param name="content"/> <xsl:choose> <xsl:when test="$content/*"> <xsl:apply-templates select="$content/*"/> </xsl:when> <xsl:otherwise>"<xsl:value-of select="$content"/>"</xsl:otherwise> </xsl:choose> </xsl:template> <!-- END: util templates from Apache Cocoon Logicsheet Concepts --> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>