Re: [docbook-apps] Image callouts and roles

From
Chris Ridd <>
Date
2011-10-03T12:43:40+00:00
ID
Thread
Re: [docbook-apps] Image callouts and roles
On 03 Oct, 2011,at 11:37 AM, Bob Stayton <> wrote:



Hi  Chris,

OK.  Prior to Docbook 5, imageobjectco only 
allowed one imageobject, so that is the case that the stylesheet currently 
handles.  I did not realize that more  than one was allowed in DocBook 
5, so that will need  to get fixed in the stylesheets. I filed a bug 
report.

Thanks; sorry for messing up the original test case. 

For now, the selection process applies only to the 
direct children of mediaobject.  That's why you are getting both images in 
your output.  You'll need to create two children of mediaobject for the 
selection to work.

Indeed that works (rendering one image) but I think it leaves me with a different problem :-)

The reason I'm using an imageobjectco is because after the (in this case) 'screenshot' element I've got a calloutlist which has callout elements referencing various areas on the imageobjectco.

Now if I'm using multiple 'imageobjectco' elements, each would have a separate 'areaspec', and each 'areaspec' would have a separate list of 'area's. Because the 'callout' has to reference the area by its xml:id, this looks to me like I'd need to create two 'area' elements with the same xml:id. Not good!

If I create areas with different xml:ids, I can use <callout arearefs="fo-id1 html-id1"><para>text</para></callout> in my calloutlist, however that gets rendered as "(1)(1) text". eg

    <screenshot>
      <mediaobject>
        <imageobjectco role="fo">
          <areaspec>
            <area coords="500,500,600,600" xml:id="fo-id1"/>
          </areaspec>
          <imageobject>
            <imagedata fileref="/path/to/fo.png"/>
          </imageobject>
        </imageobjectco>
        <imageobjectco role="html">
          <areaspec>
            <area coords="500,500,600,600" xml:id="html-id1"/>
          </areaspec>
          <imageobject>
            <imagedata fileref="/path/to/html.png"/>
          </imageobject>
        </imageobjectco>
      </mediaobject>
    </screenshot>
    <calloutlist>
      <callout arearefs="fo-id1 html-id1">
        <para>text</para>
      </callout>
    </calloutlist>

(Both variants there are using PNGs, just for simplicity. In reality one would be an SVG and the other would be PNG.)

Cheers,

Chris