Suppose I have the following collection of "word" elements:
<word>
<id>1</id>
<text>My</text>
</word>
<word>
<id>2</id>
<text>name</text>
</word>
<word>
<id>3</id>
<text>is</text>
</word>
<word>
<id>4</id>
<text>Joe</text>
</word>
Given an integer ID value, in order to find the corresponding TEXT, I can do this:
<xsl:key name="word-by-id" match="word" use="id"/>
return key('word-by-id', string($ID))/text
But what if word are instead specified as
<word id=1>
<text>My</text>
</word>
How do I need to change the "xsl:key" in order to retrieve TEXT using ID?
Thanks