[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Correct way to handle nested tags


Subject: Re: [xsl] Correct way to handle nested tags
From: "Åsa [asplistan]" <asplistan@xxxxxxxxxxx>
Date: Wed, 13 Jun 2001 10:25:56 -0000

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@xxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: XSL List <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxx)
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




Current Thread
Keywords
xsl