title: XSLT: When more than one transformation is needed with XSLT 1.0?
body: <p>the XML file looks so:</p>
  <pre><code>&lt;ROOT&gt;
      &lt;A&gt;
          &lt;B&gt;
              &lt;F name=&quot;Sandra&quot;/&gt;
              &lt;F name=&quot;1234&quot;/&gt;
          &lt;/B&gt;
          &lt;C&gt;
              &lt;F name=&quot;Peter&quot;/&gt;
          &lt;/C&gt;
      &lt;/A&gt;
      &lt;A&gt;
          &lt;B&gt;
              &lt;F name=&quot;Peter&quot;/&gt;
              &lt;F name=&quot;nameles&quot;/&gt;
          &lt;/B&gt;
          &lt;C&gt;
              &lt;F name=&quot;1234&quot;/&gt;
          &lt;/C&gt;
      &lt;/A&gt;
  &lt;/ROOT&gt;
  </code></pre>
  <p>and that´s the xsl:</p>
  <pre><code>&lt;xsl:stylesheet version=&quot;1.0&quot;
  xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
  
  &lt;xsl:output method=&quot;html&quot;/&gt;
  &lt;xsl:template match=&quot;/&quot;&gt;
    &lt;html&gt;
    &lt;body&gt;    
          &lt;table&gt;
              &lt;xsl:for-each select=&quot;//F&quot;&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;xsl:value-of select=&quot;@name&quot;/&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;xsl:if test=&quot;ancestor::B&quot;&gt;
                          &lt;!-- doing something--&gt;
                          &lt;/xsl:if&gt;
                      &lt;/td&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>The first target is to have an HTML with a table which contains all <code>name</code>s of the <code>&lt;F/&gt;</code>elements in one colum. In the second colum the parent node is checked and if the <code>&lt;F/&gt;</code>element is e.g. contained in the <code>&lt;B/&gt;</code> element a certain value is set.
  The extraction works fine and also getting getting the check of the parent node.
  I'm checking relative for each <code>&lt;F/&gt;</code>element in the complete file.</p>
  <p>My problem is now that I get an unsorted table.</p>
  <ol>
  <li>Is it possible to store the hole table in a variable and sort in extra step with a second style sheet template?</li>
  </ol>
  <p>Finally it is needed to see which <code>&lt;F/&gt;</code>elements with the same name exist, but are not containded in a <code>&lt;B/&gt;</code>element.</p>
  <ol start="2">
  <li>Also for that the algorithm is clear, but is it possible to make step 1) and 2) in one XSLT transformation?</li>
  </ol>
  <p>Or more general asked, when at least a second XSLT transformation must be done?</p>
  <p>Regards</p>