diff options
Diffstat (limited to 'filter/source/docbook/sofftodocbookheadings.xsl')
-rw-r--r-- | filter/source/docbook/sofftodocbookheadings.xsl | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/filter/source/docbook/sofftodocbookheadings.xsl b/filter/source/docbook/sofftodocbookheadings.xsl index 586bec1064cf..79b0b1ced72a 100644 --- a/filter/source/docbook/sofftodocbookheadings.xsl +++ b/filter/source/docbook/sofftodocbookheadings.xsl @@ -59,17 +59,8 @@ <xsl:key name='headchildren' match="text:p |table:table | text:span | text:ordered-list | office:annotation | text:unordered-list | text:footnote | text:a | text:list-item | draw:plugin | draw:text-box | text:footnote-body | text:section" use="generate-id((..|preceding-sibling::text:h[@text:level='1']|preceding-sibling::text:h[@text:level='2']|preceding-sibling::text:h[@text:level='3']|preceding-sibling::text:h[@text:level='4']|preceding-sibling::text:h[@text:level='5'])[last()])"/> -<xsl:key name="children" match="text:h[@text:level='2']" - use="generate-id(preceding-sibling::text:h[@text:level='1'][1])"/> - -<xsl:key name="children" match="text:h[@text:level='3']" - use="generate-id(preceding-sibling::text:h[@text:level='2' or @text:level='1'][1])"/> - -<xsl:key name="children" match="text:h[@text:level='4']" - use="generate-id(preceding-sibling::text:h[@text:level='3' or @text:level='2' or @text:level='1'][1])"/> - -<xsl:key name="children" match="text:h[@text:level='5']" - use="generate-id(preceding-sibling::text:h[@text:level='4' or @text:level='3' or @text:level='2' or @text:level='1'][1])"/> +<xsl:key name="children" match="text:h[@text:level > '1' and @text:level < '6']" + use="generate-id(preceding-sibling::text:h[@text:level < current()/@text:level][1])"/> <xsl:template match="text:h[@text:level='1']"> |