You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Steve Conover <sc...@groundswell.net> on 2000/09/05 04:05:53 UTC
xsl:call-template problem
Hi, I think this should work:
<xsl:template match="doc-profile-field">
<xsl:param name="fieldlabel"/>
<xsl:param name="fieldvalue"/>
<tr>
<td width="144" align="right"
bgcolor="#FFFFFF"><font color="#330000"><xsl:value-of
select="$fieldlabel"/></font></td>
<td bgcolor="#CC6600">
<table width="100%" border="0"
cellspacing="0" cellpadding="3" bgcolor="#669933">
<tr bgcolor="#FFFFFF">
<td><font
color="#333333"><xsl:value-of select="$fieldvalue"/></font></td>
</tr>
</table>
</td>
</tr>
</xsl:template>
which gets invoked by:
<xsl:call-template
name="doc-profile-field">
<xsl:with-param
name="fieldlabel">Document Description</xsl:with-param>
<xsl:with-param
name="fieldvalue">abc</xsl:with-param>
</xsl:call-template>
but I get this cryptic Xalan error:
org.apache.xalan.xslt.XSLProcessorException: at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1676) at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1581) at
org.apache.xalan.xslt.ElemCallTemplate.execute(ElemCallTemplate.java:150) at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:659) at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java:659) at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
....
Any ideas on what the problem is?
Regards,
Steve
Re: xsl:call-template problem
Posted by "David J. Manura" <dj...@Lehigh.EDU>.
Use
<xsl:template name="doc-profile-field">
instead of
<xsl:template match="doc-profile-field">
David J. Manura
Dave's Math Tables
www.sisweb.com/math
djma@lehigh.edu, sismspec@ix.netcom.com
> Hi, I think this should work:
>
> <xsl:template match="doc-profile-field">
> <xsl:param name="fieldlabel"/>
> <xsl:param name="fieldvalue"/>
>
> <tr>
> <td width="144" align="right"
> bgcolor="#FFFFFF"><font color="#330000"><xsl:value-of
> select="$fieldlabel"/></font></td>
> <td bgcolor="#CC6600">
> <table width="100%" border="0"
> cellspacing="0" cellpadding="3" bgcolor="#669933">
> <tr bgcolor="#FFFFFF">
> <td><font
> color="#333333"><xsl:value-of select="$fieldvalue"/></font></td>
> </tr>
> </table>
> </td>
> </tr>
> </xsl:template>
>
>
>
> which gets invoked by:
>
> <xsl:call-template
> name="doc-profile-field">
> <xsl:with-param
> name="fieldlabel">Document Description</xsl:with-param>
> <xsl:with-param
> name="fieldvalue">abc</xsl:with-param>
> </xsl:call-template>
>
> but I get this cryptic Xalan error:
> org.apache.xalan.xslt.XSLProcessorException: at
> org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1676) at
> org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1581) at
> org.apache.xalan.xslt.ElemCallTemplate.execute(ElemCallTemplate.java:150)
at
>
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
> t.java:659) at
>
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
> at
>
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
> t.java:659) at
>
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java:254)
> ....
>
>
> Any ideas on what the problem is?
>
> Regards,
> Steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org