Loading ...
Sorry, an error occurred while loading the content.

Re: trying to test for last page with xsl:choose

Expand Messages
  • freefly_xml
    A working way to create a different footer for the last page of a document with xslt. In the looping of the detail lines test for the last line and set a
    Message 1 of 3 , May 16, 2006
    • 0 Attachment
      A working way to create a different footer for the last page of a
      document with xslt.

      In the looping of the detail lines test for the last line and set a
      marker:

      <xsl:choose>
      <xsl:when test="position() = last()">
      <fo:marker marker-class-name="footer-marker">
      <fo:block>LAST PAGE</fo:block>
      </fo:marker>
      </xsl:when>
      <xsl:otherwise>
      <fo:marker marker-class-name="footer-marker">
      <fo:block>Continued...</fo:block>
      </fo:marker>
      </xsl:otherwise>
      </xsl:choose>

      then retrieve the marker in the region-after with this:

      <fo:retrieve-marker retrieve-position="last-ending-within-page"
      retrieve-class-name="footer-marker" />

      more details:
      http://www.bangboompow.com/xml/invoice
    Your message has been successfully submitted and would be delivered to recipients shortly.