This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Extending xsltproc?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]