473,320 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

substracting two page number citations?

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

Jun 29 '06 #1
0 1477

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
4
by: hilz | last post by:
Hi all: Is there a way to make the <fo:page-number> start from a value different than 1 ? (using fop to generate pdf) thanks hilz
1
by: Michel | last post by:
Hi all, This is my first post, so I am very new at this. I am trying to use page-number-citation twice in my code, but the second time it just shows '0'. The output is in pdf format and I am...
6
by: Sean C. | last post by:
Helpful folks, I am having a hard time figuring out how to reduce my percentage of dirty page steal activity. Below are statistics for three fairly normal days, with the bufferpool hit ratios...
7
by: Jean-David Beyer | last post by:
I have six hard drives (4 SCSI and 2 EIDE) on my main machine with parts of a database on each drive. The main index is on one SCSI drive all to itself. The main data are on the other three SCSI...
32
by: Cmorriskuerten | last post by:
HI, is this is this solution to test if a number is a prime number or not: /* * Is n a prime number? * Return TRUE (1): n is a prime number * Return FALSE (0): n is a *not* a prime number...
1
by: Piotr Sobolewski | last post by:
Hello, I write a program which will stabilize a shaking video made with hand camera. Of course it involves substracting frames, and it is substracting a huge lot of one byte values. The...
7
by: Shapper | last post by:
Hello, When creating an ASP.NET/VB web site I place my code in a code behind page, i.e., aspx.vb. Sometimes I have functions which are common to all aspx files. Is it possible in page1.aspx...
0
by: Jean-François Michaud | last post by:
Hello people, I'm having a hard time figuring out how to align my page numbe properly to the right margin in the Table of content I'm generating. I'm using FOP and there are some known issues...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.