xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Shaw <n8_s...@yahoo.com>
Subject page sequencing
Date Mon, 03 Jun 2002 19:10:01 GMT
Sorry if this is a FAQ, but I have looked all over the
archives and web and have not found an answer yet.

I am using FOP 0.20.1 and would like to use a
different footer for 1) the first page 2) all body
pages and 3) the last page.

Namely, on the first page, I do NOT want a page number
and I want the text "-more-" to appear in the footer.
On all body pages, I want the text "-more-" and the
page number to appear. Finally, on the last page, I
simply want the text "-end-" to appear.

How can I accomplish this? All of my pages have the
same dimensions and layout, so it does not make sense
to me to have to create 3 identical
simple-page-masters.

Here is what I am using now, which puts "-more-" on
all pages and the page number on all pages except for
the first and last.

<xsl:template match="/">
	<fo:root
xmlns:fo="http://www.w3.org/1999/XSL/Format">

		<!-- defines page layout -->
		<fo:layout-master-set>
			<fo:simple-page-master master-name="only"
					margin-top="0.5in"
					margin-bottom="0.5in"
					margin-left="0.5in"
					margin-right="0.5in">
				<fo:region-before extent="0.3in"/>
				<fo:region-start extent="0.3in"/>
				<fo:region-body margin-top="0.3in"
						margin-bottom="0.3in"
						margin-left="0.3in"
						margin-right="0.3in"/>
				<fo:region-end extent="0.3in"/>
				<fo:region-after extent="0.3in"/>
			</fo:simple-page-master>
		</fo:layout-master-set>

<!-- there is only one page-sequence master page as we
only need one page layout -->
		<fo:page-sequence master-name="only">

			<!-- I have title in here, but it does not seem to
work -->
			<fo:title><xsl:value-of
select="/NewsRelease/MetaData/Headline" /></fo:title>

			<!--tried to put in a header, but you cannot align
things both left and right in FOP
			<fo:static-content flow-name="xsl-region-before">
				<fo:block font-size="8pt"
									font-family="sans-serif"
									width="7in">
					<fo:block text-align="start">Office of Biological
and Physical Research</fo:block>
					<fo:block text-align="end">Space Research
Update</fo:block>
				</fo:block>
			</fo:static-content>-->

			<!--tried to put in a footer, but you cannot align
things both left and right in FOP -->
			<fo:static-content flow-name="xsl-region-after">
				<fo:block font-size="10pt"
									font-family="sans-serif"
									text-align="center">-more-
				</fo:block>
				<fo:block font-size="10pt"
									font-family="sans-serif"
									text-align="center">-<fo:page-number />-
				</fo:block>
			</fo:static-content>

			<fo:flow flow-name="xsl-region-body">
					<fo:external-graphic
src="http://www.nasa.gov/images/web_pr_banner.gif"
							scaling="uniform"
							scaling-method="integer-pixels" />
					<fo:block font-size="11pt"
					font-weight="normal"
					font-family="sans-serif"
					line-height="13pt"
					space-before.optimum="12pt"
					space-treatment="ignore">
						<xsl:apply-templates />
					</fo:block>
			</fo:flow>

		</fo:page-sequence>
	</fo:root>
</xsl:template>


TIA,

--Nate

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

Mime
View raw message