I am trying to use the below code to check if my variable contains the word NOT_INTERFACED. So I am using the ends-with function.
But if it does I want to print the remaining word minus NOT_INTERFACED.
But I am getting an error, my java program is calling this template however I get an exception ends-with not found.
Am I doing something wrong syntax wise ?
<xsl:choose>
<xsl:when test="ends-with($ID_FO, 'NOT_INTERFACED')">
<xsl:value-of select="substring-before($ID_FO, 'NOT_INTERFACED')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$ID_FO"/>
</xsl:otherwise>
</xsl:choose>
and the error is
COULD NOT FIND FUNCTION ENDS WITH. LOCATION: unknown
java.lang.NullPointerException