I am relatively new to XSL and FOP. For the project that I am working
on they do not want any kind of folio headers at the top of new chapter
pages, which are libel to appear on any page anywhere with no pattern,
so I have written the following code to try to get it to omit the
headers on pages marked noHeader using the fo:retrieve-marker command.
Here is the problem code:
<xsl:template name="footer-odd"> <!-- This is the folio line info
-->
<fo:block font-family="Times New Roman" font-size="11pt">
<xsl:if test="$version">
<xsl:variable name="chapterNumber">
<fo:retrieve-marker
retrieve-class-name="chapterID"
retrieve-position="first-starting-within-page"
retrieve-boundary="page-sequence" />
</xsl:variable>
<xsl:choose>
<xsl:when test="$chapterNumber =
'noHeader'"> <!--If marked noHeader -->
No Headers!
<!--Then omit headers (delete text later) -->
</xsl:when> <!--end if no headers
-->
<xsl:otherwise> <!--else
draw full header -->
<fo:table width="100%"
table-layout="fixed">
<fo:table-column column-number="1" column-width="100%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="right" font-style="italic">
<fo:block
background-image="http://www.freewebs.com/mhalpin/rightFolio1.svg"
background-repeat="no-repeat" padding-top="-12pt"
margin-top="13pt"><fo:page-number format="1"/></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block font-family="Times New Roman" font-size="9pt" color="#888888"
padding-top="-11pt" text-align="right">
<xsl:copy-of select="$chapterNumber"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</fo:block>
</xsl:template>
I realize after browsing some of the archives that my problem most
likely stems from trying to use <xsl:variable> in conjunction with
<fo:retrieve-marke>, which if I understand correctly occurs after all
the xsl items are processed. So my question is does anyone know a way I
can either fix this code or anything else that I can do to achieve my
objective?
Thanks,
Michael