This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSL nested tag help
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 04 Oct 2002 21:33:26 +0200
- Subject: Re: [xsl] XSL nested tag help
- References: <jUsT.aNoTheR.mEsSaGe.iD.103375238315578@cybelink.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
<xsl:template match="Main">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="Main/text()">
<h1><xsl:value-of select="."/></h1>
</xsl:template>
<xsl:template match="Main/Target">
<h2><xsl:value-of select="."/></h2>
</xsl:template>
Regards,
Joerg
Mani Malarvannan wrote:
Hi,
I've following XML file.
<Main>
This is a first test message
<Target> and </Target>
it is important
</Main>
From the above XML file I'd like to write and XSL so that I'll get
following output
<h1>This is a first test message<h1> <h2> and </h2> <h1>it is important
</h1>
I tried with xsl:for, xsl:if, xsl:while to check the tag but nothing
is working. Any tips or pointers will help me a lot.
Thanks for your help
-Mani
mani@cybelink.com
www.cybelink.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list