Re: [docbook-apps] Long text inclusions that don't break anymore

From
Bob Stayton <>
Date
2008-08-20T16:00:43+00:00
ID
024901c902dd$df9ee410$6a00a8c0@pazu
Thread
Re: [docbook-apps] Long text inclusions that don't break anymore


Actually, this would be a feature, to automatically 
keep each example together on a page.  Doesn't work well for long examples, 
though.

 

The FO stylesheets have an attribute-set in the 
1.74 stylesheets for examples called "example.properties", which by default 
inherits properties from the "formal.object.properties" attribute-set, which 
includes a keep-together attribute.  Your customization layer could turn it 
off for examples using:

 

<xsl:attribute-set 
name="example.properties">

  <xsl:attribute 
name="keep-together.within-column="auto"/>

</xsl:attribute-set>

 

Bob Stayton
Sagehill Enterprises


 

 

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

  
From: 
  Dennison, Cheri 
  

  
To:  ;  
  

  
Sent: Tuesday, August 19, 2008 6:12 
  PM

  
Subject: RE: [docbook-apps] Long text 
  inclusions that don't break anymore

  

  

  
Ah, 
  thanks for pointing out that it’s due to the <example> tag! I didn’t 
  even think to yank the <programlisting> out of the <example> to 
  see if that helped. At least I’ve got a workaround until this potential bug is 
  fixed…

  
 

  
Yay!

  
 

  

  

  
From:  
  [mailto:] 
Sent: Tuesday, August 19, 2008 6:09 
  PM
To: Dennison, Cheri; 
Subject: 
  Re: [docbook-apps] Long text inclusions that don't break 
  anymore

  
 

  

  
Cheri

  

  
I 
  just confirmed your issue. It appears that the <example> formatting is 
  the culprit, as it works fine if the  <programlisting> is not 
  wrapped by an <example>.

  

  
 

  

  
Unfortunately, 
  this mere mortal doesn't have an answer so you'll have to wait for the 
  

  

  
Docbook 
  gods to wake ;-)

  

  
 

  

  
This 
  may be a bug?

  

  
 

  

  
Cheers,

  

  
Dean 
  Nelson

  

  
 

  

  
 

  

  

  
In a 
  message dated 8/19/2008 5:10:46 P.M. Pacific Daylight Time,  
  writes:

  
    

    
Howdy!

    
I'm upgrading to FOP 0.95 from 0.20.5 and from 1.70.1 
    to 1.74 for the DB stylesheets. I’ve got a guide that has code snippets 
    xincluded, like so (from Bob’s section “Using XInclude for text 
    inclusions”):

    
 

    
<example><title>My 
    program listing</title>

    
  
    <programlisting><xi:include  href="mycode.c"  
    parse="text"  

    
      
    xmlns:xi="http://www.w3.org/2001/XInclude"/></programlisting>

    
</example>

    
 

    
With FOP 0.95/1.74.0 stylesheets, any long code 
    snippets that normally break correctly across multiple pages no longer 
    occupy multiple pages. Instead, the code snippet tries to be on a single PDF 
    page (bleeding into the header/footer). If it’s longer than the full page, 
    the top part and bottom part of the snippet gets cut off and is not 
    displayed. If I just copy the code directly into the XML instead of 
    xincluding it, it breaks fine across pages as 
expected.

    
 

    
Is this issue with Xincluded code snippets a known 
    problem? Is there anything I can do about it? My apologies if this has been 
    discussed; I tried looking in the archives and had no 
    luck.

    
 

    
Muchas muchas gracias!

    
cheri

    
-- 
Cheri Dennison / 
    Technical Writer 
    
AWS Platform 
    Group 
    
 
    

    
 

  

  

  

  
  

  
It's 
  only a deal if it's where you want to go. Find your travel deal here.