[xsl] How to use xsl:key to get all values?

Subject: [xsl] How to use xsl:key to get all values?
From: "Di Luo" <dluo@xxxxxxxxxxxxxxxx>
Date: Thu, 12 Apr 2001 17:45:59 -0400

Based on the following XML and XSL file, I'd like to output "1"  "2". But I
just get "1" "1". Any body can tell me what is wrong with
Thanks in advance!


<?xml version="1.0"?>
				<EE aField="a1" value="1"/>
				<EE aField="a1" value="2"/>

<?xml version="1.0"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
	xmlns="http://www.w3.org/TR/WD-xsl"; version="1.0">

    <xsl:output method="text"/>
    <xsl:key name="key-name" match="EE" use="@aField" />
    <xsl:template match="AA/BB">
        <xsl:for-each select="CC">
 		<xsl:variable name="child" select="key('key-name', 'a1')" />
                     	<xsl:value-of select="$child/@value" />


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread