substring-before() function.
Hello all,
I am trying to use the substring-before() function, but with no luck was wondering if anyone could help.
I have a separate xml file with data formatted the following:
test - test
testing testing testing
I am trying to use the substring-before only for the data which has ' - '.
I understand that according to the XPath specification's the substring-before function will return an empty string when it does not find the test string.
So my check is the following:
<xsl:when test="string-length(substring-before($wsc_text,' - ')) != 0">
My problem is that the check is not working for the data without the ' - '.
Sorry for the long post any help would be appreciated.
<xsl:when test="string-length(substring-before($wsc_text,' - ')) != 0">
|