sort data in xsl file ->problem

Discussion in 'XML' started by tsirman, Apr 29, 2004.

  1. tsirman

    tsirman Guest

    hello i have the above code and i can't sort my data in the second
    column.
    if someone did not understood i want to say that i have splitted my
    data in two columns so now i want these data to be sorted.
    ------------------------------------
    <?xml version="1.0"?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:template match="code">
    </xsl:template>


    <xsl:template match="categorylist">
    <table width="365" border="0">
    <xsl:apply-templates select="category">
    <xsl:sort select="nodename"/>
    </xsl:apply-templates>
    </table>
    </xsl:template>

    <xsl:template match="category" />
    <xsl:template match="category" mode="next" />

    <xsl:template match="category[position() mod 2 = 1]">
    <tr>
    <xsl:call-template name="nodename" />
    </tr>
    </xsl:template>

    <xsl:template match="category[position() mod 2 != 1]" mode="next">
    <xsl:call-template name="nodename" />

    </xsl:template>

    <xsl:template name="nodename">
    <td width="50%">
    <font face = "Verdana" size = "1" color = "#000066">
    <a HREF="index.php?nodeid={nodeid}&amp;nodename={nodename}">
    <xsl:value-of select="nodename" /></a></font>
    <font face = "Verdana" size = "1" color = "#666666"> (<xsl:value-of
    select="sitecount" />)</font>
    </td>
    <xsl:apply-templates select="following-sibling::*[1]" mode="next"
    />

    </xsl:template>
    </xsl:stylesheet>

    --------------------------------------
    tsirman, Apr 29, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nobody
    Replies:
    0
    Views:
    528
    nobody
    Jun 1, 2004
  2. Replies:
    1
    Views:
    3,588
    A. Bolmarcich
    May 27, 2005
  3. Replies:
    2
    Views:
    9,245
    Martin Honnen
    Sep 5, 2006
  4. Navin
    Replies:
    1
    Views:
    671
    Ken Schaefer
    Sep 9, 2003
  5. Replies:
    9
    Views:
    401
    whisperjim
    Nov 27, 2008
Loading...

Share This Page