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

5715RE: [XSL-FO] chapter numbering

Expand Messages
  • G. Ken Holman
    Aug 24, 2004
      At 2004-08-24 09:34 -0400, Norma Yeazell wrote:
      >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:
      ><dmodule> content A</dmodule>
      ><dmodule> content A</dmodule>
      ><dmodule> content A</dmodule>
      ><dmodule> content B</dmodule>
      ><dmodule> content B</dmodule>
      ><dmodule> content B</dmodule>

      Your stylesheet would be better structured like:

      <xsl:template match="pm">
      <!--do root stuff-->
      <xsl:apply-templates select="chapter"/>

      <xsl:template match="chapter">
      <!--do chapter stuff-->
      <xsl:apply-templates select="dmodule"/>

      <xsl:template match="dmodule">
      <!--do module stuff-->
      <fo:page-sequence initial-page-number="1" ...>
      <!--do module content-->

      ><xsl:template match="/">

      Your code appears to be trying to do *everything* inside of the processing
      of the root node ... my gut feel is that a modular approach will solve your

      I hope this helps.

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

      World-wide on-site corporate, govt. & user group XML/XSL training.
      G. Ken Holman mailto:gkholman@...
      Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
      Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
      Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
      Legal business disclaimers: http://www.CraneSoftwrights.com/legal
    • Show all 6 messages in this topic