|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Grouping on multiple nested elements
Hello Paul :) > I have no problem grouping by program_name using the Muenchian > method - there is only one program_name for each story. However, > grouping by subject has me stumped - do I need multiple keys and how > do I keep track of the current subject? The essential hint here is that when you use the Muenchian Method you must have a 1:1 correspondence between the nodes that you're grouping and the values that you're grouping by. When you're grouping stories by program name, that's fine because each story only has one program name. If you want to group stories by subject you have to go one level down and actually group subject elements by their value: <xsl:key name="bySubject" match="story/subjects/subject" use="." /> Then do the normal Muenchian Method stuff, except selecting the subject elements and moving up the tree to their ancestor story in order to get information about ... oh, like I see Jarno's just posted :) Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|

Cart








