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 s-...@artefrance.fr on 2003/02/17 17:19:04 UTC
Variable and Static Content
Hello,
I have a little problem using variable in a static content... I have a
border on "even" pages of my document where I wanna draw the title of the
current category.
So I putted a static content with a test on the $THEME variable, which
will select the right image for the current category.
<fo:static-content flow-name="margin-even">
<xsl:choose>
<xsl:when test="$THEME='Histoire Ancienne'">
<fo:external-graphic>
<xsl:attribute
name="src">file:/cd_bord_histoire_ancienne_even.gif</xsl:attribute>
</fo:external-graphic>
</xsl:when>
<xsl:when test="$THEME='Histoire Contemporaine'">
<fo:external-graphic>
<xsl:attribute
name="src">file:/cd_bord_histoire_contempora_even.gif</xsl:attribute>
</fo:external-graphic>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</fo:static-content>
Then in my template-match, I set this variable to the current category :
<xsl:template match="FICHE">
<xsl:variable name="THEME"><xsl:value-of select="SOUSTHEME"
/></xsl:variable>
</xsl:template>
But I have a null pointer at runtime... So I am wondering how to put a
dynamic variable in a static content (it is working well for the page
number) !
Please help ... I don't want to make another XSL transformation to modify
my XML input !
Simon OUALID
Arte FRANCE
Application Developper
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org