Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

xsl file problem with sorting

 
 
tsirman
Guest
Posts: n/a
 
      04-29-2004
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
xmlnssl="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={node name}">
<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>
------------------------------------------------
 
Reply With Quote
 
 
 
Reply

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 ree32@hotmail.com XML 11 07-06-2005 10:37 PM
XSL Question tp xsl:for-each and xsl:variable schaf@2wire.ch 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



Advertisments