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

Sorting Alphabetically to an HTML Table

Subject: Sorting Alphabetically to an HTML Table
From: "Davis, Carrie" <carrie.davis@xxxxxxxxxx>
Date: Wed, 18 Jun 2003 10:51:32 -0400
sorting alphabetically
Hi.  I have been working on this for 3 days and I cannot find the answer, I hope that someone can point me in the right direction:
 
This is the XML:
<eip_documents>
    <doclink>
            <display_text></display_text>
            <description> </description>
           <url></url>
    </doclink>
</eip_documents>
 
The doclinks come in alphabetically to the stylesheet from the XML, so I do not have to sort, but I do have to have the documents in 3 even table columns.
 
So they should look like this if I have 7 documents:
 
Document 1        Document 4    Document 7
Document 2        Document 5
Document 3        Document 6
 
Or like this if I have 6 documents
 
Document 1        Document 3        Documnet 5
Document 2        Document 4        Document 6
 
Here is what I have - I have having a hard time starting the new columns:
<xsl:template match="doclink" mode="morethanfive">

<td>

<table>

<xsl:variable name="currentnode" select="position()"/>

<xsl:for-each select=".">

<tr>

<td class="text9pt">

<a> <xsl:attribute name="href">javascript:openUrl ('<xsl:value-of select='url'/>')</xsl:attribute><xsl:value-of select="display_text"/></a><br/><xsl:value-of select="description"/>

</td>

</tr>

<xsl:if test="($currentnode mod $divDoc=0)">

</xsl:if>

<xsl:if test="($currentnode mod 3=1)">

</xsl:if>

<xsl:if test="($currentnode mod 3=2)">

</xsl:if>

</xsl:for-each>

</table>

</td>

</xsl:template>

I am sorry if this is trivial.  Thank you for any help you can give.
Carrie Davis
 
 

 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.