xsl file problem with sorting

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

  1. tsirman

    tsirman Guest

    hello

    well i have a problem with an xsl file. i create two columns of my
    data.
    a have the above code and i want to have my data sorted.i managed this
    only for the first column of the file.
    --------------------------------------
    <?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. Kevin Flood
    Replies:
    0
    Views:
    1,024
    Kevin Flood
    Sep 8, 2004
  2. Kevin Flood
    Replies:
    1
    Views:
    2,742
    Kevin Flood
    Sep 13, 2004
  3. Sparko
    Replies:
    0
    Views:
    410
    Sparko
    Jul 9, 2004
  4. Replies:
    1
    Views:
    3,613
    A. Bolmarcich
    May 27, 2005
  5. Replies:
    11
    Views:
    794
Loading...

Share This Page