xsl-list
[Top] [All Lists]

[xsl] Transforming a non-hierarchical XML into a hierarchical one

2007-03-08 03:20:25
Hello everybody, I have to transform a non hierarchical XML:

        <sumario>
                <seccion txt=""/>
                <subseccion txt=""/>
                <organismo txt=""/>
                <anuncio txt=""/>
                <organismo txt=""/>
                <anuncio txt=""/>
                <organismo txt=""/>
                <anuncio txt=""/>
                <subseccion txt=""/>
                <organismo txt=""/>
                <anuncio txt=""/>
                <seccion txt=""/>
                <subseccion txt=""/>
                <organismo txt=""/>
                <anuncio txt=""/>
                ...
        </sumario>

into a hierarchical XML, doing this via XSLT. The result must be like this:

        <sumario>
                <seccion id="">
                        <subseccion id="">
                                <organismo id="">
                                        <anuncio>
                                        </anuncio>
                                        ...                                     
        
                                </organismo>
                        </subseccion>
                </seccion>
                ...
        </sumario>

I would apreciate any idea or advice, thx.

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