Subject: [xsl] Grouping within sub elements From: "Steve W" <lsl@xxxxxxxxxxxxx> Date: Sat, 29 Jan 2005 07:45:50 -0000 |
I have been trying to use the Muenchian method to group sub-elements within a particular element. So I have something like : <BODY> <ITEM> <ID>AA</ID> <SUBITEM>1</SUBITEM> <SUBITEM>2</SUBITEM> <SUBITEM>1</SUBITEM> <SUBITEM>3</SUBITEM> <SUBITEM>2</SUBITEM> </ITEM> <ITEM> <ID>BB</ID> <SUBITEM>1</SUBITEM> <SUBITEM>4</SUBITEM> <SUBITEM>1</SUBITEM> <SUBITEM>4</SUBITEM> <SUBITEM>4</SUBITEM> </ITEM> <ITEM> <ID>CC</ID> <SUBITEM>2</SUBITEM> <SUBITEM>2</SUBITEM> <SUBITEM>3</SUBITEM> <SUBITEM>3</SUBITEM> <SUBITEM>2</SUBITEM> </ITEM> </BODY> If I was to group all the subitems, I'd use something like <xsl:key name="subs" match="BODY/ITEM" use="SUBITEM" />. Can I apply the same sort of logic within an item group, to get some output something like : Item AA Subitems 1, 2, 3 Item BB Subitems 1,4 Item CC Subitems 2, 3 I can't help thinking I'm missing something obvious but can't see it ! Thanks for all help. Steve
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Finding Even and odd in x, Joe Fawcett | Thread | Re: [xsl] Grouping within sub eleme, Joris Gillis |
Re: [xsl] Relative XPATH between 2 , Dimitre Novatchev | Date | Re: [xsl] Grouping within sub eleme, Joris Gillis |
Month |