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

Dynamic numbering of lists in xslt

Subject: Dynamic numbering of lists in xslt
From: xslt.new <xslt.new@xxxxxxxxx>
Date: Mon, 8 Jan 2007 13:04:47 -0600
 Dynamic numbering of lists in xslt
Hi:

I am a newbie to xslt and XSLFO. I have to do a numbering which offers the
flexibility to reorder elements if an element in between is being removed.

I will try to demonstrate with an example input.

<chapter1>
  <section>first section<section>
</chapter1>
<chapter1>
 <section>second section</section>
</chapter1>
<chapter1>
 <section>third section</section>
</chapter1>
<chapter1>
 <section>fourth section</section>
</chapter1>

So, I want my output to look like

1. first section
2. second section
3. third section
4. fourth section

and so on. Suppose one chapter1 element is removed in between, lets say
second section, then the numbering should reset itself so that now the
output looks like:

1. first section
2. third section
3. fourth section

Is it possible to achieve this in xslt and XSLFO?

Please do let me know.

Thanks

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.