Subject: Re: [xsl] recursion From: Michael Kay <mike@xxxxxxxxxxxx> Date: Fri, 18 Feb 2011 09:50:50 +0000 |
<line level="1"/> <data/> <data/> <line level="2"/> <data/> <line level="3"/>
Michael Kay Saxonica
Hi,
I'm using XSLT 2.0 and Saxon 9
I have this:
<nummerierte-liste ebene="1"> <listnum>1.</listnum> <punkt> <absatz>Bundessache hinsichtlich</absatz> </punkt> </nummerierte-liste> <nummerierte-liste ebene="2"> <listnum>a)</listnum> <punkt> <absatz>der Vergabe von AuftrC$gen durch den Bund;</absatz> </punkt> <listnum>b)</listnum> <punkt> <absatz>der Vergabe von AuftrC$gen durch Stiftungen, Fonds und Anstalten im Sinne des Art. 126b Abs. 1;</absatz> </punkt> </nummerierte-liste> <nummerierte-liste ebene="3"> <listnum>aa)</listnum> <punkt> <absatz>den, wenn der Finanzierungsanteil des Bundes mindestens gleich groC ist wie der der LC$nder;</absatz> </punkt> <listnum>bb)</listnum> </nummerierte-liste> <nummerierte-liste ebene="2"> <listnum>f)</listnum> <punkt> <absatz>der gemeinsamen Vergabe von AuftrC$gen durch den Bund und die LC$nder, wenn der Anteil des Bundes</absatz> </punkt> <listnum>g)</listnum> <punkt> <absatz>der Vergabe von AuftrC$gen durch in lit. a bis f und Z 2 nicht genannte RechtstrC$ger;</absatz> </punkt> </nummerierte-liste> <nummerierte-liste ebene="1"> <listnum>2.</listnum> <punkt> <absatz>Landessache hinsichtlich</absatz> </punkt> </nummerierte-liste>
What i need to do is wrap it all up into one list. @ebene tells us which layer the nummerierte-liste is in. So a nummerierte-liste with @ebene="2" should be a child of the last punkt of the first preceding nummerierte-liste with @ebene="1". A nummerierte-liste with @ebene="3" should be the child of the last punkt of the first-preceding nummerierte-liste with @ebene="2" and so on.
I know this has to be done with recursion but I'm just not good at this and i can't seem to figure it out.
Can anyone help me ?!
Kind regards
. . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT-Entwickler LexisNexis Marxergasse 25, 1030 Wien
mailto:patrick.szabo@xxxxxxxxxxxxx Tel.: +43 (1) 534 52 - 1573 Fax: +43 (1) 534 52 - 146
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] recursion, Szabo, Patrick \(LNG | Thread | AW: [xsl] recursion, Szabo, Patrick \(LNG |
[xsl] recursion, Szabo, Patrick \(LNG | Date | AW: [xsl] recursion, Szabo, Patrick \(LNG |
Month |