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

sorting AND copying of XML via XSL

Subject: sorting AND copying of XML via XSL
From: marcel salathe <ms7141@xxxxxx>
Date: Tue, 9 Sep 2003 17:55:40 +0200 (MEST)
marcel salathe
Hi

I have a XSL question which might be easy to answer, but I couldnt.

Suppose I have an XML document like this:

<foo>
  <bar id="2">
    <item id="6">hello</item>
    <item id="4">world</item>
  </bar>
  <bar id="1">
    <item id="7">how's</item>
    <item id="3">life</item>
  </bar>
</foo>

Now I want to sort the bar elements and then the item elements according to
their Id's, and finally output 
the entire document sorted, e.g.

<foo>
  <bar id="1">
    <item id="3">life</item>
    <item id="7">how's</item>
  </bar>
  <bar id="2">
    <item id="4">world</item>
    <item id="6">hello</item>
  </bar>
</foo>

I could achieve sorting or copying, but I couldnt do both together. I guess
it must be quite a simple 
XSLT. 

Any help very much appreciated.

Best regards,
marcel


-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post


 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.