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

Add an element that contains multiple nested elements

Subject: Add an element that contains multiple nested elements
From: "Gianluca Garbellotto" <gg@xxxxxxxxx>
Date: Tue, 16 May 2006 11:43:51 -0400
gianluca garbellotto
I use msxsl and XSL 1.0. I need to add a <container> element to a file like
this:

<rootElement>
  <element1>
    <elementA>A</elementA>
  </element1>
...
  <element2>
    <elementB>B</elementB>
  </element1>
</rootElement>
 
This is the result I need to achieve:
 
<rootElement>
 <container>
  <element1>
    <elementA>A</elementA>
  </element1>
...
  <element2>
    <elementB>B</elementB>
  </element1>
 </container>
</rootElement>

and this is what I get with all the various attempts I made:

<rootElement>
 <container>
  <element1>
    <elementA>A</elementA>
  </element1>
 </container>
...
 <container>
  <element2>
    <elementB>B</elementB>
  </element1>
 </container
</rootElement>

Any guidance on how to achieve the result I need would be greatly
appreciated. Thanks.

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.