Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xsl file problem with sorting

Thread Tools

xsl file problem with sorting

Posts: n/a

well i have a problem with an xsl file. i create two columns of my
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: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={node name}">
<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"

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL sorting problem XML 11 07-06-2005 10:37 PM
XSL Question tp xsl:for-each and xsl:variable XML 1 05-27-2005 09:25 PM
XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) Kevin Flood Java 1 09-13-2004 02:28 PM
XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) Kevin Flood Java 0 09-08-2004 02:11 PM
sorting <xsl:for-each> versus <xsl:apply-templates> Sparko XML 0 07-09-2004 09:03 AM