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
    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:template match="code">

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

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

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

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


    <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>
    <xsl:apply-templates select="following-sibling::*[1]" mode="next"


    tsirman, Apr 29, 2004
    1. Advertisements

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.