02/06/26 18:05 vhsxGiH5
こうかな、、
<?xml version="1.0" encoding="Shift_JIS"?>
<xsl:stylesheet xmlns:xsl="URLリンク(www.w3.org)" version="1.0">
<xsl:key name="group" match="doc/foo" use="a" />
<xsl:template match="/">
<html><body><xsl:apply-templates/></body></html>
</xsl:template>
<xsl:template match="doc">
<xsl:for-each select="foo[count(. | key('group', a)[1]) = 1]">
<xsl:sort select="a" data-type="text" order="ascending"/>
<xsl:for-each select="key('group', a)">
<xsl:value-of select="a" />
<xsl:value-of select="b" />
<br />
</xsl:for-each>
<hr/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>