You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Lo...@log-net.com on 2005/05/16 15:43:56 UTC
conditional-page-master-reference and last()
I have a layout such that:
<fo:page-sequence-master master-name="mainSequence">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference page-position="first"
master-reference="firstPage"/>
<fo:conditional-page-master-reference page-position="rest"
master-reference="otherPage"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
I need to put a footer on each page that either indicates that it is or is
not the last page of the entire printed document. Usually, when I have a
repeatable-page-master-reference, I just use code like:
<xsl:choose>
<xsl:when test="position() = last()">
END OF ORDER
</xsl:when>
<xsl:otherwise>
CONTINUED ON FOLLOWING PAGE
</xsl:otherwise>
</xsl:choose>
However, last() seems to be giving me my position within the reference.
For example, say I have two pages, each one is a different layout using
different static contents. On both pages, last() is equal to position().
What am I doing wrong?
Thanks,
Lou
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: conditional-page-master-reference and last()
Posted by Roland Neilands <rn...@pulsemining.com.au>.
Louis,
I beleive it is not implemented in FOP.
Use fo:marker instead for this instead, there are plenty of examples in
the list archive and your fop/examples directory, sorry don't have time
to dig them up right now.
Cheers,
Roland
Louis.Masters@log-net.com wrote:
> I have a layout such that:
>
> <fo:page-sequence-master master-name="mainSequence">
> <fo:repeatable-page-master-alternatives>
> <fo:conditional-page-master-reference page-position="first"
> master-reference="firstPage"/>
> <fo:conditional-page-master-reference page-position="rest"
> master-reference="otherPage"/>
> </fo:repeatable-page-master-alternatives>
> </fo:page-sequence-master>
>
> I need to put a footer on each page that either indicates that it is or is
> not the last page of the entire printed document. Usually, when I have a
> repeatable-page-master-reference, I just use code like:
>
> <xsl:choose>
> <xsl:when test="position() = last()">
> END OF ORDER
> </xsl:when>
> <xsl:otherwise>
> CONTINUED ON FOLLOWING PAGE
> </xsl:otherwise>
> </xsl:choose>
>
> However, last() seems to be giving me my position within the reference.
> For example, say I have two pages, each one is a different layout using
> different static contents. On both pages, last() is equal to position().
>
> What am I doing wrong?
>
> Thanks,
> Lou
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: conditional-page-master-reference and last()
Posted by JB...@s-s-t.com.
Hi, Lou,
last() is working correctly (getting the last node in a node set), but
that's not much comfort.
My only thought on this one is to apply last() to the union of the two
page sets. Unfortunately, I don't have time to generate a test case and
fiddle with it. Maybe you can use the idea, though.
Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org