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

re-ordering nodes

Subject: re-ordering nodes
From: Srinivasan Guruswami - CSIS Fellow <srini@xxxxxxxxxxxxxxxxx>
Date: Tue, 18 Dec 2001 13:06:29 -0500 (EST)
 re-ordering nodes
Hello XSL Experts:
	I am relatively new to XSL and would like to know how the
following transformation can be accomplished through XSL. I have tried
several sample XSL patterns and I would really appreciate if someone can
throw some light.

Input:
-------->

<?xml version="1.0" encoding="UTF-8" standalone = "no"?>
<list>
<o>
  <a/>
  <b/>
  <a>
     <o> 1 </o>
     <o> 2 </o>
  </a>
  <b>
     <o> 3 </o>
     <o>
        <a value="1"/>
        <b value="2"/>
        <o> 4 </o>
     </o>
  </b>
</o>
</list>


Output
---------->

<?xml version="1.0" encoding="UTF-8" standalone = "no"?>
<list>
<o> 1 </o>
<o> 2 </o>
<o> 3 </o>
<o> 4 </o>
<o>
  <a value="1">
  <b value="2">
</o>
<o>
 <a/>
 <b/>
 <a> <!-- for 1, 2 --> </a>
 <b> <!-- for 3, 4 --> </b>
</o>
</list>

---- End of listing ---->

The goal is to re-group all the <o> nodes at the first level from the root
node. The relative order is not so much of a concern at this time.

Thanks,
-Srini


 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.