Sharan,
You can use marker and retrieve marker. The header has to be variable depending on the contents of the page. Example follows. Retrieve marker retrieves whatever you put within the <fo:marker> tags. Those contents are not output on the page. Also, your code used region-start, you want region-before. You used static-content instead of fo:flow.
<fo:static-content flow-name="xsl-region-before"> <fo:block font-size="16pt" font-weight="bold" font-family="sans-serif"> <xsl:text> Car: </xsl:text> <fo:retrieve-marker retrieve-class-name="car-category" retrieve-boundary="page" retrieve-position="first-starting-within-page"/> </fo:block> </fo:static-content>
<fo:flow flow-name="xsl-region-body"> <xsl:for-each select="/car"> <fo:block><fo:marker marker-class-name="car-category"><xsl:value-of select="Car/@category"/></fo:marker> <xsl:value-of select="@name"/> . . . </fo:block> </fo:flow>
Chuck
Sharan, Dharmendra wrote:
Hi XSL FOP Developers,
I want to ask if it is possible to have a dynamic Header implemented in a Page-Sequence.
something like ...
<fo:static-content flow-name="xsl-region-start"> <fo:block font-size="16pt" font-weight="bold" font-family="sans-serif"> <xsl:text> Car: </xsl:text> <xsl:value-of select="Car/@category"/> </fo:block> </fo:static-content>
<fo:static-content flow-name="xsl-region-body">
<!-- XSL FO code to process the xml goes here... -->
<!-- This body content gets "page header" using the
xsl-region-start above -->
<!-- Is is possible to have a different header for this/each page
-->
<!-- depending on the data being processed eg. let's say we have a
xml having car schema -->
<!-- would it be possible to have the page header vary depending on
the car detail being displayed ??? -->
<!-- (assuming each car gets displayed on its own page i.e.
separate page for each car) -->
</fo:static-content>
Assuming an XML like :-
<Vehicle type="4 wheel drive">
<car category="sedan"> <!-- Car details here... --> </car>
<car category="sports"> <!-- Car details here... --> </car>
</Vehicle>
Any ideas ? Is there a better way to achieve the same results ? Any helps/hints/suggestions appreciated.
Thanks!,
Dharmendra