Chris,

I don't know if/how this'll help, but here's how I force EMPTY content to have at least a non-breaking space:

  <xsl:call-template name="EMPTYCHECK">
    <xsl:with-param name="counter" select="NODE/TO/SELECT"/>
  </xsl:call-template>

<xsl:template name="EMPTYCHECK">
<!-- replaces empty element(s) with non-breaking space character - &#160; -->
<xsl:param name="counter"/>
<xsl:choose>
<xsl:when test="$counter !=''">
<fo:block>
<xsl:value-of select="$counter"/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block>&#160;</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:template>


I also have one which does not place a BREAK:

<xsl:template name="EMPTYCHECKNOBREAK">
<!-- replaces empty element(s) with non-breaking space character - &#160; -->
<xsl:param name="counter"/>
<xsl:choose>
<xsl:when test="$counter !=''">
<xsl:value-of select="$counter"/>
</xsl:when>
<xsl:otherwise>&#160;</xsl:otherwise>
</xsl:choose>
</xsl:template>


Have you tried putting the content in the block (not block-container) and set the background-color of that block? Something like this:

  fo table-column/
  fo table-body
    fo table-row
      fo table-cell
        fo block background-color:pink
          <xsl:call-template name="EMPTYCHECK">
            <xsl:with-param name="counter" select="NODE/TO/SELECT"/>
          </xsl:call-template>
        /fo block background-color=pink
      /fo table-cell
    /fo table-row
  /fo table-body

I don't know how this'll handle the counting, but you might find a portion of this useful.

Cheers,

Web Maestro Clay

At 08:42 AM 1/6/2003, you wrote:
I have a table of fixed height which can contain a varying number of
lines of data. I've set the background colour of some columns in order
to highlight them. I need a way to make sure the highlighting of the
columns continues all the way to the bottom of the table.

Unless there is a line of data the background colour doesn't appear.
I've currently written a template which counts the number of lines and
then prints the correct number of blank lines out. This works to a
point but fails as soon as the descriptions in the lines get too long,
they then wrap over onto the next line, then when I print the blank
lines out there are too many and the table expands.

I've also tried to do the background colour in a seperate static-
content via <fo:block-container> but it places the block of colour
above the text not behind it! (z-index is not implemented yet!)

So I need a way to stop the <fo:table height="120mm"> from expanding, or
print one extra blank line out at the end of the table which expands to
fill the whole of the rest of the table and so show the background
colour, or set a background block of colour which is behind the text or
another solution?

Any ideas?

Thanks,
Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

- Clay Leeds
- Web Developer
- [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to