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 Jim Hopp <ji...@netyourwork.com> on 2004/08/06 17:48:28 UTC

Re: how to pass param to template that will be used as an tag attribu te

<xsl:with-param name="col_alignment" select="'left'"/>			

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