[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to mark every 5th output record.
On 11/03/2008, Patrick Bergeron <pbergeron@xxxxxxxxxxx> 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|