title: How to implement if-else statement in XSLT?
body: <p>I am trying to implement an if -else statement in XSLT but my code just doesn't parse.  Does anyone have any ideas?</p>
  
  <pre><code>  &lt;xsl:variable name="CreatedDate" select="@createDate"/&gt;
    &lt;xsl:variable name="IDAppendedDate" select="2012-01-01" /&gt;
    &lt;b&gt;date: &lt;xsl:value-of select="$CreatedDate"/&gt;&lt;/b&gt; 
  
    &lt;xsl:if test="$CreatedDate &gt; $IDAppendedDate"&gt;
      &lt;h2&gt; mooooooooooooo &lt;/h2&gt;
    &lt;/xsl:if&gt;
    &lt;xsl:else&gt;
      &lt;h2&gt; dooooooooooooo &lt;/h2&gt;
    &lt;/xsl:else&gt;
  </code></pre>