xsl-list
[Top] [All Lists]

RE: [xsl] Incremental Numbering

2006-05-09 12:38:51
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/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>