XSLT:How to check if a specific string is present in string of tags separated by delimiter ","
<p>i,
i am new to xml/xslt.
Need to prepare  template which checks the value of a tag 123,447,786,780 and returns true if 447 exists in the string and false if not</p>

<p>I am trying below piece of code but somehow its not working</p>

<pre><code>   &lt;xsl:template name="tokenize"&gt; 
  &lt;xsl:Param name="text"/&gt; 
  &lt;xsl:Param name="delimiter" select="','"/&gt; 
   &lt;xsl:choose&gt; 
        &lt;xsl:when test="contains($text, $delimiter)"&gt; 
               &lt;xsl:value-of select="substring-before($text, $delimiter)"&gt;true&lt;/xsl:when&gt; 
                               &lt;xsl:-Otherwise&gt;false&lt;/xsl:-Otherwise&gt; 
         &lt;/xsl:choose&gt; 
      &lt;/xsl:template&gt;   
</code></pre>