Results 1 to 3 of 3

Thread: Unique Sort

  1. #1
    Join Date
    May 2003

    Unique Sort

    I am wanting to sort and display a list of XML nodes that are repeated in the XML doc, but i only want to print each node once, regardless of the number of occurances in the XML. Sorting is easy enough, but the printing once part is beyond me. I have the list of nodes in a key

    Anyone know how to do this?

    One solution would be to loop through all the entries in an xls:key that i have created, but i dont know how to do this either, perhaps something like

    <xsl:for-each select="key('key_name', *)">
    <!-- blah -->

    but not a *, instead a wildcard character



  2. #2
    Join Date
    Dec 2002
    Calgary, Canada
    that will be tough...since xsl is stateless lang.I am not aware of anything that will store a value for future use at run time,You might have to think of some type of recursion to get this done.

  3. #3
    Join Date
    Apr 2003
    May be you can try defining a variable using <xsl:variable name="abc" select="exprssion to loop thro your nodes">
    use this variable in your Key element.I dont know if this works.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center