diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-09-27 15:18:25 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2019-09-27 17:27:04 +0200 |
commit | 86cca6b40ced4031dec4b708ac67b5cbe70cddf9 (patch) | |
tree | 67ee2cab6a6b063788ccb9d3ce7b55e07c866b7a /cui | |
parent | 3ca49f4ebd959d08c9d1e85c3cba889fd43cebd7 (diff) |
filter: XHTML: make "calc-heading-digit" a little faster
Exporting OpenDocument-v1.3-csd01-part3-schema.odt to XHTML fails with:
runtime error: file share/xslt/export/xhtml/body.xsl line 1404 element variable
xsltApplySequenceConstructor: A potential infinite template recursion was detected.
You can adjust xsltMaxDepth (--maxdepth) in order to raise the maximum number of nested template calls and variables/params (currently set to 3000).
Unfortunately the document contains this many headings, and the
calc-heading-digit computes the value by recursively looking at every
preceding heading in the document, without TCO apparently...
Try to improve this by using XPath to filter early the headings that are
effectively ignored in the 3rd xsl:when case anyway: the ones with a
level lower than the one for which the number is requested; this limits
the recursive calls to the number of headings on the same level.
Change-Id: Iddf5a91664402a57a0138731ddc9cebb06b0a126
Reviewed-on: https://gerrit.libreoffice.org/79720
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'cui')
0 files changed, 0 insertions, 0 deletions