[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Sort on multiple key
I have the xml below which needs to be sorted into key1 key2 order. I can sort it in key1 order ok but can't get the key2 order. I tried this but it doesn't work. I then need to be able to process the sorted xml by element. Can you tell me where I'm going wrong please. Regards Jan Hesselberth <xsl:for-each select="SummaryNo/element/key1"> <xsl:sort select="." order="ascending" data-type="text"/> <xsl:for-each select="ancestor::SummaryNo/key2"> <xsl:sort select="." order="ascending" data-type="text"/> <xsl:for-each select="preceding::element"> <SummaryNo id="123456789"> <key2>12345K00348</key2> <customerName>Investments Limited</customerName> <element id="4"> <key1>2008-04-16</key1> <rolloverResult> <errorDescription>calculateInterestCharge failed</errorDescription> </rolloverResult> </element> <element id="5"> <key1>2008-04-16</key1> <rolloverResult> <errorDescription>calculateInterestCharge failed</errorDescription> </rolloverResult> </element> <element id="6"> <key1>2008-04-18</key1> <rolloverResult> <errorDescription>calculateInterestCharge failed</errorDescription> </rolloverResult> </element> </SummaryNo> <SummaryNo id="234567890"> <key2>56789D00172</key2> <customerName>Freds Developments Limited</customerName> <element id="4"> <key1>2008-04-17</key1> <rolloverResult> <errorDescription>calculateInterestCharge failed</errorDescription> </rolloverResult> </element> <element id="5"> <key1>2008-04-16</key1> <rolloverResult> <errorDescription>calculateInterestCharge failed</errorDescription> </rolloverResult> </element> </SummaryNo> <SummaryNo id="145678999"> <key2>44551J00106</key2> <customerName>Housing Trust Limited</customerName> <element id="1"> <key1>2008-04-16</key1> <rolloverResult> <errorDescription>calculateInterestCharge failed</errorDescription> </rolloverResult> </element> <element id="2"> <key1>2008-04-15</key1> <rolloverResult> <errorDescription>calculateInterestCharge failed</errorDescription> </rolloverResult> </element> <element id="3"> <key1>2008-04-17</key1> <rolloverResult> <errorDescription>calculateInterestCharge failed</errorDescription> </rolloverResult> </element> </SummaryNo> LEGAL NOTICE The information contained in this e-mail and any attachments are private and confidential. This message is solely intended for a particular recipient, if you are not the intended recipient you are prohibited from storing, copying, disseminating or using the information in any way. If you received this e-mail in error please notify the sender immediately. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors, viruses or omissions in the contents of this message, which arise as a result of transmission. This e-mail is not intended to create legally binding commitments on behalf of Northern Rock plc, nor do its contents reflect the corporate views or policies of Northern Rock plc. Northern Rock plc, Registered Office Northern Rock House Gosforth Newcastle upon Tyne NE3 4PL. Registered in England, number 3273685. Telephone No: 0191 2857191 Northern Rock plc is authorised and regulated by the Financial Services Authority for deposit-taking; advising on and arranging mortgages and general insurance; and for introducing life assurance and investments. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|