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

How to move sibling 1 to child, sibling 2 to grandchi

Subject: How to move sibling 1 to child, sibling 2 to grandchild...
From: Alex Muir <alex.g.muir@xxxxxxxxx>
Date: Mon, 15 Aug 2011 20:00:15 +0000
 How to move sibling 1 to child
Hi given the following

         <group xml:id="MILHIS_Yes">
            <name>Yes</name>
         </group>
         <group xml:id="MILHIS_Vehicles">
            <name>Vehicles</name>
         </group>
         <group xml:id="MILHIS_Air">
            <name>Air</name>
         </group>
         <group xml:id="MILHIS_Aeroplane">
            <name>Aeroplane</name>
         </group>
         <item xml:id="MILHIS_Attack_Aircraft">
            <name>Attack Aircraft</name>
         </item>

I'm trying to convert it to without any success.

    <group xml:id="MILHIS_Yes">
      <name>Yes</name><group xml:id="MILHIS_Vehicles">
        <name>Vehicles</name>
        <group xml:id="MILHIS_Air">
          <name>Air</name>
          <group xml:id="MILHIS_Aeroplane">
            <name>Aeroplane</name>
            <item xml:id="MILHIS_Attack_Aircraft">
              <name>Attack Aircraft</name>
            </item>
          </group>
        </group>
      </group>
    </group>

How do you do this in xslt assuming you could have any number of
groups followed by 1 item?

Regards
--
Alex Muir
Instructor | Program Organizer - University Technology Student Work
Experience Building
University of the Gambia
http://sites.utg.edu.gm/alex/

Low budget software development benefiting development in the Gambia,
West Africa
Experience of a lifetime, come to Gambia and Join UTSWEB -
http://sites.utg.edu.gm/utsweb/

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.