This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Substituting value in XML Attribute
On Thu, Mar 08 '01 at 10:39, Raj Avula wrote:
> [ ... ]
> If I write XSL like this
> <xsl:variable name="myvar" select="@ID"/>
> <MYCustomer ID="$myvar">
> </MYCustomer>
>
> the result is comming as
> <MYCustomer ID="$myvar">
> </MYCustomer>
what about:
<xsl:template match="customer">
<xsl:element name="MYCustomer">
<xsl:attribute name="ID" select="@ID"/>
</xsl:element>
</xsl:template>
or simply add {}:
<MYCustomer ID="{$myvar}" />
Cu,
Goetz.
PGP signature