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

RE: RE: HTML Table

Subject: RE: RE: HTML Table
From: Jarno.Elovirta@xxxxxxxxx
Date: Thu, 4 Sep 2003 09:35:24 +0300
html table descending
Hi,

You want something in the lines of

  <xsl:template match="root">
    <TABLE>
      <TR>
        <xsl:for-each select="box">
          <TH>
            <xsl:value-of select="@boxref" />
          </TH>
        </xsl:for-each>
      </TR>
      <xsl:for-each select="box">
        <xsl:sort select="count(tin)" data-type="number" order="descending"/>
        <xsl:if test="position() = 1">
          <xsl:for-each select="tin">
            <xsl:variable name="position" select="position()"/>
            <TR>
              <xsl:for-each select="../../box">
                <TD>
                  <xsl:value-of select="tin[$position]/@tinid"/>
                </TD>
              </xsl:for-each>
            </TR>
          </xsl:for-each>
        </xsl:if>
      </xsl:for-each>
    </TABLE>
  </xsl:template>

I.e. first process the head, then get the max number of tin children in a box so you know how many rows you need to create, and then loop through the box elements using the tin that is of the "corresponding index".

Cheers,

Jarno - Bruderschaft: Forever (remix by Feindflug feat. Aeroflot)

 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.