RE: [xsl] sorting information from multiple files

Subject: RE: [xsl] sorting information from multiple files
From: "John Meyer" <jmeyer@xxxxxxxxxxx>
Date: Thu, 15 Jan 2004 10:31:36 -0500
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: [xsl] 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