title: How do I cater for when a attribute is missing in a XSL template?
body: <p>I have a XSL template:</p>
  
  <pre><code>  &lt;!--Define the column widths for the schedule--&gt;
    &lt;xsl:template name="SetColumnWidths"&gt;
      &lt;!--The widths in the column classes will add up to 100%--&gt;
      &lt;xsl:choose&gt;
        &lt;xsl:when test="@NumberClasses=1"&gt;
          &lt;colgroup&gt;
            &lt;col class="columnTime"/&gt;
            &lt;col class="columnTheme1Class"/&gt;
            &lt;col class="columnName"/&gt;
          &lt;/colgroup&gt;
        &lt;/xsl:when&gt;
        &lt;xsl:when test="@NumberClasses=2"&gt;
          &lt;colgroup&gt;
            &lt;col class="columnTime"/&gt;
            &lt;col class="columnTheme2Class"/&gt;
            &lt;col class="columnName"/&gt;
            &lt;col class="columnName"/&gt;
          &lt;/colgroup&gt;
        &lt;/xsl:when&gt;
        &lt;xsl:when test="@NumberClasses=3"&gt;
          &lt;colgroup&gt;
            &lt;col class="columnTime"/&gt;
            &lt;col class="columnTheme3Class"/&gt;
            &lt;col class="columnName"/&gt;
            &lt;col class="columnName"/&gt;
            &lt;col class="columnName"/&gt;
          &lt;/colgroup&gt;
        &lt;/xsl:when&gt;
      &lt;/xsl:choose&gt;
    &lt;/xsl:template&gt;
  </code></pre>
  
  <p>I want to extend it so that, if there is no <strong>NumberClasses</strong> attribute that it does exactly the same as for <strong>NumberClasses=1</strong>.</p>
  
  <p>How do I do this?</p>
  
  <p>Thank you!</p>