I want to output some result, nodes with merge attribute will be acted like
children of the previous non-merge node, it will work if it is a tree like
<field name="a1">
<field name="a2" merge="true"/>
</field>
<field name="a3"/>
<field name="a4">
<field name="a5" merge="true"/>
<field name="a6" merge="true"/>
</field>
<field name="a7"/>
so I know a5 and a6 is children of a4, and I can process a4 and inside, I
then process a5,a6. The issue now is Ican not have a tree like that, instead
Ihave the flat xml as I posted before. If I loop through the non-merge
nodes, how could I get its non-merge children, for example, if the current
node is a4, how can I get the nodes a5 and a6, but not a7? or on a1, how to
get a2.
Thanks!
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...
davidw wrote:
Hi, I want a xsl so I can categorize a flat xml, like this:
<field name="a1"/>
<field name="a2" merge="true"/>
<field name="a3"/>
<field name="a4"/>
<field name="a5" merge="true"/>
<field name="a6" merge="true"/>
<field name="a7"/>
so the outer loop will go through a1, a3,a4,a6,a7, and in the loop,
under a1, a2 will be called, under a4, a5 and a6 will be called.
What is the desired result XML? Do you want to make field name="a2" a
child element of field name="a1"?
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/