[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A challenge.. Group Periods of Data (1..5, 2..8,
(Commenting on David again)
At 04:47 AM 5/5/2005, he wrote: Once it is was clear that there was an atomic test that you could do that flagged when the group needed to change then it's pretty much a standard grouping question of the type that we see on this list every day for the last 7 years or so:-) The thing that makes this one a bit more interesting (and stops the usual grouping solutions working out of the box) is that you need to add an attribute to the grouping element that you don't know until the end of the group. As you have to add attributes before child elements this means that you have to save up the child elements to add later, hence the $g parameter. Apart from that it's a standard "tree walking" grouping method, another example of which I posted in another thread earlier in the week (in that case grouping on processing instruction nodes) This is a good example of how once you've assimilated certain principles and higher-level methods, the hard problems become more tractable. An excellent reason to read this list. More generally, it's also interesting how solutions can "leapfrog" over one another. For example, the key-based solution to grouping-by-proximity was developed by several list members bouncing off each other, back a few years ago now. Now it's standard practice. What's not so good is when a solution becomes so "standard" that we stop seeing other possible ways to go about things. I think there's lots of code out there that gets out the big guns when it doesn't have to. But sometimes the collective Brain gets too coherent and well-organized, squashing its own imagination. Cheers, Wendell
|
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
|