[Home] [By Thread] [By Date] [Recent Entries]
At 2007-03-03 18:52 -0800, Kevin Grover wrote:
Perfect. Thanks. Just out of curiosity, is this possible (practical?) in XSLT 1.0? I hope this helps. . . . . . . . Ken
t:\>type grover.xsl <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:key name="alet" match="author"
use="substring(name/@file-as,1,1)"/> <xsl:template match="/">
<xsl:for-each select="*/author[generate-id(.)=
generate-id(key('alet',substring(name/@file-as,1,1))[1])]">
<xsl:text>

</xsl:text>
<xsl:value-of select="substring(name/@file-as,1,1)"/>
<xsl:text>
</xsl:text> <xsl:for-each select="key('alet',substring(name/@file-as,1,1))">
<xsl:value-of select="name/@file-as"/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>t:\>call xslt grover.xml grover.xsl grover.out t:\>type grover.out
t:\>rem Done! -- World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|

Cart



