How can I detect that a string ends with a value from a pre-determined array? Couldn't figure it out myself from other questions on SO because they ask about a complete string match.
Something like this
<xsl:template match="card">
<xsl:variable name="word" select="k" />
<xsl:variable name="obviouslyRussianSuffixes" select="('изм', 'ия', 'ист', 'ёр', 'ца', 'фон')" />
<xsl:if test="ends-with($word, $obviouslyRussianSuffixes)">
<xsl:value-of select="$word" />
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:template>
I think you want the test to be some $suffix in $obviouslyRussianSuffixes satisfies ends-with($word, $suffix)
.