W3C home > Mailing lists > Public > www-xsl-fo@w3.org > April 2003

Dynamic Page Headings

From: Al-Dhahir, Haitham <Haitham.Al-Dhahir@gs.com>
Date: Mon, 7 Apr 2003 17:56:21 +0100
Message-Id: <655FC854EBCED611899B000802B0522A03F22FE2@gsln23e.ln.fw.gs.com>
To: "'www-xsl-fo@w3.org'" <www-xsl-fo@w3.org>

Hi all,

I would like to know how to dynamically create page headings. I am receiving
an XML message of the form:

<message>
	<items>
		<item>
			<name1 val="name1"/>
			<address1 val="address1"/>
			<otherfields>
				<field1>
				<field2>
				etc
			</otherfields>
		</item>
		<item>
			<name2 val="name2"/>
			<address2 val="address2"/>
			<otherfields>
				<field1>
				<field2>
				etc
			</otherfields>

		</item>
		<item>
			<name3 val="name3"/>
			<address3 val="address3"/>
			<otherfields>
				<field1>
				<field2>
				etc
			</otherfields>

		</item>
	.....
	etc - number of items is not fixed
	.....
	</items>
</message>

Each item needs to be displayed sequentially in a PDF document, with each
item starting a new page - and, given that the number of fields in
otherfields can be quite large, it is often the case that each item's data
will spill over onto two or more pages. So to aid readability in the output
document, I want to put the "name" and "address" for the item at the top of
each page as a heading:

---------Start of Page 1-------------
name1
address1

field1
field2
field3
---------End of Page 1---------------
---------Start of Page 2-------------
name1
address1

field4
field5

---------End of Page 2---------------
---------Start of Page 3-------------
name2
address2

field1
field2

---------End of Page 3---------------

etc.

It seems to make sense to use a static content section at the top of each
page to achieve this - however, given that the static-content needs to
contain the item's specific name and address, read dynamically from the XML
message, is this possible? Also, the number of items is not known in
advance, so I can't create a separate static-content for each item.

Can anyone provide help here? Let me know if the problem requires further
clarification.

Thanks,

Haitham.
Received on Monday, 7 April 2003 13:02:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:10 GMT