title: How to styling xml with xslt with looping xml?
body: <p><a href="https://i.stack.imgur.com/USVzP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/USVzP.png" alt="This what I expect for the output"></a>I have an xml file. The xml file will generate by powershell. The xml file ALWAYS UPDATING. I want to styling the xml file using xslt and make it a simple table.
  I tried this, but it still not display a table and the content is not corret yet.</p>
  
  <p>this is my xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;?xml-stylesheet type="text/css" href="Tool.xsl"?&gt; 
  &lt;report&gt;
      &lt;heading&gt;Image Automation Report&lt;/heading&gt;
          &lt;BuildID&gt;1234567&lt;/BuildID&gt;
          &lt;que&gt;22&lt;/que&gt;
          &lt;pro&gt;2&lt;/pro&gt;
          &lt;don&gt;0&lt;/don&gt;
  
          &lt;BuildID&gt;2345678&lt;/BuildID&gt;
          &lt;que&gt;21&lt;/que&gt;
          &lt;pro&gt;1&lt;/pro&gt;
          &lt;don&gt;0&lt;/don&gt;
  &lt;/report&gt;
  </code></pre>
  
  <p>this is my xslt file</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  
  &lt;xsl:template match="/"&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match="report"&gt;
    &lt;table&gt;
      &lt;tr style="background-color:#ccff00"&gt;
        &lt;th&gt;BuildID&lt;/th&gt;
        &lt;th&gt;que&lt;/th&gt;
        &lt;th&gt;pro&lt;/th&gt;
        &lt;th&gt;don&lt;/th&gt;
      &lt;/tr&gt;
      &lt;xsl:for-each select="BuildID"&gt;
        &lt;xsl:if test="@type = 'BuildID'"&gt;
          &lt;tr style="background-color:#00cc00"&gt;
            &lt;td&gt;&lt;xsl:value-of select="que"/&gt;&lt;/td&gt;
            &lt;td&gt;&lt;xsl:value-of select="pro"/&gt;&lt;/td&gt;
            &lt;td&gt;&lt;xsl:value-of select="don"/&gt;&lt;/td&gt;
         &lt;/tr&gt;
        &lt;/xsl:if&gt;
      &lt;/xsl:for-each&gt;
    &lt;/table&gt;
  &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>