You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ro...@VerizonWireless.com on 2004/08/06 18:12:31 UTC
RE: how to pass param to template that will be used as an tag att
ribu te
-----Original Message-----
From: Jim Hopp [mailto:jim@netyourwork.com]
Sent: Friday, August 06, 2004 11:48 AM
To: fop-user@xml.apache.org
Subject: Re: how to pass param to template that will be used as an tag
attribu te
<xsl:with-param name="col_alignment" select="'left'"/>
Jim, I tried this before I mailed the group
<xsl:call-template name="ROW_HEADER">
<xsl:with-param name="col"
select="'Plan'"/>
<xsl:with-param name="col_alignment"
select="'left'"/>
</xsl:call-template>
note the ticks around left
but get errors
[ERROR] Unknown enumerated value for property 'text-align': col_alignment
[ERROR] Error in text-align property value 'col_alignment':
org.apache.fop.fo.expr.PropertyException: No conversion defined
if someone could point me to an example, I hate to bother folk with such a
simple task
i just want to call a template, passing in a param, and use the param
in an attribute to fo:block thats used within the tamplate
>Otherwise, the XSLT should work. (I didn't evaluate the xsl:fo.)
>-Jim
>Robert.Walker@VerizonWireless.com wrote:
> hi all, how can I call a template passing in a value that will be used
> as an attribute to a tag in that template, for example, something like
>
> I want to invoke with something like (maybe its not possible)
>
> <xsl:call-template name="ROW_HEADER">
> <xsl:with-param name="col"
> select="'Plan'"/>
> <xsl:with-param name="col_alignment"
> select="left"/>
> </xsl:call-template>
>
>
> <xsl:template name="ROW_HEADER">
> <xsl:param name="col"/>
> <xsl:param name="col_alignment"/>
>
> <fo:table-row>
> <fo:table-cell>
> <fo:block font-weight="bold"
> text-align="$col_alignment">
> <xsl:value-of select="$col"/>
> </fo:block>
> </fo:table-cell>
> </fo:table-row>
> </xsl:template>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org