Subject: [xsl] Parameterized attribute From: "Haque, Suraiya" <Suraiya.Haque@xxxxxxx> Date: Wed, 29 Aug 2001 13:09:41 -0400 |
I'm trying to implement a named template with the an attribute name passed in as a parameter as follows: <xsl:template name="testTemplate"> <xsl:param name="position"><xsl:value-of select="position"/></xsl:param> <xsl:param name="attributeName"><xsl:value-of select="attributeName"/></xsl:param> <xsl:variable name="test"><xsl:value-of select="format-number((number(substring(following-sibling::Row[position()=$p osition]/$attributeName, 2)))div 100, '00.00')"/> </xsl:variable> <xsl:value-of select="test"/> </xsl:template> <xsl:template match="/"> <xsl:call-template name="testTemplate"> <xsl:with-param name="position">1</xsl:with-param> <xsl:with-param name="attributeName">@TOTTAX</xsl:with-param> </xsl:call-template> </xsl:template> XML is: <AppInfo> <Row GROSSAMT="+00000002917" TOTTAX="+00000002917" /> <Row GROSSAMT="+00000002978" TOTTAX="+00000002978" /> <Row GROSSAMT="+00000003115" TOTTAX="+00000003115" /> </AppInfo> In IE5, I get this error: NodeTest expected here. format-number((number(substring(following-sibling::Row[position()=$position] /-->$<--attributeName, 2)))div 100, '00.00') What am I doing wrong? Thanks, Suraiya XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Improving Performance of, Michael Beddow | Thread | RE: [xsl] Parameterized attribute, Jarno . Elovirta |
Re: [xsl] Namespace Identifiers - U, Thomas B. Passin | Date | RE: [xsl] Mailto problem, Julian Reschke |
Month |