title: With XSLT, how can I process normally, but hold some nodes until the end and then output them all at once (e.g. footnotes)?
body: <p>I have an XSLT application which reads the internal format of Microsoft Word 2007/2010 zipped XML and translates it into HTML5 with XSLT. I am investigating how to add the ability to optionally read OpenOffice documents instead of MSWord.</p>
  
  <p>Microsoft stores XML for footnote text separately from the XML of the document text, which happens to suit me because I want the footnotes in a block at the end of the output HTML page.  </p>
  
  <p>However, unfortunately for me, OpenOffice puts each footnote right next to its reference, inline with the text of the document.  Here is a simple paragraph example:</p>
  
  <pre><code>  &lt;text:p text:style-name="Standard"&gt;The real breakthrough in aerial mapping 
      during World War II was trimetrogon
      &lt;text:note text:id="ftn0" text:note-class="footnote"&gt;
        &lt;text:note-citation&gt;1&lt;/text:note-citation&gt;
        &lt;text:note-body&gt;
          &lt;text:p text:style-name="Footnote"&gt;Three separate cameras took three
            photographs at once, a direct downward and an oblique on each side.&lt;/text:p&gt;
        &lt;/text:note-body&gt;
      &lt;/text:note&gt;
      photography, but the camera was large and heavy, so there were problems finding
      the right aircraft to carry it.
    &lt;/text:p&gt;
  </code></pre>
  
  <p>My question is, can XSLT process the XML as normal, but hold each of the text:note items until the end of the document text, and then emit them all at one time?</p>