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

Next Node

Subject: Next Node
From: "kobily.metaman.maker9" <kobily@xxxxxxxx>
Date: Thu, 14 Jun 2001 15:30:09 +0200
xsl for each contador
Hi !!!
I have this XML
<PAGE>
<partner name="Oops" image="3810.bin" url="www.oops.com">
    <text>
      <line>development tool</line>
      <line>Integrated Development Environment.</line>
    </text>
</partner>
</PAGE>

Of course, this has a lot of partner elements.
I´m using this XSL

<xsl:for-each select="//PAGE/partner">
<xsl:variable name="contador">
<xsl:value-of select="count (//PAGE/partner)"/>
</xsl:variable>
<xsl:if test="contador div //PAGE/partner[position()] = 1">
<tr>
<td>
<p>
<b>
<xsl:value-of select="@name"/>
</b>
</p>
<br/>
<a href="http://{@url}" target="_blank">
<img src="{@image}.bwpf?bwpsid={//bwp_page/@bwpsid}&amp;bwpsky={//bwp_page/@bwpsky}" border="0"/>
</a>
<p/>
<xsl:value-of select="text/line"/>
</td>
<xsl:if test="contador div //PAGE/partner[position()] = 0">
<td>
<p>
<b>
<xsl:value-of select="@name"/>
</b>
</p>
<br/>
<a href="http://{@url}" target="_blank">
<img src="{@image}.bwpf?bwpsid={//bwp_page/@bwpsid}&amp;bwpsky={//bwp_page/@bwpsky}" border="0"/>
</a>
<p/>
<xsl:value-of select="text/line"/>
</td>
</xsl:if>
</tr>
</xsl:if>
</xsl:for-each>


As you see, I´m calling the same element in the same for-each, but I want to call "the next" element in the second if statement.
I was looking to use following-sibling but I could not do it.
Do you know how to do it?


Thanks a lot.


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



Current Thread
  • Next Node
    • kobily.metaman.maker9 - Thu, 14 Jun 2001 09:38:26 -0400 (EDT) <=

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.