[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

recursion

Subject: recursion
From: "Szabo, Patrick \(LNG-VIE\)" <patrick.szabo@xxxxxxxxxxxxx>
Date: Fri, 18 Feb 2011 10:11:28 +0100
 recursion
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.