I can't find a reason why the following does not work.
If I have a document that looks like
<mydocroot>
<request>
<key>Ham</key>
</request>
<node>
<data alias='Ham' id='27'>Some value</data>
<data alias='Eggs' id='14'>Greenish</data>
<data alias='Condiment' id='32'>Salt and pepper</data>
...
</node>
</mydocroot>
and an xsl template that looks like
<xsl:template match="/">
<xsl:value-of select="/mydocroot/node/data[@alias=string(/mydocroot/request/key)]" />
</xsl:template>
prints nothing.
<xsl:template match="/">
<xsl:value-of select="/mydocroot/node/data[@alias='Ham']" />
</xsl:template>
prints "Some value" as expected.
What am I doing wrong?
Thanks!
Edit:
I'm actually not 100% positive what the underlying document I'm working with looks like, but I do know that, to continue with this example,
<xsl:value-of select="/mydocroot/request/key" /> <!-- prints "Ham" -->
works.
Should I be able to match an attribute value to a node value?