Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 08-09-2009
Join Date: Sep 2009
Posts: 2
XSL Sorting Question

I am a bit of a newbie when it comes to XSL. I have worked with it, but only at beginner to intermediate levels. Which is why I am having a problem resolving my current issue. I have a node list that is built. the node list is the passed to the XSL file. As it works now, the top 10 nodes are selected and then sorted by date. I want it to sort the entire collection by date, then display the top 10. Can any one lend a hand? the current code is:
  <xsl:template match="/">
      <xsl:apply-templates select="descendant::event[position() &lt; 11]">
        <xsl:sort order="ascending" select="month" data-type="number"/>
        <xsl:sort order="ascending" select="day" data-type="number"/>
        <xsl:sort order="ascending" select="year" data-type="number"/>
        <xsl:sort order="ascending" select="substring-before(starttime, ':')" data-type="number"/>
        <xsl:sort order="ascending" select="substring-before(substring-after(starttime, ':'), ' ')" data-type="number"/>
        <xsl:sort order="ascending" select="substring-after(starttime, ' ')" data-type="text"/>

Reply With Quote
Old 08-09-2009
Join Date: Sep 2009
Posts: 2
Re: XSL Sorting Question

I found my error - i was sorting in the wrong location. i changed the if statement qualifier to another location and that solved my problem. If anyone wants or needs further detail on this, ping me.
Reply With Quote

  TechArena Community > Software > Software Development
Tags: ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "XSL Sorting Question"
Thread Thread Starter Forum Replies Last Post
Sorting by Surname in Excel Ojsuta MS Office Support 2 23-02-2012 04:56 PM
sorting linkedlist duper Software Development 1 05-06-2011 03:30 AM
Sorting a hashmap Gunner 1 Software Development 5 10-02-2010 05:06 AM
Sorting an Array in PHP Gomeler Software Development 3 31-10-2009 12:10 PM
How to disable automatic sorting Benjamin Windows Software 3 24-03-2009 11:37 PM

All times are GMT +5.5. The time now is 05:49 AM.