Re: [docbook-apps] Image callouts and roles

From
Bob Stayton <>
Date
2011-09-29T11:27:39+00:00
ID
05ba01cc7e9a$be483b90$6400a8c0@pazu
Thread
Re: [docbook-apps] Image callouts and roles


Hi Chris,

Rendering two images side-by-side in FO output is 
not expected behavior.  The selection process takes into account all the 
allowed objects:

 

<xsl:template 
name="select.mediaobject.index">
  <xsl:param 
name="olist"
             
select="imageobject|imageobjectco
                     
|videoobject|audioobject|textobject"/>

   ...

 

You say you got both the .svg and the .png image in 
your FO output?  I copied and pasted your example into a test file and 
processed it with the stock 1.76.1 stylesheet and I got just the .svg 
image. 

 

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  Chris Ridd 
  

  
To:  
  

  
Sent: Thursday, September 29, 2011 3:29 
  AM

  
Subject: [docbook-apps] Image callouts 
  and roles

  

  
I'm using role attributes and the docbook stylesheets (successfully) to 
  use one image format when rendering to FO, and other when rendering to HTML 
  (i.e. epub).

  

  
      <figure 
  xml:id="foo"><title>Foo</title>

  
        
  <mediaobject>
          
  <imageobject 
  role="fo">
            
  <imagedata 
  fileref="images/DIT-local.pdf"/>
          
  </imageobject>

          
  <imageobject 
  role="html">
            
  <imagedata 
  fileref="images/DIT-local.png"/>
          
  </imageobject>

  
        </figure>

  
However I have a couple of images using callouts, and using roles like 
  that doesn't seem to work:

  

  
          
  <screenshot>
            
  <mediaobject>
              
  <imageobjectco 
  role="fo">
                
  <areaspec>
                  
  <area coords="50,443,129,463" 
  xml:id="Setting_Up_init_user"/>
                
  </areaspec>

                
  <imageobject>
                  
  <imagedata fileref="images/MVC-DIT-structure.svg" 
  scale="50"/>
                
  </imageobject>
              
  </imageobjectco>
          
  <imageobject role="html">

  
               
  <!--
                
  <areaspec>
                  
  <area coords="50,443,129,463" 
  xml:id="Setting_Up_init_user"/>
                
  </areaspec>

  
                
  -->
        <imagedata 
  fileref="images/MVC-DIT-structure.png" scale="50"/>
    
        
  </imageobject>
            
  </mediaobject>
          
  </screenshot>

  
The SVG is just a wrapper that references the similarly named PNG and 
  then adds some callout bugs.

  

  
Rendering that to FO results in two images side-by-side. Not sure if 
  that's a bug, or expected behaviour. It isn't what I want though.

  

  
However if I change the second imageobject to an imageobjectco, which 
  seems the logical structure, the <area> is problematic - I have a single 
  calloutlist that needs to refer to the "same" callout in either image. And I 
  can't have two <area>s with have the same xml:id :-(

  

  
I hate image callouts! :-)

  

Is there a more correct way to organize my two alternate 
  images?

  

  
Cheers,

  

  
Chris