[xsl] updating childelements

Subject: [xsl] updating childelements
From: "bernward hanssen" <bernwardhanssen@xxxxxx>
Date: Wed, 28 Nov 2001 16:11:21 +0100

I want to update childelements when the are passed as parameters with the same name as the 

The following works, but I think it is not the way to do it in xsl. 

<xsl:template match="item" mode="test">
	<xsl:when test="$firstname"><xsl:value-of select="$firstname"/></xsl:when>
	<xsl:otherwise><xsl:value-of select="firstname"/></xsl:otherwise>
	<xsl:when test="$lastname"><xsl:value-of select="$lastname"/></xsl:when>
	<xsl:otherwise><xsl:value-of select="lastname"/></xsl:otherwise>
<!--  -->
<!-- and that for each element -->
<!--  -->

Knows anybody a better solution? 
I try the following, but it doesn't work.

<xsl:template match="*" mode="update">
	<xsl:variable name="el">
		<xsl:value-of select="name()"/>
	<xsl:element name="{$el}">

	<xsl:variable name="el">
		<xsl:value-of select="concat('$',name())"/>
<!-- this is only the name of the Parameter, I need the content of the Parameter -->

Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr!
Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=7

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread