[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Extending xsltproc?
>>>>> "T" == Thomas B Passin <tpassin@xxxxxxxxxxxx> 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@xxxxxxxxxxx> 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
|
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
|