Fix a problem of transtable-lookup when there are identical

words in different word-groups.

Spotted by:	Rudolf Cejka (cejkar at fit dot vutbr dot cz)
This commit is contained in:
Hiroki Sato 2005-09-18 05:40:25 +00:00
parent 158e4ce492
commit efd28bd93b
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=25684

View file

@ -19,8 +19,8 @@
<xsl:when test="document($transtable.xml)/transtable/group[@id = $word-group]">
<xsl:for-each select="document($transtable.xml)/transtable/group[@id = $word-group]">
<xsl:choose>
<xsl:when test="key('transtable-lookup-key', $word)">
<xsl:for-each select="key('transtable-lookup-key', $word)">
<xsl:when test="key('transtable-lookup-key', string($word))[../@id = $word-group]">
<xsl:for-each select="key('transtable-lookup-key', string($word))[../@id = $word-group]">
<xsl:value-of select="tran" />
</xsl:for-each>
</xsl:when>
@ -40,7 +40,7 @@
<xsl:param name="word" select="''"/>
<xsl:for-each select="document($transtable-sortkey.xml)/sortkeys">
<xsl:for-each select="key('transtable-sortkey-lookup-key', $word)">
<xsl:for-each select="key('transtable-sortkey-lookup-key', string($word))">
<xsl:attribute name="sortkey">
<xsl:value-of select="@sortkey" />
</xsl:attribute>