alles klar, tut mir leid, habe dir schon was geschickt, aber hier kommt die zusammengefasste fassung:
<xsl:template name="INHALTSVERZEICHNIS">
<xsl:for-each select="//gesellschaft">
<xsl:variable name="gesellschaft" select="."/>
<xsl:for-each select="//stellen/stelle">
<xsl:variable name="stelle" select="."/>
fo:table
<fo:table-column column-width="140mm"/>
<fo:table-column column-width="20mm"/>
fo:table-header
fo:table-row
fo:table-cell
<fo:block font-size="11pt" space-after.optimum="8pt"><xsl:value-of select="$stelle/titel" /> /fo:block>
</fo:table-cell>
fo:table-cell
<!-- HIER SOLLTE EIGENTLICH DIE AUSGABE DER SEITENNUMMER ERFOLGEN, ABER.. :(
<fo:block font-size="11pt" space-after.optimum="8pt" text-align="end"><fo:page-number-citation ref-id="{generate-id()}"/></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
fo:table-body
</fo:table-body>
</fo:table>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<xsl:template name="STELLE">
<!-- Ausgabe: STELLE -->
<xsl:for-each select="//stellen/stelle">
<xsl:variable name="stelle" select="."/>
<xsl:value-of select="@id"/>
<xsl:for-each select="//gesellschaft[@id=$stelle/@idref]">
<xsl:variable name="gesellschaft" select="."/>
<!-- IN DIESEM BLOCK WIRD DIE ID GENERIERT, UND HIER KOMMT AUCH DIE FEHLERMELDUNG -->
<!-- Ueberschrift der Tabelle -->
<fo:block id="{generate-id()}"><xsl:value-of select="$stelle/titel" /></fo:block>
fo:table
<fo:table-column column-width="55mm"/>
<fo:table-column column-width="100mm"/>
fo:table-header
</fo:table-header>
fo:table-body
<fo:table-row keep-with-next="always">
<fo:table-cell /> <!-- leere Zeile -->
</fo:table-row>
fo:table-row
fo:table-cell
<fo:block font-size="11pt" font-weight="bold" space-before.optimum="20pt">bla:</fo:block>
</fo:table-cell>
fo:table-cell
<fo:block font-size="11pt" font-weight="bold" space-before.optimum="20pt">blabla </fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
irgendwie weiß ich nicht, was falsch ist.. :(