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

RE: sorting information from multiple files

Subject: RE: sorting information from multiple files
From: "John Meyer" <jmeyer@xxxxxxxxxxx>
Date: Thu, 15 Jan 2004 10:31:36 -0500
xsl for each multiple files
You can do it (fairly easiliy) if you perform the same operation in each
of the for-each elements. Just use a union operator, which is the
vertical pipe character '|' and use a single for-each followed by the
sort element 

 <xsl:for-each select="document(http:..doc1..)| document(http:..doc2..)|
document(http:..doc3..)| document(http:..doc4..)">
	<xsl:sort select="my-sort-expression"/>
</xsl:for-each>

John Meyer
Senior Software Engineer
Clinician Support Technology
1 Wells Avenue, Suite 201
Newton, MA 02459
www.cstlink.com

-----Original Message-----
From: james walker [mailto:jameswalkerandy@xxxxxxxxxxx] 
Sent: Thursday, January 15, 2004 9:56 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  sorting information from multiple files

If i have 4 xml files which i am selectively pulling information from,
is 
there anyway i can sort this selective information in ascending order.
E.g. 
i have 4 for-each loops which gather specific info from each file:
<xsl:for-each select="document(http:..doc1..)"></xsl:for-each>
<xsl:for-each select="document(http:..doc2..)"></xsl:for-each>
<xsl:for-each select="document(http:..doc3..)"></xsl:for-each>
<xsl:for-each select="document(http:..doc4..)"></xsl:for-each>

if the info gathered was letters of the alphabet and doc1 contained
"xyz", 
doc2 contained "abc", doc3 contained "hut" and doc4 contained "jwr", the

output using t he foreach loops above would be:
x
y
z
a
b
c
h
u
t
j
w
r
however i wanted the result
a
b
c
h
j
r
t
u
w
x
y
z
is this possible?

_________________________________________________________________
Tired of 56k? Get a FREE BT Broadband connection 
http://www.msn.co.uk/specials/btbroadband


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


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


Current Thread

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.