title: XSLT - Format-number output NaN
body: <p>I'm new to XSLT.  I'm working with zip codes and I'm trying to padleft zeros to any zipcode under 5 characters.  Otherwise, I want my code to simply write the input parameter exactly as is.  I'm running into a problem when the zipcode starts with or contains a letter.  My output is returning a NaN.  How do I tell the code that whenever the zipcode contains a letter, to simply write out the zipcode as is without running the "format-number" logic?  I know about the "starts-with" and "contain" functions but I don't totally understand how they work.  </p>
  
  <pre><code>&lt;xsl:template name="MyZipCodeUnder5DigitsPadLeftZerosTemplate"&gt;
  &lt;xsl:param name="BillToZipcode" /&gt;
  
  &lt;xsl:choose&gt;
  
   &lt;xsl:when test="string-length($BillToZipcode) &amp;lt; 5"&gt;
      &lt;xsl:element name="PostalCode"&gt;
         &lt;xsl:value-of select="format-number($BillToZipcode, '00000')" /&gt;
      &lt;/xsl:element&gt;
    &lt;/xsl:when&gt;
  
  &lt;xsl:otherwise&gt;
     &lt;xsl:element name="PostalCode"&gt;
      &lt;xsl:value-of select="$BillToZipcode"/&gt;
     &lt;/xsl:element&gt;
  &lt;/xsl:otherwise&gt;
  
  &lt;/xsl:choose&gt;
  &lt;/xsl:template&gt;
  </code></pre>