Re: [xsl] For-each and keys()

Subject: Re: [xsl] For-each and keys()
From: Steve <subsume@xxxxxxxxx>
Date: Mon, 31 Jul 2006 12:57:46 -0400
On 7/31/06, andrew welch <andrew.j.welch@xxxxxxxxx> wrote:
Change this key to
<xsl:key name="oldID" match="option" use="@oldID" />

Ok, did that. I can see why that happens.


<xsl:for-each select="$Definitions">
  <xsl:value-of select="count(key('oldID',$current))" />
</xsl:for-each>

I really don't understand this. I should mention there are many other branches within $Definitions besides /disabilities.

You have a few other typo's to fix (if you code matches your example)
but that should be it.

Making the changes you suggested gives me something like


Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	1
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	1
Cognitive 	1
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	1
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	2
Cognitive 	1
Cognitive 	2
Cognitive 	2
Cognitive 	2

*and so on and so forth for dozens of lines*

Perhaps one of the typos you noticed may be causing this?

Thanks so much for your help,

-Steve

Current Thread