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

Problem with Sorting Elements When using "document()"

Subject: Problem with Sorting Elements When using "document()" to bring in multiple files
From: "Dominic Lisi" <platapusman2000@xxxxxxxxxxx>
Date: Wed, 03 Dec 2003 14:46:33 +0000
dominic lisi
Hello

i have this problem, when i try to sort elements which are comming from external files.
the situation is as follows:


i have a masterfile.xml which contains multiple tags like the following:

<taxpayer file="A004.xml" id="A004"/>

the file reference links to an XML file which contains all the individuals data for example:

<taxpayer id="A004">
   <name>
       <family>Random_1</family>
       <given>Made_Uo_Dude</given>
   </name>
</taxpayer>

i have no trouble getting the information out of the multiple Xml files using the following code:

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


<xsl:template match="/">
       <alpha_list>
           <xsl:apply-templates select="list"/>
       </alpha_list>
   </xsl:template>

<xsl:template match="taxpayer">

<xsl:variable name="taxfile">
<xsl:value-of select="@file"></xsl:value-of>
</xsl:variable>
<person>
<xsl:apply-templates><xsl:sort data-type="text" select="/name"/></xsl:apply-templates>
<xsl:apply-templates select="document(concat($taxfile,''))//family"/>
</person>
</xsl:template>
</xsl:stylesheet>



just wondering if any1 has any pointers/solutions to this sorting of remote data :\


thanks
-{Dom}-

_________________________________________________________________
Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile


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.