title: Xpath for-each selection
body: <p>I have an XML file of following structure</p>
  
  <pre><code>    &lt;root&gt;
        &lt;Row&gt;
           &lt;KeyName&gt;A&lt;/KeyName&gt;
           .....
        &lt;/Row&gt;
        &lt;Row&gt;
           &lt;KeyName&gt;B&lt;/KeyName&gt;
           .....
        &lt;/Row&gt;
        &lt;Row&gt;
           &lt;KeyName&gt;A&lt;/KeyName&gt;
           .....
        &lt;/Row&gt;
        &lt;Row&gt;
           &lt;KeyName&gt;B&lt;/KeyName&gt;
           .....
        &lt;/Row&gt;
        &lt;Row&gt;
           &lt;KeyName&gt;C&lt;/KeyName&gt;
           .....
        &lt;/Row&gt;
     &lt;/root&gt;
  </code></pre>
  
  <p>I would like to make an  statement for a xml-fo transformation</p>
  
  <p>I need to make a loop over all KeyNames, but each KeyName only once. My Problem is, that I don't know which KeyNames will be used and how often they appear. The structure/depth of the tree is constant.</p>
  
  <p>Goal:</p>
  
  <pre><code>    Block KeyName/text()=A
       Row data
       Row data
       Row data 
       ..
  
      Block KeyName/text()=B
       Row data
       Row data
       ..
  </code></pre>
  
  <p>Continued for all existing (but unknown) KeyNames.</p>