[xsl] Select elements between others

Subject: [xsl] Select elements between others
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Tue, 20 Jan 2004 09:28:48 +0000
I have received, what I consider to be, a badly designed xml file:
<data>
 <block/>
   <item>One</item>
   <item>Two</item>
 <block/>
   <item>One</item>
   <item>Two</item>
   <item>Three</item>
  <block/>
   <item>One</item>
</data>

I want to turn this into a more normal form to make it easier to manage:

<data>
 <block>
   <item>One</item>
   <item>Two</item>
 </block>
 <block>
   <item>One</item>
   <item>Two</item>
   <item>Three</item>
 </block>
 <block>
   <item>One</item>
 </block>
</data>

Thanks

Joe

_________________________________________________________________
Sign-up for a FREE BT Broadband connection today! http://www.msn.co.uk/specials/btbroadband



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



Current Thread