xsl-list
[Top] [All Lists]

[xsl] Need to Split/Un-Nest elements

2008-06-12 01:44:03
Hi,

I want to split/un-nest the elements in xml like below:

Input xml:

         <region>
            <page>
               <block>Text1.....</block>
               <block>
                    <inline>Text2.....</inline>
                    <page>
                        <block>Text3.....</block>
                    </page>
                    <inline>Text4......</inline>
               </block>
            </page>
            <page>
               <block>Text5.....</block>
            </page>
         </region>

Desired Output:

   <region>
        <page>
               <block>Text1.....</block>
               <block>
                     <inline>Text2.....</inline>
               </block>
        </page>
        <page>
               <block>Text3.....</block>
        </page>
        <page>
               <block>
                   <inline>Text4......</inline>
               </block>
        </page>
        <page>
               <block>Text5.....</block>
        </page>

   </region>

Can anyone help me on this?

-- 
Thanks & Regards,
Mandar

--~------------------------------------------------------------------
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>