<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Footnotes </TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">Hi All,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I'm looking to solve a problem and I was wondering if anyone can suggest a solution (I'm starting to think perhaps there isn't one).</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Sorry if this gets long winded.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I produce documents and have no problem with footnotes. Our XML is set up so that where a footnote needs to appear, there is a <footnote-text> tag inline with the rest of the text. As there is no footnote numbering within the XML I have to handle this myself.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">The way it is done is by passing over the XML once and using java to find the instances of the footnotes, building up a list of objects containing the footnote number (generated using a counter) and the ID of the element. On the second pass using the stylesheets, whenever I come across a need for a footnote, I find the element ID in the data structure, and retrieve the correct footnote number. I then do the same thing in the footer and output the footnote text. This gives continuous footnote numbering from start to finish of the document as opposed to the numbering starting at 1 on each page.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">What I now want to do is streamline the document: There can be many identical footnotes within the document both on the same page and over many pages. I need to merge these footnotes into a single footnote number so if there are 20 identical footnote references in one page, I can have one footnote number 20 times through out the text and one footnote at the bottom (as opposed to footnote numbers 1 to 20 within the text on the same page, and 20 identical footnotes in the footer).</FONT></P>
<P><FONT SIZE=2 FACE="Arial">I can build up a data structure within the java so that all footnote-text elements containing the same text can be grouped (I now have an array of objects each containing it's own array of element ID's), so I know they are identical. What I'm stuck on is a way to identify when I have created a new page and therefore need to increment the number by one. I have the following problem scenario:</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Footnote text 'amended by X' appears as the first 20 footnotes, but only the first 18 appear on the first page. What I really need to do is output 18 footnote number 1's within the text of page one and have a footnote reference to number 1 in the footer of page one. Then what I need is the remaining footnote references as number 2 on the second page with footnote 2 in the footer of page 2. As I don't know when the text for page one has ended I have no way of knowing that I need to increment the footnote number and output the footnote text again (this time referring to footnote 2 in the footer of page 2).</FONT></P>
<P><FONT SIZE=2 FACE="Arial">I'm starting to think this can't be done, but it must be a common publishing issue.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">If one exists can anyone point me to a solution?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thanks in advance</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Chris</FONT>
</P>
<BR>
<BR>
<BR>
</BODY>
</HTML>