N
Nasos Makriyiannis
Hi,
I'm new to XSL and I was wondering if there is a string-compare function
available. I am using the following IF statement but it does not seem to be
working:
<xsl:if test="boolean(normalize-space(name(..))='Stateflow')">
....do something...
</xsl:if>
<xsl:if test="boolean(normalize-space(name(..)) != 'Stateflow')">
....do another thing...
</xsl:if>
One of the above two cases should be true but neither of them are called. I
displayed the value-of name(..) and it comes out as expected (i.e. sometimes
it's 'Stateflow' and other times it's not!).
I also tried using the contain() function: <xsl:if
test="contains(name(..),'Stateflow') = 'true'"> but that does not work
either. Again I viewed the value-of contains(name(..),'Stateflow') and it
does come out as true.
Any ides why the none of the IF statements are run?
thanks,
-Nasos
I'm new to XSL and I was wondering if there is a string-compare function
available. I am using the following IF statement but it does not seem to be
working:
<xsl:if test="boolean(normalize-space(name(..))='Stateflow')">
....do something...
</xsl:if>
<xsl:if test="boolean(normalize-space(name(..)) != 'Stateflow')">
....do another thing...
</xsl:if>
One of the above two cases should be true but neither of them are called. I
displayed the value-of name(..) and it comes out as expected (i.e. sometimes
it's 'Stateflow' and other times it's not!).
I also tried using the contain() function: <xsl:if
test="contains(name(..),'Stateflow') = 'true'"> but that does not work
either. Again I viewed the value-of contains(name(..),'Stateflow') and it
does come out as true.
Any ides why the none of the IF statements are run?
thanks,
-Nasos