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

Discussion in 'XML' started by tldisbro@insightbb.com, Dec 2, 2005.

  1. Guest

    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
    , Dec 2, 2005
    #1
    1. Advertising

  2. Guest

    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>
    , Dec 2, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hilz
    Replies:
    4
    Views:
    1,665
  2. Replies:
    1
    Views:
    3,583
    A. Bolmarcich
    May 27, 2005
  3. freefly_xml
    Replies:
    4
    Views:
    835
    freefly_xml
    May 16, 2006
  4. Replies:
    2
    Views:
    9,243
    Martin Honnen
    Sep 5, 2006
  5. Skybuck Flying

    Call oddities: &Test() vs &Test vs Test

    Skybuck Flying, Oct 4, 2009, in forum: C Programming
    Replies:
    1
    Views:
    680
    Skybuck Flying
    Oct 4, 2009
Loading...

Share This Page