[xsl] help on attribute name

Subject: [xsl] help on attribute name
From: Raman Kannan <rk2153@xxxxxxxxx>
Date: Mon, 23 May 2005 13:38:56 -0400
Greetings!

The following XSL construct fails--

<xsl:call-template name="taggen" >
<xsl:with-param name="id" select='T35' />
<xsl:with-param name="value" select='D' />
</xsl:call-template>

<xsl:template name="taggen">
<xsl:param name="id" />
<xsl:param name="value" />
<xsl:element name="fixtag">
<xsl:attribute name="$id"><xsl:value-of select="$value"/></xsl:attribute>
</xsl:element>
</xsl:template>

-- Can you help.
The reported problem is
 Illegal value: $id used for QNAME attribute: name in
<xsl:attribute name="$id"><xsl:value-of select="$value"/></xsl:attribute>

I am able to do
<xsl:attribute name="T11"> <xsl:value-of select="@id"/></xsl:attribute>
But I would like to come up with attribute names more dynamically.

Considered attribute set but that is not dynamic either.

TIA for suggestions.
--
AD

Current Thread