xsl-list
[Top] [All Lists]

Re: [xsl] How to mark every 5th output record.

2008-03-11 07:21:36
On 11/03/2008, Patrick Bergeron <pbergeron(_at_)innobec(_dot_)com> wrote:
 As I said the rules under which I process my list are quite complex. So much
 so that my XSLT stylesheet is over 2900 lines of code (and yes, that's just
 nuts).

That's actually quite normal with XSLT.  Someone once suggested 1
template per file in an attempt to make a large stylesheet of mine
more "managable"... which is of course nonsense.

Modularize your stylesheets when its appropriate, but don't do it just
because 2900 lines seems large.


 Is my only option to create another tree that contains all of my output
 record results, and then iterate over that tree once again, and putput the
 same data verbatim, only this time insert a marker every 5th?

 Gheesh, talk about using a tank to shoot a bird.

Again that's really common technique, is good practice and good
architecture for a transform - separate out your problem into steps
and do one step at a time.  Once it's producing the correct output
then think about whether it really is a problem - you might find that
actually the separation of the steps helps you solve most of problems
you come across in the future as the requirements change.

-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
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>
--~--