OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] PAGE NUMBER APPEARS ON TITLEPAGE


Hi Nick,
I think your footer.content template needs to take into account your new page-master name:

<xsl:choose>
   <xsl:when test="$pageclass = 'coversequence'">
       <!-- nop -->
   </xsl:when>
   etc.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- From: "Wood, Nick" <nick.wood@npc.nato.int>
To: "DocBook Apps" <docbook-apps@lists.oasis-open.org>
Sent: Thursday, February 09, 2012 8:27 AM
Subject: RE: [docbook-apps] PAGE NUMBER APPEARS ON TITLEPAGE


Paul,

Thanks for your response, of course your observation is correct, but unfortunately it it had no effect either. I previously had the following:

<xsl:when test="$position='centertop'">
<xsl:if test="$pageclass != 'titlepage'  ">
<fo:page-number/>
</xsl:if>
</xsl:when>

But this has no effect, by adding further parameters to the test I get different results but never the right the one!

Regards

Nick



From: Paul Tremblay [paulhtremblay@gmail.com]
Sent: Thursday, February 09, 2012 2:14 PM
To: Wood, Nick
Cc: DocBook Apps
Subject: Re: [docbook-apps] PAGE NUMBER APPEARS ON TITLEPAGE


Nick, your code puts a number on the title page:

<xsl:when test="$pageclass = 'titlepage'and $sequence = 'first'">
<fo:page-number><!-- nop --></fo:page-number>
</xsl:when>

I see you have a comment of <!--nop-->. But the empty element <fo:pagenumber/> inserts a page number. I think you want:

<xsl:when test="$pageclass = 'titlepage'and $sequence = 'first'"/>

Paul




On Thu, Feb 9, 2012 at 2:49 AM, Wood, Nick <nick.wood@npc.nato.int> wrote:

Paul,

I have already customised the footer.content template, see the extract for numbering below. My problem is that everything works fine until I call the select.user.pagemaster template. I assume it has something to do with the page-sequence-master but I don't what.

<xsl:when test="$position='centertop'">
<fo:block>
<xsl:choose>
<xsl:when test="$pageclass = 'titlepage'and $sequence = 'first'">
<fo:page-number><!-- nop --></fo:page-number>
</xsl:when>
<xsl:otherwise>
<fo:page-number/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</xsl:when>


Regards

Nick




From: Paul Tremblay [paulhtremblay@gmail.com]
Sent: Wednesday, February 08, 2012 6:25 PM
To: Wood, Nick
Cc: DocBook Apps
Subject: Re: [docbook-apps] PAGE NUMBER APPEARS ON TITLEPAGE



I think you have to customize the footer.template:

<xsl:template name="footer.content"> ...

Check out the same documentation (Docbook XSL The Complete Guide).


On Wed, Feb 8, 2012 at 8:49 AM, Wood, Nick <nick.wood@npc.nato.int> wrote:

Hi,

I recently had to further customise my setup-pagemasters.xsl (taken from fo/pagemaster.xsl) as Parts have been introduced to some of our books, and I was getting the background image on both the Title page and the Part page. Following the guidelines from Docbook XSL (The Complete Guide) and various postings on docbook-apps, I renamed the page-sequence master and added the select.user.pagemaster template; the customisation works fine, with the excpetion that now I get a page number on my titlepage and legal notice page.

I have tried several customisations to remove the page number but whenever I call the select.user.pagemaster template I get the same result. Any help would be grarefully recieved.

Regards

Nick Wood

<xsl:template name="user.pagemasters">
<xsl:variable name="npclogo" select='"../installed/logos/documentation_front_09e.jpg"'/> <xsl:variable name="npclogodraft" select='"../installed/logos/documentation_front_09e-draft.jpg"'/>
<!-- setup for title page(s) -->
 <fo:page-sequence-master master-name="coversequence">
   <fo:repeatable-page-master-alternatives>
     <fo:conditional-page-master-reference master-reference="blank"
                                           blank-or-not-blank="blank"/>
     <fo:conditional-page-master-reference master-reference="titlepage-first-npc"
                                           page-position="first"/>
     <fo:conditional-page-master-reference master-reference="titlepage-odd-npc"
                                           odd-or-even="odd"/>
     <fo:conditional-page-master-reference
                                           odd-or-even="even">
       <xsl:attribute name="master-reference">
         <xsl:choose>
           <xsl:when test="$double.sided != 0">titlepage-even</xsl:when>
           <xsl:otherwise>titlepage-odd</xsl:otherwise>
         </xsl:choose>
       </xsl:attribute>
     </fo:conditional-page-master-reference>
   </fo:repeatable-page-master-alternatives>
 </fo:page-sequence-master>
 <fo:simple-page-master master-name="titlepage-first-npc"
                        page-width="{$page.width}"
                        page-height="{$page.height}"
                        margin-top="5mm"
                        margin-bottom="5mm"
                        margin-left="5mm"
                        margin-right="5mm">
   <xsl:if test="$axf.extensions != 0">
     <xsl:call-template name="axf-page-master-properties">
       <xsl:with-param name="page.master">blank</xsl:with-param>
     </xsl:call-template>
   </xsl:if>

