Since you haven't provided us much info, this is the best answer I can give.
As shown in this answer:
A more general XPath 1.0 expression that produces the string $s1 if $val is "x" and produces the string $s2 if $val is "y" :
concat(substring($s1, 1 div ($val = "x")),
substring($s2, 1 div ($val = "y"))
)
If I understand your question correctly, this principle can be used to generate the expected answer. To see this, look at the following sample:
Assumptions:
- A value of
"yes"
should output the character"a"
- A value of
""
should output the character"b"
When this XSLT (which uses the aforementioned XPath):
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output omit-xml-declaration="yes" indent="yes" method="text"/>
<xsl:strip-space elements="*"/>
<xsl:template match="e">
<xsl:text>The value is: </xsl:text>
<xsl:value-of
select="concat(substring('a', 1 div (@fldNm = 'yes')),
substring('b', 1 div (@fldNm = ''))
)"/>
<xsl:text/>
</xsl:template>
</xsl:stylesheet>
...is applied to the following sample XML:
<t>
<e fldNm="yes"/>
<e fldNm=""/>
</t>
...the wanted result is produced:
The value is: a
The value is: b