[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Sorting Issue

Subject: RE: Sorting Issue
From: "SHEIKH Sajjad" <Sajjad.SHEIKH@xxxxxxxxxxx>
Date: Thu, 22 Jan 2004 10:07:37 +0100
xml sorting issue
Hi all,

Can we say that this sorting is not possible?

Regards,
/s

-----Original Message-----
From: SHEIKH Sajjad 
Sent: 21 January 2004 15:57
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Sorting Issue


Hi all,

Following style sheet processes multiple xml documents (lets say
file1.xml, file5.xml and file8.xml). It will sort all the results by
modificationDate seperately and will output the results as following.

link1	021203	(From File1)
link2	011203	(From File1)
link3	101103	(From File5)
link4	031203	(From File8)
link5	091103	(From File8)


I want to sort everything together.  For example,

link4	031203	(From File8)
link1	021203	(From File1)
link2	011203	(From File1)
link3	101103	(From File5)
link5	091103	(From File8)

Any suggestions?
Regards,
/s


<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <xsl:apply-templates select="/someURIs/file"/> </xsl:template>

<xsl:template match="file">
  <xsl:variable name="copy_current_file" select="document(string(.))"/>
    <table><xsl:apply-templates select="$copy_current_file/ll"/></table>
</xsl:template>

<xsl:template match="ll">

	<xsl:variable name="find_file">
<xsl:for-each select="loc">
 <xsl:if test="position()=last()-1">(From <b><xsl:value-of
select="."/></b>)</xsl:if> </xsl:for-each>
	</xsl:variable>

 <xsl:for-each select="*//lln">
  <xsl:sort select="@modificationDate" order="descending"/>
      <xsl:choose>
       <xsl:when test="@objectname='Folder'">
	<tr>
	 <td>
		<a href="{@docname}/l.shtml">
	  	 <xsl:value-of select="n/@docname"/>
		</a>	
	 </td>
	 <td>
      		<xsl:value-of select="@identity"/>
	 </td>
	 <td>
      		<xsl:value-of select="@modificationDate"/>
	 </td>

		<td><xsl:value-of select="$find_file"/></td>

	</tr>	
       </xsl:when>
      </xsl:choose>
 </xsl:for-each>
</xsl:template>

</xsl:stylesheet>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


______________________________________________________________
This message has been checked for all viruses by BTnet VirusScreen. The
service is delivered in partnership with MessageLabs.

This service does not scan any password protected or encrypted
attachments.  

If you are interested in finding out more about the service, please
visit our website at
http://www.btignite.com/internetservices/btnet/products_virusscreen.htm
==============================================================

______________________________________________________________
This message has been scanned for all viruses by BTnet VirusScreen. The
service is delivered in partnership with MessageLabs.

This service does not scan any password protected or encrypted
attachments.  

If you are interested in finding out more about the service, please
visit our website at
http://www.btignite.com/internetservices/btnet/products_virusscreen.htm
==============================================================

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • Sorting Issue
    • SHEIKH Sajjad - Wed, 21 Jan 2004 09:52:10 -0500 (EST)
      • <Possible follow-ups>
      • SHEIKH Sajjad - Thu, 22 Jan 2004 04:02:54 -0500 (EST) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.