Dynamic Page Headings

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 UTC