|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Grouping into a table (for vertical alignment)
Hi Daniel,
At 11:01 PM 5/27/2004, you wrote: Thanks Wendell... trying to figure it out now :p That's right: it's the other technique I mentioned: the "forward walk" or "tree visitor". The key-based technique is just called "key-based positional grouping" (since the nodes are grouped based on their relative positions), although I like to call it "levitation". The trade-off is that walking the tree explicitly makes for more complex templates that work in what, to a newbie, is a highly unorthodox way, since they use <xsl:apply-templates select="following-sibling::*[1]" mode="walk"/> or the like. Using keys is a bit more elegant in the XSLT, arguably, but lays the stress on that key declaration, whose XPath (as you saw) can be ... "ornate", let's say. I got a question on entry 17: You are correct, it's the node list of the following siblings. (The context of a predicate is provided by the nodes and node-set the predicate operates on.) But you don't actually want this as it groups by a count -- first three nodes, next three nodes, next three nodes -- or they could be in twelves or nineteens: you get the idea. Whereas you need to group based on what nodes' neighbors are (which is why your problem is a bit harder). I really appreciate all the help I am getting from this list. Thanks all. Sure. You have a toughie, but it's been done. Digging in the archives for "forward walk" or "tree visitor" would be a way to learn more about the technique I did *not* explain (but which some say is easier: I dunno, if you understand keys I think they're about the same). 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
|

Cart








