Hi,
I'm trying to apply Muenchian grouping to the XML displayed below but
having no success, I'm trying to group on the section element, any
pointers would be much appreciated:
Thanks,
Mike
---- XML ----
<?xml version="1.0" encoding="utf-8"?>
<page>
<attributes>
<pagename>The Band</pagename>
<name>the_band</name>
<menuname>The Band</menuname>
<pageidentifier>english/the_band</pageidentifier>
<status>open</status>
<lastedited></lastedited>
</attributes>
<containers>
<container name="content">
<elements>
<element type="BandMember">
<name>Luke Skywalker</name>
<section>Front Row Cornets</section>
<position>Solo</position>
<joined>1992</joined>
<composer>Gershwin</composer>
<musicpiece>Lazy Trumpeter</musicpiece>
<bandmoment>something</bandmoment>
<notes></notes>
</element>
<element type="BandMember">
<name>Joe Bloggs</name>
<section>Basses</section>
<position>1st</position>
<joined>2004</joined>
<composer>Something</composer>
<musicpiece>Someething</musicpiece>
<bandmoment>Something</bandmoment>
<notes></notes>
</element>
<element type="BandMember">
<name>Some Body</name>
<section>Front Row Cornets</section>
<position>1st</position>
<joined>2003</joined>
<composer>jkjjkh</composer>
<musicpiece>hkjhjkh</musicpiece>
<bandmoment>Test</bandmoment>
<notes>Some notes</notes>
</element>
</elements>
</container>
</containers>
</page>
---------------
--- XSLT ----
<xsl:key name="section-group" match="element"
use="@type='BandMember'"/>
<xsl:template match="/" mode="show">
<xsl:for-each select="element[generate-id() =
generate-id(key('section-group',section) [1])]">
<h1>
<xsl:value-of select="section"/>
</h1>
<xsl:for-each select="key('section-group',section)">
<xsl:value-of select="name"/>
<br/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
----------------