Menu

#1399 Endless recursion for inlinemediaobject

output: webhelp
open
nobody
None
3
2017-07-14
2017-07-14
cleversoft
No

Consider:

<section version="5.0" xmlns="http://docbook.org/ns/docbook">
  <title>A section</title>
  <figure>
    <title><inlinemediaobject>
        <imageobject>
          <imagedata fileref="img.svg" scale="10"/>
        </imageobject>
      </inlinemediaobject></title>
    <para/>
  </figure>
</section>

Transforming to webhelp using stock webhelp/xsl/webhelp.xsl and saxon-6.5.5 yields:

language: en
Error at xsl:apply-templates on line 598 of
 file:/usr/.../docbook-xsl/xhtml/graphics.xsl:
  Too many nested apply-templates calls
Transformation failed: Run-time errors were reported

I'd actually like to create a thumbnail presentation link inside the figure's title containing the image in question. The above shows a mimimal version illustrating the problem and may look pointless.
The problem does not appear when embedding an <inlinemediaobject> inside i.e. a <chapter>/<title> element.

Discussion