Index: filter/source/docbook/sofftodocbookheadings.xsl =================================================================== --- filter/source/docbook/sofftodocbookheadings.xsl (revision 270724) +++ filter/source/docbook/sofftodocbookheadings.xsl (working copy) @@ -73,11 +73,6 @@ match="text:h" use="generate-id(preceding::text:h[@text:level < current()/@text:level][1])"/> - <!-- All those headings have not the lowest outline level (mapped to section1), but come before the first heading mapped to section1 --> - <xsl:key name="preludingHeadings" - match="text:h" - use="generate-id(following::text:h[@text:level = $section1_OutlineLevel][1])"/> - <!-- The key function "getHeadingsByOutline" returns all headings of a certain outline level --> <xsl:key name="getHeadingsByOutline" match="text:h" @@ -175,7 +170,7 @@ <xsl:text disable-output-escaping="yes"><sect1></xsl:text> <title></title> <!-- create sections for all the first section1 preluding headings --> - <xsl:for-each select="key('preludingHeadings', generate-id())"> + <xsl:for-each select="key('getHeadingsByOutline', $section1_OutlineLevel)[1]/preceding::text:h"> <xsl:call-template name="make-section"> <xsl:with-param name="previousSectionLevel" select="$section1_OutlineLevel"/> <xsl:with-param name="currentSectionLevel"> @@ -1186,4 +1181,4 @@ <xsl:with-param name="whitespaces" select="8"/> </xsl:call-template> </xsl:template> -</xsl:stylesheet> \ No newline at end of file +</xsl:stylesheet>