You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Scott Hofmann <ho...@one.net> on 2000/11/02 16:09:04 UTC

value-of in block

I'm trying to capture the value from my XML file to use as part of my XSL
tag. XSL does not seem to like putting an "if" statement inside of my block
tag.

I keep getting an error when I parse telling me that I need a ">" or "/>" at
the end of a block tag. I do have one but it is after the "if" statement.
Does anyone know if this type of thing allowed or not?

XML file I have:
    <Text style="bold">
        Some Content Here
    </Text>

XSL
<xsl:template match ="Text">
    <fo:block 
     <xsl:if test="@style">
      font-weight=\"<xsl:value-of select="@-style"/>\" </xsl:if>
      font-size="8pt">
            <xsl:apply-templates/>
    </fo:block>    
</xsl:template>

Scott Hofmann
~~~~~~~~~~~~~~~~~
hofmanns@one.net