[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: html table with three columns - following-sibling
> <Base><Art_group> > <Art file_name="Cityscape" file_uri_lores="/images/book_building/cityscape.jpg" id="1"/> > <Art file_name="Clock" file_uri_lores="/images/book_building/clock.jpg" id="2"/> > <Art file_name="Fish" file_uri_lores="/images/book_building/Fish.jpg" id="3"/> > <Art cdguser_id="0" file_name="Glass Tower" file_uri_lores="/images/book_building/GlassTower.jpg" id="4"/> > <xsl:for-each select="/Base/Art_group/Art[position() mod 3 = 1]"> > <xsl:for-each select=". | following-sibling::/Base/Art_group/Art[position() < 3]"> I'm sorry, but I don't understand the nature of the problem you are trying to solve. From your description (N-row 3-column) and example data it looks like maybe you want to process only a subset of each Art_group's Art elements, perhaps the first 3? <xsl:template match="/Base/Art_group/Art[position() < 4]"> <tr> <td class="data"> <input type="radio" name="art_id" id="art_id" value="{@id}"/> <img src="{@file_uri_lores}" width="135" height="184" id="coverImage" alt="{@file_name}" /> </td> </tr> </xsl:template> Or maybe just 1, 2 & 4? <xsl:template match="/Base/Art_group/Art[position() <= 4]"> <xsl:if test="not(position() div 2 = 3)"> <tr> <td class="data"> <input type="radio" name="art_id" id="art_id" value="{@id}"/> <img src="{@file_uri_lores}" width="135" height="184" id="coverImage" alt="{@file_name}" /> </td> </tr> </xsl:if> </xsl:template> My apologies if I totally missed the nature of the problem you are trying to solve. Jim 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
|