xsl-list
[Top] [All Lists]

Creating unique groups

2004-12-03 19:06:57
I have this XML representing 2 groups (spread across 4 group elements):

<root>

        <group name="group1">
                <entry name="entry1" />
                <entry name="entry2" />
        </group>

        <group name="group1">
                <entry name="entry3" />
        </group>

        <group name="group2">
                <entry name="entry4" />
                <entry name="entry5" />
        </group>

        <group name="group2">
                <entry name="entry6" />
        </group>

</root>

What would be the best approach to turn it into the following output, where the name of the group is used as the identifier of what should be a unique group element?

<root>

        <group name="group1">
                <entry name="entry1" />
                <entry name="entry2" />
                <entry name="entry3" />
        </group>

        <group name="group2">
                <entry name="entry4" />
                <entry name="entry5" />
                <entry name="entry6" />
        </group>

</root>

Right now, I just need someone to point me in the right direction to get me started.

Thanks,
/dave


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