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

sorted table elements

Subject: sorted table elements
From: Saverio Perugini <sperugin@xxxxxxxxxxxxxxxx>
Date: Thu, 3 Oct 2002 10:10:29 -0400 (EDT)
html sorted table
Hello,

I'd like to produce a 4 column HTML table where each <td>
element is alphabetically sorted from cell 1,1 to cell n,4
(where n is the required number of rows).

The following is an attempt:

<table>
   <xsl:for-each select="*[position() mod 4 = 1]">
      <xsl:sort data-type="text" select="name()"/>
         <tr>
            <xsl:for-each select=".|following-sibling::node()[position() &lt; 4]">
               <td>...</td>
            </xsl:for-each>
         </tr>
   </xsl:for-each>
</table>

This code only sorts all the *[position() mod 4 = 1] elements.
Therefore, only column one is sorted, whereas I wanted the entire
table (an linear list from cell 1,1 to cell n,4 sorted).  Can this be done?

Thank You and Best Regards,

S. Perugini


 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.