This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how to merge tags/nodes via transform?
- From: Jarkko dot Moilanen at uta dot fi
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 12 Aug 2002 09:24:18 +0300 (EEST)
- Subject: Re: [xsl] how to merge tags/nodes via transform?
- References: <3CD1C28A00006BC7@mail.globixmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Lainaus rbondi@ergito.com:
> Could someone please suggest a template to convert e.g.:
Dummy solution:
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
version = "1.0" >
<xsl:output method = "xml" indent = "yes" />
<xsl:template match = "root" >
<root>
<b>
<//select 1 to 3 <b> - elements
<xsl:value-of select="b[1]" />
<xsl:value-of select="b[2]" />
<xsl:value-of select="b[3]" />
</b>
<xsl:text>and</xsl:text>
<b>
<xsl:value-of select="b[4]" />
<xsl:value-of select="b[5]" />
<xsl:value-of select="b[6]" />
<xsl:value-of select="b[7]" />
</b>
</root>
</xsl:template>
</xsl:stylesheet>
>
> <root>
> <b>d</b>
> <b>o</b>
> <b>g</b>
> and
> <b>c</b>
> <b>a</b>
> <b>t</b>
> <b>s</b>
> </root>
>
> into
>
> <root>
> <b>dog</b>
> and
> <b>cats</b>
> </root>
>
> Many thanks in advance,
> Richard Bondi
>
>
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
****************************************************************
Jarkko Moilanen "Erehtyminen on inhimillista,
Researcher/ ITCM mutta todella suuret mokat
jm60697@uta.fi vaativat tietokoneen käyttöä."
www.uta.fi/~jm60697
GSM: +358 50 3766 927
****************************************************************
* ITCM | Information Technology and Crisis Management
* http://www.itcm.org
****************************************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list