Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > substracting two page number citations?

Reply
Thread Tools

substracting two page number citations?

 
 
=?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
Guest
Posts: n/a
 
      06-29-2006
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><foage-number-citation
ref-id="first-sheet{@figureno}" line-height="0" /> OF
<xsl:variable
name="figure_first_page_var"><foage-number-citation
ref-id="first-sheet{@figureno}"/></xsl:variable>
<xsl:variable
name="figure_last_page_var"><foage-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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compare two SOAP Envelope or two Document or two XML files GenxLogic Java 3 12-06-2006 08:41 PM
OT: Number Nine, Number Nine, Number Nine FrisbeeŽ MCSE 37 09-26-2005 04:06 PM
substracting a lot of numbers optimisation Piotr Sobolewski C Programming 1 05-09-2005 09:05 AM
ASP.NET Mobile and Split page or using in the same page with two forms Sara T. ASP .Net 0 03-02-2005 04:52 PM
Page Number and Page Breaks AV ASP General 4 10-28-2003 04:34 PM



Advertisments