This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Extending xsltproc?
- From: Gary Lawrence Murphy <garym at canada dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: 01 May 2002 23:50:47 -0400
- Subject: Re: [xsl] Extending xsltproc?
- Organization: TCI Business Innovation through Open Source Computing
- References: <002501c1ec67$e760c530$6501a8c0@pcukmka> <m2vgaf20ot.fsf@maya.dyndns.org> <002301c1ec80$77495c30$f70510ac@mitretek.org>
- Reply-to: xsl-list at lists dot mulberrytech dot com
>>>>> "T" == Thomas B Passin <tpassin@mitretek.org> writes:
T> It is "wrong" unless you have an really unusual problem. It
T> sounds like you have an ordinary situation, but it's hard to be
T> sure. The main thing is probably to understand how you decide
T> where to break up the tables with the extra row elements.
thanks for the very helpful illustration; I think my case fits your
first scenario of taking the first 10 nodes and doing a recursion.
The specific application is a one-dimensional list of <product>
container elements redistributed such that the first goes in column
one, the second in column two, the third in column three and so forth
to some value N: The column is the position modulo some value.
The amazon example code tests position for the modulo zero value, and
then inserts "</tr><tr>" which is butt-ugly (if you'll pardon the
vernacular)
What I am hearing, and allow me a novice rephrasing, is that a better
approach is to do a for-each over the original list, and use a test
for modulo N = zero whereupon I recursively call the template starting
on the ((row * N) + 1)th element.
But what if I wanted to split the other way: place ordered items
down the first column to some position value N, then N+1 to 2N are
in column 2, 2N+1 to 3N in column three and so forth?
--
Gary Lawrence Murphy <garym@teledyn.com> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless. They can only give you answers."(Pablo Picasso)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list