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

Re: html table with three columns - following-sibling

Subject: Re: html table with three columns - following-sibling help?
From: "James A. Robinson" <jimr@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 29 Feb 2004 09:29:59 -0800
html three columns
> <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() &lt; 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() &lt; 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() &lt;= 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


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.