[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xsl:for-each question

Subject: Re: xsl:for-each question
From: r.devries@xxxxxxxx
Date: Thu, 30 Oct 2003 13:22:11 +0100
intended for each xsl
Hi Michael,

What David means is that XSL is a template language and you have to learn
to think in templates, not in for-each.
The node you want to do something with is "topic", so write a template for
it.
Maybe this example will help you on the way (the depth of nesting in
"topic" doesn't matter, the template will call itself):

<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html"/>

  <xsl:template match="*">
    <table border="1">
      <tbody>
        <tr>
           <xsl:apply-templates/>
        </tr>
      </tbody>
    </table>
  </xsl:template>

  <xsl:template match="topic">
    <td>
      <xsl:value-of select="@name"/>
    </td>
    <xsl:apply-templates/>
  </xsl:template>

</xsl:stylesheet>


Greetings René
???{@   @}
  ??????^
?? ???\_/

"You don't need eyes to see, you need vision!"

TJIP PCL
Steenovenweg 3
5708 HN  Helmond
The Netherlands
tel: +31(0) 492 502 226
fax: +31(0) 492 502 299
e-mail: R.deVries@xxxxxxxx
internet: www.tjip.com

***************************DISCLAIMER********************************
Deze e-mail is uitsluitend bestemd voor de geadresseerde(n).
Verstrekking aan en gebruik door anderen is niet toegestaan.
TJIP PCL sluit iedere aansprakelijkheid uit die voortvloeit uit
elektronische verzending.

This e-mail is intended exclusively for the addressee(s), and may
not be passed on to, or made available for use by any person
other than the addressee(s). TJIP PCL rules out any and every liability
resulting from any electronic transmission.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.