This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: SimpleProblem
- To: xsl-list at mulberrytech dot com
- Subject: Re: SimpleProblem
- From: Eric van der Vlist <vdv at dyomedea dot com>
- Date: Mon, 27 Mar 2000 00:01:13 +0200
- References: <20000326210954.67156.qmail@hotmail.com>
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I hope it's what you mean ;=) but...
-------------- XML --------------
<doc>
<A>
<B>
<C>LASTNAME</C>
</B>
</A>
<AA>
<BB>
<CC>MIDDLENAME</CC>
</BB>
</AA>
<AAA>
<BBB>FIRSTNAME</BBB>
</AAA>
</doc>
-------------- XSL --------------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="lastname" select="string(/doc/A/B/C)"/>
<xsl:variable name="middlename" select="string(/doc/AA/BB/CC)"/>
<xsl:variable name="firstname" select="string(/doc/AAA/BBB)"/>
<xsl:value-of select="concat('YOURNAME:', $firstname, '-', $middlename,
'-', $lastname)"/>
</xsl:template>
</xsl:stylesheet>
-------------- Result --------------
YOURNAME:FIRSTNAME-MIDDLENAME-LASTNAME
Eric
--
------------------------------------------------------------------------
Eric van der Vlist Dyomedea
http://xmlfr.org http://ducotede.com http://dyomedea.com
------------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list