[oXygen-user] Repeat fo:table-caption for a table that spans multiple pages question
Coe, David E
Thu Aug 7 09:23:28 CDT 2014
How can I repeat the fo:table-caption for a table that spans multiple pages and add "- Continued" at the end of the table-caption on the subsequent pages.
The tools I use are Oxygen Editor 16 as my XML editor and Arbortext Editor 6.1 to publish to PDF using its XSL-FO processor. Arbortext XSL-FO processor is equal to or slightly better than Apache FOP. At this time, I do not have the option to use a different FO processor. I prefer to try to solve it through XSLT and XSL-FO since I have more time and understanding invested in it, instead trying to learn how to create a FOSI file in Arbortext - I love learning but it takes time and deadlines seem to come too quickly. XSLT is fairly new to me and I am still learning; please forgive my ignorance if I stated something incorrectly in that regard.
I am restricted to customer-provided DTD and XSL files even though I can modify the XSLT to solve a particular issue like I posed. It is my understanding that the XSL code implements the XSLT 2.0 and XSL-FO 1.1 standards.
Fo:retrieve-table-marker is not supported by these processors. I have tried the various methods of using fo:retrieve-marker that I have found through several forums but I was not successful in solving this specific problem even though I did learn new stuff which allowed me to get this far. The best I was able to do was use fo:retrieve-marker for table caption in a static-content area but it repeats the table-caption on every page in the page header instead of displaying directly above the table.
Below is my code snippet:
<!-- fo:retrieve-table-marker - does not work with Apache FOP or Arbortext Editor 6.1 F000 -->
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master page-width="8.5in" page-height="11in" master-name="first">
<fo:region-body margin-right="1in" margin-left="1in" margin-bottom="1in" margin-top="1in" />
<fo:region-before extent=".5in" />
<fo:region-after extent=".5in" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:static-content flow-name="xsl-region-before">
<fo:table-caption>
<fo:block font-weight="bold" text-align="center">
<!-- fo:retrieve-marker -->
<fo:retrieve-marker retrieve-class-name="table-caption-continued"
retrieve-position="first-starting-within-page" />
</fo:block>
</fo:table-caption>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center">
<fo:page-number />
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body" font-family="sans-serif">
<xsl:apply-templates />
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="table">
<fo:table-and-caption>
<fo:block>
<!-- fo:marker -->
<fo:marker marker-class-name="table-caption-continued">
<xsl:apply-templates select="title" />
</fo:marker>
</fo:block>
<fo:block>
<fo:marker marker-class-name="table-caption-continued">
<xsl:apply-templates select="title" /> - Continued </fo:marker>
</fo:block>
<fo:table width="100%" table-layout="fixed">
<fo:table-column column-width="50%" />
<fo:table-column column-width="50%" />
<fo:table-header>
<fo:table-row>
<fo:table-cell border="solid">
<fo:block font-weight="bold">
<xsl:apply-templates select="tgroup/thead/row/entry[1]" />
</fo:block>
</fo:table-cell>
<fo:table-cell border="solid">
<fo:block font-weight="bold">
<xsl:apply-templates select="tgroup/thead/row/entry[2]" />
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="solid">
<fo:block>
<xsl:apply-templates select="tgroup/tbody/row[1]/entry[1]" />
</fo:block>
</fo:table-cell>
<fo:table-cell border="solid">
<fo:block>
<xsl:apply-templates select="tgroup/tbody/row[1]/entry[2]" />
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="solid">
<fo:block>
<xsl:apply-templates select="tgroup/tbody/row[2]/entry[1]" />
</fo:block>
</fo:table-cell>
<fo:table-cell border="solid">
<fo:block>
<xsl:apply-templates select="tgroup/tbody/row[2]/entry[2]" />
</fo:block>
</fo:table-cell>
</fo:table-row>
...
</fo:table-body>
</fo:table>
</fo:table-and-caption>
</xsl:template>
I appreciate any assistance in trying to solve this problem.
David Coe
Senior Technical Editor
407.514.2332 Office
407.508.9959 Mobile
<mailto:> E-mail
www.gdit.com<http://www.gdit.com> Website
General Dynamics Information Technology
Defense Solutions Division
Integrated Security and Instrumentation Solutions
12249 Science Drive, Suite 220
Orlando, Florida 32826
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20140807/de906323/attachment.html>
More information about the oXygen-user
mailing list