Subject: RE: [xsl] How to mark every 5th output record. From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 11 Mar 2008 10:54:49 -0400 |
Cheers, Wendell
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).
Different records (and types of records) are processed using different rules, other records are deferred for later processing, others merged together to produce a final one, some are skipped altogether, some complex operations are performed on yet another set of records, etc. The output file format is crazy, and the spec for the file format is about as obscure and obtuse as I have ever seen in 20 years programming.
But in the end, I end up with a text file that has 1 line per "output record", but these "output records" have almost nothing to do with the input records, and I need to separate them with a marker every 5th.
I can't really do (position() mod 5) on my original input data because it has no correlation to the order of the output records, and it's impossible to create an expression that would select them properly in the order I need.
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.
I'm trying to avoid doing this for other reasons:
1) My input data set is quite large. 2) The XSLT processor is running on an embedded platform with limited memory. 3) I'm already paying the price of doing a copy of the data in an earlier pass, I'd like to not pay the price again.
Is there really, really, really _any_ other way of doing this without making a 3rd copy of my data set?
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to mark every 5th out, Andrew Welch | Thread | RE: [xsl] How to mark every 5th out, Patrick Bergeron |
Re: [xsl] How to mark every 5th out, Florent Georges | Date | Re: [xsl] How to mark every 5th out, Colin Adams |
Month |