[xsl] Sorting Alphabetically to an HTML Table

Subject: [xsl] Sorting Alphabetically to an HTML Table
From: "Davis, Carrie" <carrie.davis@xxxxxxxxxx>
Date: Wed, 18 Jun 2003 10:51:32 -0400
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