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?

= should work fine

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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -