logical operators - XSLT equals condtional -
i have simple test in xslt
<xsl:if test="istrue = 'false'">
but can't figure out how logical equals operator here. know < "&"lt; , > "&"gt; logical equals operator xslt? tries &eq; &et; == , = , or xslt can compare numbers?
e.g. input xml
<xml> <someelement>1</someelement> <someattribute attr="true" /> </xml>
through transform:
<?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:template match="/xml"> <xsl:if test="someelement=1"> element 1 </xsl:if> <xsl:if test="someattribute/@attr='true'"> attribute true </xsl:if> </xsl:template> </xsl:stylesheet>
returns
some element 1 attribute true
as expected. possibly error in path selector, not in test
?
Comments
Post a Comment