<fo:region-body margin-bottom="0mm"
                     margin-top="0mm"
                     column-gap="{$column.gap.titlepage}"
                     column-count="{$column.count.titlepage}">
            <xsl:attribute name="background-image">
           <xsl:call-template name="fo-external-image">
             <xsl:with-param name="filename" select="$npclogo"/>
           </xsl:call-template>
         </xsl:attribute>
         <xsl:attribute name="background-attachment">fixed</xsl:attribute>
         <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
<xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
         <xsl:attribute name="background-position-vertical">center</xsl:attribute>
   </fo:region-body>
   <fo:region-before region-name="xsl-region-before-first"
                     extent="{$region.before.extent}"
                     display-align="before"/>
   <fo:region-after region-name="xsl-region-after-first"
                    extent="{$region.after.extent}"
                     display-align="after"/>
 </fo:simple-page-master>
 <fo:simple-page-master master-name="titlepage-odd-npc"
                        page-width="{$page.width}"
                        page-height="{$page.height}"
                        margin-top="{$page.margin.top}"
                        margin-bottom="{$page.margin.bottom}"
                        margin-left="{$margin.left.inner}"
                        margin-right="{$page.margin.outer}">
   <xsl:if test="$axf.extensions != 0">
     <xsl:call-template name="axf-page-master-properties">
       <xsl:with-param name="page.master">blank</xsl:with-param>
     </xsl:call-template>
   </xsl:if>
   <fo:region-body margin-bottom="{$body.margin.bottom}"
                   margin-top="{$body.margin.top}"
                   column-gap="{$column.gap.titlepage}"
                   column-count="{$column.count.titlepage}">
   </fo:region-body>
   <fo:region-before region-name="xsl-region-before-odd"
                     extent="{$region.before.extent}"
                     display-align="before"/>
   <fo:region-after region-name="xsl-region-after-odd"
                    extent="{$region.after.extent}"
                     display-align="after"/>
 </fo:simple-page-master>
 <fo:simple-page-master master-name="titlepage-even-npc"
                        page-width="{$page.width}"
                        page-height="{$page.height}"
                        margin-top="{$page.margin.top}"
                        margin-bottom="{$page.margin.bottom}"
                        margin-left="{$margin.left.outer}"
                        margin-right="{$page.margin.inner}">
   <xsl:if test="$axf.extensions != 0">
     <xsl:call-template name="axf-page-master-properties">
       <xsl:with-param name="page.master">blank</xsl:with-param>
     </xsl:call-template>
   </xsl:if>
   <fo:region-body margin-bottom="{$body.margin.bottom}"
                   margin-top="{$body.margin.top}"
                   column-gap="{$column.gap.titlepage}"
                   column-count="{$column.count.titlepage}">
   </fo:region-body>
   <fo:region-before region-name="xsl-region-before-even"
                     extent="{$region.before.extent}"
                     display-align="before"/>
   <fo:region-after region-name="xsl-region-after-even"
                    extent="{$region.after.extent}"
                     display-align="after"/>
 </fo:simple-page-master>

</xsl:template>
<xsl:template name="select.user.pagemaster">
      <xsl:param name="element"/>
      <xsl:param name="pageclass"/>
      <xsl:param name="default-pagemaster"/>
      <xsl:choose>
          <xsl:when test="$element = 'book' and $pageclass = 'titlepage'">
              <xsl:value-of select="'coversequence'"/>
          </xsl:when>
          <xsl:otherwise>
              <xsl:value-of select="$default-pagemaster"/>
          </xsl:otherwise>
      </xsl:choose>
   </xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]