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

Re: Problem in Preceding node.

Subject: Re: Problem in Preceding node.
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 3 Oct 2005 13:09:12 +0100
Re:  Problem in Preceding node.
On 10/3/05, aaron apigo <aaronjose_apigo2001@xxxxxxxxx> wrote:
> Hi All,
>    Got another question regarding the preceding node.
>
> with this input file,
>
> <xml>
> <a>
>     <b>
>         <c>Level 1</c>
>     </b>
> </a>
> <d/>
> <e/>
> <a>
>     <b>
>         <a>
>            <b>
>               <c>Level 2</c>
>            </b>
>        </a>
>     </b>
> </a>
> <d/>
> <e/>
> <a>
>     <b>
>         <c>Level 1</c>
>     </b>
> </a>
> ..........
> </xml>
>
> i want to output like this
> <xml>
> <sections>
>    <section>
>        <label>1</label>
>           <title>Level 1</title>
>     <d/>
>     <e/>
>    <section>
>        <label>1.1</label>
>           <title>Level 2</title>
>     <d/>
>     <e/>
>     </section>
>     </section>
>    <section>
>        <label>2</label>
>           <title>Level 1</title>
>     <d/>
>     <e/>
>    </section>
> </sections>
> </xml>
>
> i hope that with this data, you understand my point.

Well, a few sentences might speed things up :)

Have a look at <xsl:number> and use it generate the content for <label>

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.