Subject: Re: [xsl] Grouping on multiple nested elements From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Tue, 16 Jul 2002 09:38:32 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Grouping on multiple nested e, PAUL DICKINSON | Thread | RE: [xsl] Grouping on multiple nest, Jarno . Elovirta |
Re: Re: [xsl] Re: WML input problem, ashu t | Date | Re: Re: Re: Re: [xsl] Doubled outpu, ashu t |
Month |