Next in thread → Next in month →

Re: [docbook-apps] where to include hard-pagebreak instruction?

From
Paul Tremblay <>
Date
2012-02-16T19:15:18+00:00
ID
CAP5QEc7xkP+06+=
Thread
Re: [docbook-apps] where to include hard-pagebreak instruction?
Doh! I had re-written the article template to:

   <xsl:template match="d:article">
    
<!--use page sequence for title page (template removed for email)-->

     <xsl:call-template name="make.article.tocs"/>

   
     <xsl:call-template name="page.sequence">
       <xsl:with-param name="master-reference">body</xsl:with-param>
       <xsl:with-param name="content">

         <xsl:apply-templates
             select="*[not(self::bibliography)]"/>
       </xsl:with-param>
     </xsl:call-template>

    <!--bibliography template goes here-->

   </xsl:template>

Changing the apply-templates instruction to:

<xsl:apply-templates

             select="*[not(self::bibliography)]|processing-instruction()"/>

Fixes the problem.

Thanks

Paul

On Thu, Feb 16, 2012 at 12:16 PM, Bob Stayton <> wrote:

Hi Paul,

Actually, the stylesheets do process anything under 
root for an article.  The template with match="article" in fo/component.xsl 
ends with:

 

<xsl:apply-templates/>

 

which means it applies templates to all children 
of the article element.  The "book" template in divison.xsl does the 
same.

 

When I put a hard pagebreak PI in an article after 
all sections and before a glossary, it works.  I'm not sure why it does not 
work for you.

 

Bob Stayton
Sagehill Enterprises


 

 

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

  
From: 
  Paul 
  Tremblay 

  
To: DocBook Apps 

  
Sent: Thursday, February 16, 2012 7:47 
  AM

  
Subject: [docbook-apps] where to include 
  hard-pagebreak instruction?

  

Per Bob's book, I use the processing instruction 
  <?hard-pagebreak?> in my documents to force page breaks, for example, 
  before and after the glossary in my docbook with the root element as 
  "article". However, including just <?hard-pagebreak?> by itself, (along 
  with the correct FO code, of course), has no affect, because the stylesheets 
  don't process processing instructions just under the root. If I 
  do:

<para>
 <?hard-pagebreak?>
</para>

Then 
  I get what I want, but then technically the resulting docbook is not valid. 
  

Any suggestions?

Paul
Next in thread → Next in month →