M
morrell
Hi all
Is there any chance you can check if a fo:block with an id of "Tips"
contains any data.
The problem I'm having is creating a fo:block then for-each node within
one part of the xml I'm testing if scores match a particular high/Low
then printing Tips.
If there are no tips printed I would like to write a particular
statements which says "No Tips"
eg XML
<Scale id="1" min="2" max="4">Statement 1</Scale>
<Scale id="2" min="2.4" max="3.5">Statement 2</Scale>
<Scale id="3" min="3" max="5">Statement 3</Scale>
<Scale id="4" min="1" max="3">Statement 4</Scale>
<Scale id="5" min="1.5" max="4.2">Statement 5</Scale>
eg XSL
<fo:block id="Tips">
<xsl:for-each select="Scale">
<xsl:variable name="min" select="@min"/>
<xsl:variable name="max" select="@max"/>
<xsl:if test="$score >= $min and $score <= $max">
<xsl:value-of select="."/>
</xsl:if>
</xsl:for-each>
<xsl:if test="NO STATEMENTS PRINTED">
No Tips Sorry
</xsl:if>
</fo:block>
Is there any chance you can check if a fo:block with an id of "Tips"
contains any data.
The problem I'm having is creating a fo:block then for-each node within
one part of the xml I'm testing if scores match a particular high/Low
then printing Tips.
If there are no tips printed I would like to write a particular
statements which says "No Tips"
eg XML
<Scale id="1" min="2" max="4">Statement 1</Scale>
<Scale id="2" min="2.4" max="3.5">Statement 2</Scale>
<Scale id="3" min="3" max="5">Statement 3</Scale>
<Scale id="4" min="1" max="3">Statement 4</Scale>
<Scale id="5" min="1.5" max="4.2">Statement 5</Scale>
eg XSL
<fo:block id="Tips">
<xsl:for-each select="Scale">
<xsl:variable name="min" select="@min"/>
<xsl:variable name="max" select="@max"/>
<xsl:if test="$score >= $min and $score <= $max">
<xsl:value-of select="."/>
</xsl:if>
</xsl:for-each>
<xsl:if test="NO STATEMENTS PRINTED">
No Tips Sorry
</xsl:if>
</fo:block>