|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] climbing to the root element
Hello!
My xml doc has a structure like the one at the end of this letter.
If an item has a nametype=multiple, then I have to
prefix their nametext with their containing item nametext.
I have to repeate it as many times as multiple type items cascaded
together, plus the one item with simple type above them.
The expected output is this:
a
b
bi
biv
bj
c
There are several other container elements between the simple and
multiple type items, so i can't predict how deep I am, and how far
should i look for the parent item.
My real problem is that I can't make a recursive function to go back
to the / direction.
Could you give me some ideas?
Thank you!
Csaba
<xml>
<item>
<itemname nametype="simple">
<nametext>a</nametext>
</itemname>
</item>
<item>
<itemname nametype="simple">
<nametext>b</nametext>
</itemname>
<item>
<itemname nametype="multiple">
<nametext>i</nametext>
</itemname>
<item>
<itemname nametype="multiple">
<nametext>v</nametext>
</itemname>
</item>
</item>
<item>
<itemname nametype="multiple">
<nametext>j</nametext>
</itemname>
</item>
</item>
<item>
<itemname nametype="simple">
<nametext>c</nametext>
</itemname>
</item>
</xml>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








