title: XSLT & XML Help - Not generating html with two different XML elements
body: <p>I have a problem with combining my XSLT and XML in a certain situation and I am stuck, below is an example of my issue:</p>
  <p>XML:</p>
  <pre><code>&lt;a&gt;
  &lt;x&gt;
      &lt;y testname=&quot;test1&quot;&gt;
        &lt;object elementname=&quot;Name&quot; elementvalue=&quot;true&quot; elementvalue1=&quot;ABC&quot; elementvalue2=&quot;ADF&quot;&gt;
          &lt;comparisonresult&gt;false&lt;/comparisonresult&gt;
        &lt;/object&gt;
       &lt;/y&gt;
  
  &lt;/x&gt;
  &lt;/a&gt;
  </code></pre>
  <p>XSLT:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
  &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
    &lt;xsl:template match=&quot;/&quot;&gt;
      &lt;html&gt;
        &lt;body&gt;
          &lt;font face=&quot;Arial&quot;&gt;
          &lt;h2&gt;HEADINGY&lt;/h2&gt;
          &lt;h4&gt;Process 1&lt;/h4&gt;
          &lt;h4&gt;More Process&lt;/h4&gt;
              &lt;h4&gt;Additional &lt;/h4&gt;
                &lt;table border=&quot;1&quot;&gt;
                &lt;tr bgcolor=&quot;#dccdc&quot;&gt;
                  &lt;th align=&quot;center&quot;&gt;T1&lt;/th&gt;
                  &lt;th align=&quot;center&quot;&gt;T2&lt;/th&gt;
                  &lt;th align=&quot;center&quot;&gt;T3&lt;/th&gt;
                &lt;/tr&gt;
                &lt;/table&gt;
            &lt;h2&gt;Main&lt;/h2&gt;
            &lt;xsl:for-each select=&quot;a/x/y&quot;&gt;
              &lt;h3&gt;
                &lt;xsl:value-of select=&quot;@testname&quot; /&gt;
              &lt;/h3&gt;
              &lt;h4&gt;Heading 1&lt;/h4&gt;
              &lt;table border=&quot;1&quot; style=&quot;display:inline&quot;&gt;
                &lt;tr bgcolor=&quot;#CECEF6&quot;&gt;
                  &lt;th align=&quot;center&quot;&gt;Item1&lt;/th&gt;
                  &lt;th align=&quot;center&quot;&gt;Item2&lt;/th&gt;
                  &lt;th align=&quot;center&quot;&gt;Item3&lt;/th&gt;
                &lt;/tr&gt;
                &lt;xsl:for-each select=&quot;object&quot;&gt;
                  &lt;tr&gt;
                    &lt;td bgcolor=&quot;#F2F5A9&quot;&gt;
                      &lt;xsl:value-of select=&quot;@elementname&quot; /&gt;
                    &lt;/td&gt;
                    &lt;td bgcolor=&quot;#F2F5A9&quot;&gt;
                      &lt;xsl:value-of select=&quot;@elementvalue1&quot; /&gt;
                    &lt;/td&gt;
                    &lt;td bgcolor=&quot;#F2F5A9&quot;&gt;
                      &lt;xsl:value-of select=&quot;@elementvalue2&quot; /&gt;
                    &lt;/td&gt;
  
                  &lt;/tr&gt;
                &lt;/xsl:for-each&gt;
              &lt;/table&gt;
            &lt;/xsl:for-each&gt;
          &lt;/font&gt;
        &lt;/body&gt;
      &lt;/html&gt;
    &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  <p>If you enter these two into <a href="http://www.w3schools.com/xml/tryxslt.asp?xmlfile=simple&amp;xsltfile=simple" rel="nofollow noreferrer">http://www.w3schools.com/xml/tryxslt.asp?xmlfile=simple&amp;xsltfile=simple</a> you get output as expected. The issue comes when i added the following to the XML, so it looks like:</p>
  <pre><code>&lt;a&gt;
  &lt;x&gt;
      &lt;y testname=&quot;test1&quot;&gt;
        &lt;object elementname=&quot;Name&quot; elementvalue=&quot;true&quot; elementvalue1=&quot;ABC&quot; elementvalue2=&quot;ADF&quot;&gt;
          &lt;comparisonresult&gt;false&lt;/comparisonresult&gt;
        &lt;/comparisonobject&gt;
  &lt;/y&gt;
  &lt;x&gt;
  
   &lt;t testname=&quot;ComparisonResult&quot;&gt;
      &lt;step stepname=&quot;Add x&quot; stepresult=&quot;Add x&quot;&gt;
        &lt;result&gt;true&lt;/result&gt;
      &lt;/step&gt;
  &lt;/t&gt;
  
  
  
  &lt;/a&gt;
  </code></pre>
  <p>and the corresponding xslt:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
  &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
    &lt;xsl:template match=&quot;/&quot;&gt;
      &lt;html&gt;
        &lt;body&gt;
          &lt;font face=&quot;Arial&quot;&gt;
          &lt;h2&gt;HEADINGY&lt;/h2&gt;
          &lt;h4&gt;Process 1&lt;/h4&gt;
          &lt;h4&gt;More Process&lt;/h4&gt;
            &lt;xsl:for-each select=&quot;a/x/t&quot;&gt;
               &lt;xsl:for-each select=&quot;testname&quot;&gt;
              &lt;h4&gt;Additional &lt;/h4&gt;
                &lt;table border=&quot;1&quot;&gt;
                &lt;tr bgcolor=&quot;#dccdc&quot;&gt;
                  &lt;th align=&quot;center&quot;&gt;T1&lt;/th&gt;
                  &lt;th align=&quot;center&quot;&gt;T2&lt;/th&gt;
                  &lt;th align=&quot;center&quot;&gt;T3&lt;/th&gt;
                &lt;/tr&gt;
  
   &lt;xsl:for-each select=&quot;stepname&quot;&gt;
                  &lt;tr&gt;
                    &lt;td bgcolor=&quot;#F2F5A9&quot;&gt;
                      &lt;xsl:value-of select=&quot;@stepname&quot; /&gt;
                    &lt;/td&gt;
                    &lt;td bgcolor=&quot;#F2F5A9&quot;&gt;
                      &lt;xsl:value-of select=&quot;@step result&quot; /&gt;
                    &lt;/td&gt;
                    &lt;td bgcolor=&quot;#F2F5A9&quot;&gt;
                      &lt;xsl:value-of select=&quot;@result&quot; /&gt;
                    &lt;/td&gt;
                &lt;/table&gt;
            &lt;h2&gt;Main&lt;/h2&gt;
            &lt;xsl:for-each select=&quot;a/x/y&quot;&gt;
              &lt;h3&gt;
                &lt;xsl:value-of select=&quot;@testname&quot; /&gt;
              &lt;/h3&gt;
              &lt;h4&gt;Heading 1&lt;/h4&gt;
              &lt;table border=&quot;1&quot; style=&quot;display:inline&quot;&gt;
                &lt;tr bgcolor=&quot;#CECEF6&quot;&gt;
                  &lt;th align=&quot;center&quot;&gt;Item1&lt;/th&gt;
                  &lt;th align=&quot;center&quot;&gt;Item2&lt;/th&gt;
                  &lt;th align=&quot;center&quot;&gt;Item3&lt;/th&gt;
                &lt;/tr&gt;
                &lt;xsl:for-each select=&quot;object&quot;&gt;
                  &lt;tr&gt;
                    &lt;td bgcolor=&quot;#F2F5A9&quot;&gt;
                      &lt;xsl:value-of select=&quot;@elementname&quot; /&gt;
                    &lt;/td&gt;
                    &lt;td bgcolor=&quot;#F2F5A9&quot;&gt;
                      &lt;xsl:value-of select=&quot;@elementvalue1&quot; /&gt;
                    &lt;/td&gt;
                    &lt;td bgcolor=&quot;#F2F5A9&quot;&gt;
                      &lt;xsl:value-of select=&quot;@elementvalue2&quot; /&gt;
                    &lt;/td&gt;
  
                  &lt;/tr&gt;
                &lt;/xsl:for-each&gt;
              &lt;/table&gt;
            &lt;/xsl:for-each&gt;
          &lt;/font&gt;
        &lt;/body&gt;
      &lt;/html&gt;
    &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  <p>I just get a blank page.
  I know there is a lot here to digest, but im really stuck!</p>
  <p>Thanks</p>