-----Original Message----- From: Jim Hopp [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 11:48 AM To: [EMAIL PROTECTED] 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 >[EMAIL PROTECTED] 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]