xsl-list
[Top] [All Lists]

help on attribute name

2005-05-23 10:38:56
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>