title: XSLT "contains" function to check for period
body: <p>Ok, I'm stumped.  I would like test if a parameter sent to an XSLT template contains a period and to print out quotes if it does not.  The parameter I would like to test is "value" in the template below. It seems the contains function should work, but for some reason the quotes always get outputted regardless the contents of "value".  What am I doing wrong? Thanks</p>
  
  <pre><code>&lt;!-- Add a JSON property --&gt;
  &lt;xsl:template name="addProperty"&gt;
      &lt;xsl:param name="name" /&gt;
      &lt;xsl:param name="value" /&gt;
  
      &lt;xsl:value-of select="$name" /&gt;
      &lt;xsl:text&gt;:&lt;/xsl:text&gt;
      &lt;xsl:if test="not(contains($value,'.'))"&gt;'&lt;/xsl:if&gt;
      &lt;xsl:value-of select="$value" /&gt;
      &lt;xsl:if test="not(contains($value,'.'))"&gt;'&lt;/xsl:if&gt;
      &lt;xsl:text&gt;,&lt;/xsl:text&gt;      
  &lt;/xsl:template&gt;
  </code></pre>