I have a simple XML document that I'm trying to replace an element based on the element's value.
<document>
<meta>
<wk_abc>
UCM:SOURCE1
</wk_abc>
<wk_def>
Other Text
</wk_def>
<wk_abc>
UCM:SOURCE2
</wk_abc>
</meta>
<content>
Lorem ipsum
</content>
</document>
My XSL is this:
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="wk_abc">
<xsl:if test=".='UCM:SOURCE1'">
<bob>bob</bob>
</xsl:if>
</xsl:template>
But it keeps failing the IF condition. and skipping over the replacement element. Why is this test failing?