[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Next Node
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}&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}&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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|