using <fo:page-number/> in <xsl:if test="">

T

tldisbro

Hello All,
I am trying to use the returned value of the <fo:page-number>
element/function in my <xsl:if> test condition. But am unsuccessful in
doing so. Is it possible to use it in this fashion with a conversion
or correct syntax? I would like to test the current page number and
see if it is even or odd - and if it is odd I would like to perform
additional steps. I would like to do something like this (assume all
namespaces are set):

<xsl:if test="<fo:page-number/>%2">
<xsl:text> Page </xsl:text> <fo:page-number/>
</xsl:test>

But of coarse the test condition does not want to deal with an
fo:function return value and I just want to do a Modulo of 2 to
determine if it is even or not.

Any help would be appreciated
 
T

tldisbro

ok - typo in previous post - sorry :-(
code sample should be:

<xsl:if test="<fo:page-number/>%2">
<xsl:text> Page </xsl:text> <fo:page-number/>
</xsl:if>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top