This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Correct way to handle nested tags
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Correct way to handle nested tags
- From: "Åsa [asplistan]" <asplistan at hotmail dot com>
- Date: Wed, 13 Jun 2001 10:25:56 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Try like this in the xsl:
<xsl:template match="/">
<html>...and the rest...
<xsl:apply-templates select="text"/>
</html>
</xsl:template>
<xsl:template match="text">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="img">
<img src="{@src}"/>
</xsl:template>
:-) åsa
>From: Athanasios Gaitatzes <gaitat@fhw.gr>
>Reply-To: xsl-list@lists.mulberrytech.com
>To: XSL List <XSL-List@lists.mulberrytech.com>
>Subject: [xsl] Correct way to handle nested tags
>Date: Wed, 13 Jun 2001 12:54:27 +0300
>
>
>Hi there,
>
>I have the xml:
><text>
> some text <img src="img1.gif"/>
> more text <img src="img2.gif"/>
> some more text <img src="img3.gif"/>
> end of text
></text>
>
>How would I generate the html:
>"some text <img src="img1.gif"> more text <img src="img2.gif"> some more
>text <img src="img3.gif"> end of text"
>
>Thank you.
>--
>Athanasios Gaitatzes (gaitat@fhw.gr)
>Virtual Reality Department
>Foundation of the Hellenic World
>254 Pireos St., Tavros 17778, Athens Greece
>Tel: +30 1 483-5300 ext. 1132
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list