xsl-list
[Top] [All Lists]

RE: [xsl] Add an element that contains multiple nested elements

2006-05-17 04:35:34
It's difficult to tell what you're doing wrong without seeing what you're
doing...

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Gianluca Garbellotto [mailto:gg(_at_)iphix(_dot_)net] 
Sent: 16 May 2006 16:44
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Add an element that contains multiple nested elements

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.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>