xsl-list
[Top] [All Lists]

only display if subnodes occur more than once

2005-06-23 03:06:42
Hi,

I'm stuck again with my XSL. My XML Structure looks like:

<root>
        <sub_a>
                <elem_1/>
                <elem_2/>
                <elem_3/>
        </sub_a>
        <sub_b>
                <elem_1/>
                <elem_2/>
                <elem_2/>
                <elem_2/>
                <elem_3/>
        </sub_b>
        <sub_c>
                <elem_1/>
                <elem_2/>
                <elem_3/>
        </sub_c>
</root>

The thing I want to do is display the element sub_b, because it has
subnodes which occur more than once (elem_2). I really have no idea how
to test for this - playing around for nearly two hours now. Im using a
loop like <xsl:for-each select="/root/*"> and the output should look
like

sub_b (this is the header)
elem_2
elem_2 (these are the 3 values of elem_2)
elem_2

Best regards,
Clemens Prerovsky

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