substracting two page number citations?

Discussion in 'XML' started by =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=, Jun 29, 2006.

  1. Hello all,

    I need to generate (SHEET X of Y) in titles for figures contained in a
    section (I already generate page A of B at the bottom right of every
    page in the document).

    Is there a way for example to substract 2 page number citations? That
    would solve part of my problem. Or is there any other way of doing
    this?

    Here is an snippet of the XSLT I'm working with:

    <fo:block start-indent="0pt">
    <fo:table table-layout="fixed"
    keep-together.within-page="always">
    <fo:table-column column-width="proportional-column-width(1)"/>

    <fo:table-body>
    <fo:table-row>
    <fo:table-cell border-color="black" border-style="solid"
    border-width="0.4pt" height="0.5in">
    <fo:block keep-with-next="always" font-weight="bold">
    <xsl:text>FIGURE </xsl:text><xsl:value-of
    select="@figureno" />
    <xsl:text>: </xsl:text><xsl:apply-templates
    select="./Heading" mode="Bold-Inline"/>
    </fo:block>
    </fo:table-cell>
    </fo:table-row>
    <fo:table-row>
    <fo:table-cell display-align="center" border-color="black"
    border-style="solid" border-width="0.4pt" height="8.0in">
    <fo:block>
    <fo:block id="first-sheet{@figureno}"
    line-height="0"></fo:block>
    <xsl:apply-templates />
    <xsl:if test="following::node()!='GRAPHIC' or
    following::node()!='Description'">
    <fo:block id="last-sheet{@figureno}"
    line-height="0"></fo:block>
    </xsl:if>
    </fo:block>
    </fo:table-cell>
    </fo:table-row>
    <fo:table-row>
    <fo:table-cell display-align="after" border-color="black"
    border-style="solid" border-width="0.4pt" height="0.45in">
    <fo:block keep-with-next="always" font-weight="bold"
    text-align="center">
    <xsl:text>FIGURE </xsl:text><xsl:value-of
    select="@figureno" />
    <xsl:text>: </xsl:text><xsl:apply-templates
    select="./Heading" mode="Bold-Inline"/>
    </fo:block>
    <fo:block font-weight="bold" text-align="center">
    <xsl:text>(SHEET </xsl:text><fo:page-number-citation
    ref-id="first-sheet{@figureno}" line-height="0" /> OF
    <xsl:variable
    name="figure_first_page_var"><fo:page-number-citation
    ref-id="first-sheet{@figureno}"/></xsl:variable>
    <xsl:variable
    name="figure_last_page_var"><fo:page-number-citation
    ref-id="last-sheet{@figureno}"/></xsl:variable>
    <xsl:variable name="last_sheet_var"
    select="$figure_last_page_var - $figure_first_page_var"/>
    <xsl:value-of select="$last_sheet_var"/>
    <xsl:text>)</xsl:text>
    </fo:block>
    </fo:table-cell>
    </fo:table-row>
    </fo:table-body>
    </fo:table>
    </fo:block>

    Regards
    Jean-Francois Michaud
     
    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=, Jun 29, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sebastien Lambla

    Re: Activate Outlook citations

    Sebastien Lambla, Apr 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    773
    Sebastien Lambla
    Apr 2, 2004
  2. GenxLogic
    Replies:
    3
    Views:
    1,370
    andrewmcdonagh
    Dec 6, 2006
  3. Piotr Sobolewski

    substracting a lot of numbers optimisation

    Piotr Sobolewski, May 9, 2005, in forum: C Programming
    Replies:
    1
    Views:
    298
    Ken Human
    May 9, 2005
  4. Alec Taylor
    Replies:
    0
    Views:
    77
    Alec Taylor
    Feb 23, 2013
  5. Terry Reedy
    Replies:
    0
    Views:
    79
    Terry Reedy
    Feb 24, 2013
Loading...

Share This Page