Loading ...
Sorry, an error occurred while loading the content.

5713RE: [XSL-FO] chapter numbering

Expand Messages
  • Norma Yeazell
    Aug 24, 2004
      This is a follow-up to my earlier question. I have the chapters
      numbering correctly now, but would like the page numbers to restart with
      each dmodule within the chapter. I assume I need a new page sequence to
      accomplish this but I do not understand how to make this work. If I
      repeat the sequence I get the entire document again.

      When I started this we were just printing one dmodule at a time and
      everything worked fine but we have added the wrapper tags pm and chapter
      to put the book together.

      My xml would look like:

      <pm>
      <chapter>
      <dmodule> content A</dmodule>
      <dmodule> content A</dmodule>
      <dmodule> content A</dmodule>
      </chapter>
      <chapter>
      <dmodule> content B</dmodule>
      <dmodule> content B</dmodule>
      <dmodule> content B</dmodule>
      </chapter>
      </pm>

      <xsl:template match="/">
      <fo:root>
      <fo:layout-master-set>
      <fo:simple-page-master master-name="firstpage" page-height="297mm"
      page-width="210mm" margin-top="11mm" margin-bottom="12mm"
      margin-left="25mm" margin-right="15mm">
      <fo:region-body margin-top="21mm" margin-bottom="22mm"/>
      <fo:region-before extent="28mm" display-align="before"/>
      <fo:region-after region-name="first" extent="29mm"
      display-align="after"/>
      </fo:simple-page-master>

      <fo:simple-page-master master-name="restpage" page-height="297mm"
      page-width="210mm" margin-top="11mm" margin-bottom="12mm"
      margin-left="25mm" margin-right="15mm">
      <fo:region-body margin-top="21mm" margin-bottom="22mm"/>
      <fo:region-before extent="28mm" display-align="before"/>
      <fo:region-after region-name="rest" extent="29mm"
      display-align="after"/>
      </fo:simple-page-master>

      <fo:simple-page-master master-name="lastpage" page-height="297mm"
      page-width="210mm" margin-top="11mm" margin-bottom="12mm"
      margin-left="25mm" margin-right="15mm">
      <fo:region-body margin-top="21mm" margin-bottom="22mm"/>
      <fo:region-before extent="28mm" display-align="before"/>
      <fo:region-after region-name="last" extent="29mm"
      display-align="after"/>
      </fo:simple-page-master>

      <fo:page-sequence-master master-name="chapter">
      <fo:repeatable-page-master-alternatives>
      <fo:conditional-page-master-reference page-position="last"
      master-reference="lastpage"/>
      <fo:conditional-page-master-reference page-position="rest"
      master-reference="restpage"/>
      <fo:conditional-page-master-reference page-position="first"
      master-reference="firstpage"/>
      </fo:repeatable-page-master-alternatives>
      </fo:page-sequence-master>

      </fo:layout-master-set>

      <fo:page-sequence master-reference="chapter" language="en"
      line-height="1.15em" font-family="sans-serif" font-size="10pt"
      hyphenate="true">
      <fo:static-content flow-name="xsl-region-before">
      <fo:block font-weight="bold"
      text-align-last="justify"><fo:external-graphic content-width="1cm"
      src="Logo.tif"/><fo:leader leader-pattern="space"/>
      <xsl:text>Publication Number</xsl:text>
      </fo:block>
      <fo:block border-after-style="solid" border-after-width="0.5pt"
      space-before="1mm"/>
      <fo:block-container display-align="after"
      block-progression-dimension="15%">
      <fo:block font-size="10pt">
      <fo:retrieve-marker retrieve-class-name="issue-table-header"
      retrieve-position="first-starting-within-page"/>
      </fo:block>
      </fo:block-container>
      </fo:static-content>

      <fo:static-content flow-name="first" region-name="first">
      <fo:block border-before-style="solid" border-before-width="0.5pt"
      space-after="2mm"/>
      <fo:block text-align-last="justify">Effectivity: ALL<fo:leader
      leader-pattern="space"/><fo:wrapper font-weight="bold"><xsl:value-of
      select="dmno"/></fo:wrapper></fo:block>
      <fo:block text-align="right" font-weight="bold">
      <fo:retrieve-marker retrieve-class-name="issue-chap-number"
      retrieve-position="last-starting-within-page"/>
      </fo:block>
      <fo:block text-align="right" font-weight="bold">DRAFT
      COPY<fo:leader leader-pattern="space" leader-length="20%"/> Page
      <fo:page-number/></fo:block> </fo:static-content>

      <fo:static-content flow-name="last" region-name="last">
      <fo:block border-before-style="solid" border-before-width="0.5pt"
      space-after="2mm"/>
      <fo:block text-align-last="justify">Effectivity: ALL<fo:leader
      leader-pattern="space"/><fo:wrapper font-weight="bold"><xsl:value-of
      select="dmno"/></fo:wrapper></fo:block>
      <fo:block text-align="right" font-weight="bold">End of
      data<fo:leader leader-pattern="space" leader-length="30%"/>
      <fo:retrieve-marker retrieve-class-name="issue-chap-number"
      retrieve-position="last-starting-within-page"/>
      </fo:block>

      </fo:block>
      <fo:block text-align="right" font-weight="bold">DRAFT COPY Page
      <fo:page-number/></fo:block> </fo:static-content>

      <fo:static-content flow-name="rest" region-name="rest">
      <fo:block border-before-style="solid" border-before-width="0.5pt"
      space-after="2mm"/>
      <fo:block text-align-last="justify">Effectivity: ALL<fo:leader
      leader-pattern="space"/><fo:wrapper font-weight="bold"><xsl:value-of
      select="dmno"/></fo:wrapper></fo:block>
      <fo:block text-align="right" font-weight="bold">
      <fo:retrieve-marker retrieve-class-name="issue-chap-number"
      retrieve-position="last-starting-within-page"/>
      </fo:block>
      <fo:block text-align="right" font-weight="bold">DRAFT COPY Page
      <fo:page-number/></fo:block> </fo:static-content>

      <fo:flow flow-name="xsl-region-body"> <fo:marker
      marker-class-name="issue-table-header"/>
      <xsl:apply-templates/>
      </fo:flow>

      </fo:page-sequence>

      </fo:root>
      </xsl:template>



      Confidentiality Notice
      The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.
    • Show all 6 messages in this topic