title: XSL:FO how to 'flow' info separate from body into xsl-region-start and xsl-region-end
body: <p>I have a medieval manuscript encoded in XML (using TEI schema). The manuscript has a 'body' which has been mapped in XSL:FO to <code>xsl-region-body</code> and outputs perfectly. The manuscript also features some 'glosses' (notes) in the left and right margins. These are marked up within the XML document using, for example <code>&lt;add type="margin_gloss" place="left"&gt;Some foo note&lt;/add&gt;</code></p>
  
  <p>I have reserved <code>xsl-region-start</code>and <code>xsl-region-end</code> to receive these margin glosses relative to their position in the original manuscript. However I am having trouble getting the marked up text to 'flow' into these regions.</p>
  
  <p>Note: I have no problem putting hardcoded data into these regions with, for example, <code>&lt;fo:static-content flow-name="xsl-region-after"&gt;</code></p>
  
  <p>The problem is that with the below code Apache FOP is telling me : <code>For "fo:page-sequence", only one "fo:flow" may be declared.</code></p>
  
  <pre><code>        &lt;fo:page-sequence master-reference="odd"&gt;
              &lt;fo:static-content flow-name="xsl-region-after"
                  font-family="Times"
                  font-size="8pt"&gt;
                  &lt;fo:block text-align="center"&gt;-&lt;fo:page-number/&gt;-
                  &lt;/fo:block&gt;
              &lt;/fo:static-content&gt;
              &lt;fo:flow flow-name="xsl-region-end"
                  font-family="Times"
                  font-size="6pt"&gt;
                  &lt;xsl:call-template name="marginalia-right"/&gt;
              &lt;/fo:flow&gt;
              &lt;fo:flow flow-name="xsl-region-body" 
                  font-family="Times"
                  font-size="8pt"
                  space-before="8pt"
                  space-after="8pt"&gt;
                  &lt;xsl:apply-templates/&gt;
              &lt;/fo:flow&gt;
          &lt;/fo:page-sequence&gt;
  </code></pre>
  
  <p>I extract the notes with an XSL template:</p>
  
  <pre><code> &lt;xsl:template match="//tei:add[@type='margin_gloss' and @place='right']" name="marginalia-right"&gt;
        &lt;fo:block&gt;
            &lt;xsl:value-of select="text()"/&gt;
        &lt;/fo:block&gt;
    &lt;/xsl:template&gt;
  </code></pre>
  
  <p>To summarize the problem: I would like the margin glosses marked up in XML  with <code>&lt;add&gt;</code> to appear in <code>xsl-region-start</code> and <code>xsl-region-end</code> positioned relative to line of text in <code>xsl-region-body</code>. FPO tells me I can't 'flow' twice.</p>