Results 1 to 2 of 2

Thread: XSL Sorting Question

  1. #1
    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:
    Code:
      <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"/>
          </xsl:apply-templates>
    
      </xsl:template>

  2. #2
    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.

Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,188,700.28504 seconds with 16 queries