I have the following xsl code. All I want to do is, output the cat attribute of the word that is found with contains function. Code outputs true right now (as i understand the reason) but how can i output its attribute value?
<xsl:value-of select="contains($grammar//lexicalRules, 'likes')"></xsl:value-of>
My $grammar is something likes this
<lexicalRules>
<word cat="vp">snores</word>
<word cat="vt">likes</word>
</lexicalRules>
In this case i want to output vt.
Many thanks.
Try this :