xsl-list
[Top] [All Lists]

removing superfluous nodes

2003-06-10 04:45:57
I'm having the following XML

<Chapter>
 <FirstPage>
   <PAGE id="1">
     ...
     <Next>
       <PAGE id="2">
       ...
         <Next>
           <PAGE id="3">
           ...
           </PAGE>
         </Next>
       </PAGE>
     </Next>
   </PAGE>
 </FirstPage>
</Chapter>

The PAGE (and the id attributes) nodes are not necessary and I want to remove them so I get the following

<Chapter>
 <FirstPage>
     ...
     <Next>
       ...
         <Next>
           ...
         </Next>
     </Next>
 </FirstPage>
</Chapter>

With other words I want all the childnodes of all the PAGE nodes moved one level up. Since PAGE nodes contain other PAGE nodes I'm at a loss here.

Anybode has an idea how to solve this I'm not a genius concerning XSLT.

Cheers
Dave

_________________________________________________________________
MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.be


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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