I'm trying to return a substring'ed value based on two matching strings 'Group -'
and 'Experts Choice - '
Everything works accordingly to my requirements but the issue is that, it should return everything after 'Group -'
and 'Experts Choice - '
. However I'm getting the error that this line is incorrect. I've looked at the operators and whenever I used the 'OR'
operator the output I got was 'true'
. But I don't want that as my output. So an example would be:
CASE1:
<xsl:variable name="$own_name" select="Group - China sells apple products | $900 "/>
<xsl:value-of select="substring-before(substring-after($own_name, 'Group -'),'|')"/>
OUTPUT:
China sells apple products
CASE2:
<xsl:variable name="$own_name" select="Group - Experts Choice - China sells apple products | $900 "/>
<xsl:value-of select="substring-before(substring-after($own_name, 'Group -'),'|') or substring-before(substring-after($own_name, 'Experts Choice - '),'|')"/>
OUTPUT:
true
My goal: Is to get the same ouput, China sells apple products
instead of true. Where am I going wrong in case2.