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