xsl file problem with sorting

T

tsirman

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>
------------------------------------------------
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top