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

RE: Incremental Numbering

Subject: RE: Incremental Numbering
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 9 May 2006 20:38:25 +0100
RE:  Incremental Numbering
> >Is there any way I can store and increment a value in this way?
> 
> No, but I'm sure from your earlier comment that you've 
> already determined from the archives that this is not possible.

Well, there is an alternative solution to Ken's: in fact two. Ken computes
the number for each item as a function of information in the source, which
is a perfectly reasonable approach in this case but doesn't work for all
such problems. 

Plan B is to process the source records using recursion: write a
function/template that processes one input record, then calls itself to
process the remainder. On the recursive call, you can pass parameters that
represent the current state, for example a number which increments on each
call.

Plan C is a two-phase transformation: first generate the output table, then
in a second pass, number its cells.

Michael Kay
http://www.saxonica.com/

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-2011 All Rights Reserved.