title: Using XSLT with tags that have IDs
body: <p>I've been given a task to complete which involves filtering the names based on their grade, but the tag ID keeps throwing me off. I can get the desired outcome if I remove the ID in question, but I assume it has been put there for a reason.</p>
  
  <p>My XML is a list of student details with the file extension <code>.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;CLASS ID = "AWD"&gt;
     &lt;STUDENT&gt;
        &lt;NAME&gt;Tom&lt;/NAME&gt;
        &lt;AGE&gt;19&lt;/AGE&gt;
        &lt;HEIGHT&gt;1.3&lt;/HEIGHT&gt;
        &lt;SEX&gt;M&lt;/SEX&gt;
        &lt;GRADE&gt;B&lt;/GRADE&gt;
     &lt;/STUDENT&gt;
     &lt;STUDENT&gt;
        &lt;NAME&gt;Dick&lt;/NAME&gt;
        &lt;AGE&gt;29&lt;/AGE&gt;
        &lt;HEIGHT&gt;1.1&lt;/HEIGHT&gt;
        &lt;SEX&gt;M&lt;/SEX&gt;
        &lt;GRADE&gt;A&lt;/GRADE&gt;
     &lt;/STUDENT&gt;
     &lt;STUDENT&gt;
        &lt;NAME&gt;Harry&lt;/NAME&gt;
        &lt;AGE&gt;39&lt;/AGE&gt;
        &lt;HEIGHT&gt;1.5&lt;/HEIGHT&gt;
        &lt;SEX&gt;M&lt;/SEX&gt;
        &lt;GRADE&gt;C&lt;/GRADE&gt;
     &lt;/STUDENT&gt;
     &lt;STUDENT&gt;
        &lt;NAME&gt;Mary&lt;/NAME&gt;
        &lt;AGE&gt;30&lt;/AGE&gt;
        &lt;HEIGHT&gt;1.1&lt;/HEIGHT&gt;
        &lt;SEX&gt;F&lt;/SEX&gt;
        &lt;GRADE&gt;A&lt;/GRADE&gt;
     &lt;/STUDENT&gt;
     &lt;STUDENT&gt;
        &lt;NAME&gt;Tim&lt;/NAME&gt;
        &lt;AGE&gt;23&lt;/AGE&gt;
        &lt;HEIGHT&gt;1.5&lt;/HEIGHT&gt;
        &lt;SEX&gt;M&lt;/SEX&gt;
        &lt;GRADE&gt;A&lt;/GRADE&gt;
     &lt;/STUDENT&gt;
  &lt;/CLASS&gt;
  </code></pre>
  
  <p>My XSLT code (<code>.xslt</code> file extension) is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
      &lt;xsl:template match="/"&gt;
          &lt;html&gt; 
              &lt;body&gt;
                  &lt;h2&gt;Student List
                  &lt;/h2&gt;
                  &lt;table border="1"&gt;
                      &lt;tr bgcolor="#9acd32"&gt;
                          &lt;th style="text-align:left"&gt;Name
                          &lt;/th&gt;
                          &lt;th style="text-align:left"&gt;Age
                          &lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;xsl:for-each select="CLASS/STUDENT"&gt;
                          &lt;tr&gt;
                              &lt;xsl:if test="GRADE = 'A'"&gt;
                                  &lt;td&gt;
                                      &lt;xsl:value-of select="NAME"/&gt;
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;xsl:value-of select="AGE"/&gt;
                                  &lt;/td&gt;
                              &lt;/xsl:if&gt;
                          &lt;/tr&gt;
                      &lt;/xsl:for-each&gt;
                  &lt;/table&gt;
              &lt;/body&gt;
          &lt;/html&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>I think it is likely that the problem is on this line, but I've tried to include the ID in the code and that doesn't solve the issue.</p>
  
  <pre><code>&lt;xsl:for-each select="CLASS/STUDENT"&gt;
  </code></pre>