Re: [xsl] how to format page number citation as "01"

Subject: Re: [xsl] how to format page number citation as "01"
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Jan 2002 11:46:51 -0500
At 2002-01-28 11:11 -0500, JZhang@xxxxxxxxxxxxx wrote:
what I used is just as follows:

<fo:page-sequence master-name="main" format="01">

<fo:block-container border-style="solid" border-left-style="solid"
border-right-style="solid" border-width="0.5mm" height="8mm" width="40mm"
top="29mm" left="0mm" position="absolute">
<fo:block font-family="Helvetica" font-size="12pt" font-weight="normal"
line-height="8mm" text-align="center" vertical-align="middle" >
      PAGE
      <fo:inline  font-size="14pt" font-weight="bold">
        <fo:page-number />
      </fo:inline>
    OF
      <fo:inline font-size="14pt" font-weight="bold" >
        <fo:page-number-citation  ref-id='endofdoc'/>
      </fo:inline>
      </fo:block>
    </fo:block-container>

  <fo:block  id="endofdoc">
    <fo:page-number />
  </fo:block >

Note you could just have <fo:block id="endofdoc"/> since it is not necessary to actually have a page number in the flow (and may even not be what you wish to see show up on the last page)... the formatter just looks at where the id'ed area is.


the result form xalan and fop is PAGE 01 OF 3

Looks like a bug to me. I'm not running fop. The stream below works just fine in Antenna House.


................ Ken

<?xml version="1.0" encoding="utf-8"?><!--zhang.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format";
      font-family="Times" font-size="20pt">

<layout-master-set>
  <simple-page-master master-name="frame"
    page-height="11in" page-width="8.5in"
    margin-top=".6in" margin-bottom=".6in"
    margin-left=".6in" margin-right=".6in">
    <region-body region-name="frame-body"/>
  </simple-page-master>
</layout-master-set>

<page-sequence master-reference="frame" format="01">

<flow flow-name="frame-body">


<block-container border-style="solid" border-left-style="solid" border-right-style="solid" border-width="0.5mm" height="8mm" width="40mm" top="29mm" left="0mm" position="absolute"> <block font-family="Helvetica" font-size="12pt" font-weight="normal" line-height="8mm" text-align="center" vertical-align="middle" > PAGE <inline font-size="14pt" font-weight="bold"> <page-number /> </inline> OF <inline font-size="14pt" font-weight="bold" > <page-number-citation ref-id='endofdoc'/> </inline> </block> </block-container>

<block id="endofdoc"/>

</flow></page-sequence></root>




-- Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO - Feb 18-22, 2002

G. Ken Holman                mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6                        Definitive XSLT & XPath
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1               Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
articles, training(instructor-live,Internet-live,web/CD,licensed)
Next public training:  02-02-11,12,14,15,18,21,03-04,05,06,08,11,
-                                04-08,09,10,12,05-14,15,06-04,07


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread