[xsl] Fwd: fail to alter rendering effects with different pages by appling position() mod 2 = 1

Subject: [xsl] Fwd: fail to alter rendering effects with different pages by appling position() mod 2 = 1
From: team wise <dfanster@xxxxxxxxx>
Date: Mon, 12 Sep 2011 00:22:17 +0800
Hi there,

My problem being,  the XSL FO cannot be applied differently to
different pages, for example, on the last page,  the
axf:background-color attribute and its value should have been applied
in the resulting PDF. Previoulsy, the following line of code works
just fine:

///////////////////



  <xsl:if test="$outputformat = 'UG_Booklet_Print'">
        <xsl:choose>
          <xsl:when test="position() = last()">
            <xsl:attribute name="axf:background-color"><xsl:value-of
select="$background_colour"/></xsl:attribute>
            <xsl:attribute
name="color">rgb-icc(#CMYK,0%,0%,0%,0%)</xsl:attribute>
          </xsl:when>
          <xsl:when test="position() mod 2 = 1">
            <xsl:attribute
name="axf:background-color">rgb-icc(#CMYK,0%,0%,0%,10%)</xsl:attribute>
            <xsl:attribute
name="color">rgb-icc(#CMYK,0%,0%,0%,80%)</xsl:attribute>
          </xsl:when>
          <xsl:otherwise>
            <xsl:attribute
name="color">rgb-icc(#CMYK,0%,0%,0%,80%)</xsl:attribute>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:if>
//////////////////////////////

 after the modifications I made to XSLs today, the resulting PDF
indicates that either position() = last()" or position() mod 2 = 1 can
work as expected, but not all work simultaneously, subject to proper
conditions. Specifically,

My question , how can I make XSL FO treat different pages differently
as it used to be?

I greatly appreciate if there is any hint.



 Ray

Current Thread