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 Jacob Bager <jb...@an-concepts.dk> on 2003/04/30 12:37:27 UTC

Dynamic Blocks.

hey there..

Im working with the xsl:fo on the cocoon, and i have run into some trouble.

i can't figure out, how to set block-attributes dynamicaly.

Here's what i tried. :

  the xml-data file has a tag like this.

    <sFont color="RED" size="16px">
        Some text ...    
    </sFont>

the xsl template looks like this.
    <xsl:template match="sFont">
      <xsl:variable name="color">
       <xsl:choose>
        <xsl:when test="@color">
             <xsl:value-of select="@color" />
        </xsl:when>
       <xsl:otherwise>black</xsl:otherwise>
       </xsl:choose>
      </xsl:variable>
     <fo:block color="$color">
        <xsl:apply-templates/>
     </fo:block>
    </xsl:template>

the block doesn't set the text to anything . 

Am i using the wrong attribute, in the block?

why can't i get this to work?

Please Help!

------------------------------------------------------------
Jacob Bager
jb@an-concepts.dk
Developer 
http://www.An-Concepts.dk


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org