RE: Table cell problem

Hi, Ken

Well, I added some more code to your fragment (the result you can see in "table_test.fo" and "table_test.pdf"). As it seems to me, the reason of problem is that you set the border for fo:block, but not for a cell.
I changed the XSL FO code for fo:table, added fo:table-column elements to specify fixed layout and set the border and padding for each cell. See results attached

Here is some exclusion from my XSL FO code.
<fo:table table-layout="fixed" width="100%"
    wrap-option="wrap" border="3pt double black">
    <fo:table-column column-number="1" column-width="20%"/>
    <fo:table-column column-number="2" column-width="10%"/>
....
    <fo:table-body>
        <!-- 1st row -->
        <fo:table-row>
            <fo:table-cell border="0.5pt solid black" padding="1pt">
                <fo:block font-weight="bold" color="blue">
                    Option Name 1 </fo:block>
            </fo:table-cell>
....
        </fo:table-row>
    </fo:table-body>
</fo:table>

For more information about tables see http://www.renderx.com/tutorial.html

Respectfully,
Volodymyr Rodymyuk
P.S.

It would be better for understanding of the problem if you include the whole problematic XSL FO element next time into your letter. Maybe skipping just unnecessary, not-significant or repeating sub-elements. Now it's unclear what does cause your problem, because no one knows what attributes you put into fo:table element. Also I think it's better to include pure XSL FO to get a solution for your problem than the part of your XSL stylesheet (you can easily hide private information replacing it with neutral text).

> -----Original Message-----
> From: www-xsl-fo-request@w3.org [mailto:www-xsl-fo-request@w3.org] On
> Behalf Of Ken
> Sent: Wednesday, July 18, 2007 5:05 PM
> To: www-xsl-fo@w3.org
> Subject: Table cell problem
>
>
> Forgive a probable newbie mistake. My code looks like this:
>
>     <fo:table-row space-after=".5in" wrap-option="wrap">
>       <fo:table-cell>
>           <fo:block font-weight="bold">Option Name</fo:block>
>        </fo:table-cell>
>       <fo:table-cell>
>          <fo:block font-weight="bold">Word</fo:block>
>        </fo:table-cell>
>         <fo:table-cell>
>         <fo:block font-weight="bold">Bit</fo:block>
>          </fo:table-cell>
>         <fo:table-cell>
>       <fo:block font-weight="bold">Selected Value</fo:block>
>       </fo:table-cell>
>      <fo:table-cell>
>            <fo:block font-weight="bold">Description</fo:block>
>     </fo:table-cell>
>      </fo:table-row>
>     </fo:table-header>
>   <fo:table-body>
>    <fo:table-row>
>       <fo:table-cell>
>             <fo:block font-weight="bold" color="blue" border="solid line
> blue">
>              <xsl:apply-templates select="row/option-name"/>
>               </fo:block>
>        </fo:table-cell>
>        <fo:table-cell>
>                 <fo:block font-weight="bold" color="brown">
>                              <xsl:apply-templates select="row/word"/>
>                  </fo:block>
>         </fo:table-cell>
>   [snip]
>
>   Each of the templates contains nothing but <xsl:value-of select="."/>
>
>   My output looks like this:
>
>   OptionName                Word         Bit            SelectedValue
> Description
>   Option Name 1                   1          1            xxx
> xxxx
>   Option Name 2                   1          1            xxx
> xxxx
>
>   etc.  The problem is that each column appears to be a single cell;  IOW,
> each row isn't (apparently) composed of 5 cells. I discovered the  problem
> when the final cell contained a long string and it didn't push  the
> subsequent rows down when it wrapped. It's as though text is being
> appended to the single cell that comprises each column (I tried putting  a
> border around each cell and got one border around each column.)
>
>   What do I need to do differently so that each row is comprised of 5
> cells?
>
>   Thanks,
>
>   Ken
>
>
>
> ---------------------------------
> Get the Yahoo! toolbar and be alerted to new email wherever you're
> surfing.
> --0-1673119234-1184767505=:91754
> Content-Type: text/html; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
>
> Forgive a probable newbie mistake. My code looks like this:<br>  <br>
> &nbsp; &lt;fo:table-row space-after=".5in" wrap-option="wrap"&gt;<br>
> &nbsp;&nbsp;&nbsp; &lt;fo:table-cell&gt;<br>  &nbsp;&nbsp;&nbsp;
> &nbsp;&nbsp;&nbsp; &lt;fo:block font-weight="bold"&gt;Option
> Name&lt;/fo:block&gt;<br>  &nbsp;&nbsp;&nbsp;&nbsp; &lt;/fo:table-
> cell&gt;<br>  &nbsp;&nbsp;&nbsp; &lt;fo:table-cell&gt;<br>  &nbsp;&nbsp;
> &nbsp;&nbsp;&nbsp; &lt;fo:block font-
> weight="bold"&gt;Word&lt;/fo:block&gt;<br>  &nbsp;&nbsp;&nbsp;&nbsp;
> &lt;/fo:table-cell&gt;<br>  &nbsp; &nbsp;&nbsp;&nbsp; &lt;fo:table-
> cell&gt;<br>  &nbsp; &nbsp;&nbsp;&nbsp; &lt;fo:block font-
> weight="bold"&gt;Bit&lt;/fo:block&gt;<br>  &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> &lt;/fo:table-cell&gt;<br>  &nbsp; &nbsp;&nbsp;&nbsp; &lt;fo:table-
> cell&gt;<br>  &nbsp;&nbsp;&nbsp; &lt;fo:block font-
> weight="bold"&gt;Selected Value&lt;/fo:block&gt;<br>  &nbsp;&nbsp;&nbsp;
> &lt;/fo:table-cell&gt;<br>  &nbsp;&nbsp; &lt;fo:table-cell&gt;<br>
>  &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;fo:block font-
> weight="bold"&gt;Description&lt;/fo:block&gt;<br>  &nbsp; &lt;/fo:table-
> cell&gt;<br>  &nbsp;&nbsp; &lt;/fo:table-row&gt;<br>  &nbsp;
> &lt;/fo:table-header&gt;<br>  &lt;fo:table-body&gt;<br>
> &nbsp;&lt;fo:table-row&gt;<br>  &nbsp;&nbsp;&nbsp; &lt;fo:table-
> cell&gt;<br>  &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;fo:block
> font-weight="bold" color="blue" border="solid line blue"&gt;<br>
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsl:apply-templates
> select="row/option-name"/&gt;<br>  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> &nbsp;&nbsp;&nbsp; &lt;/fo:block&gt;<br>  &nbsp;&nbsp;&nbsp;&nbsp;
> &lt;/fo:table-cell&gt;<br>  &nbsp;&nbsp;&nbsp;&nbsp; &lt;fo:table-
> cell&gt;<br>  &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> &nbsp;&nbsp;&nbsp; &lt;fo:block font-weight="bold" color="brown"&gt;<br>
> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
>  &nbsp;&nbsp;&nbsp;  &lt;xsl:apply-templates select="row/word"/&gt;<br>
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> &lt;/fo:block&gt;<br>  &nbsp; &nbsp;&nbsp;&nbsp; &lt;/fo:table-
> cell&gt;<br>  [snip]<br>  <br>  Each of the templates contains nothing but
> &lt;xsl:value-of select="."/&gt;<br>  <br>  My output looks like this:<br>
> <br>
> OptionName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
> p;&nbsp;&nbsp;&nbsp;  Word&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> Bit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> SelectedValue Description<br>  Option Name 1&nbsp;&nbsp; &nbsp;&nbsp;
> &nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp; &nbsp;&nbsp; 1 &nbsp; &nbsp;
> &nbsp; &nbsp;&nbsp; 1 &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; xxx &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; xxxx &nbsp; &nbsp;&nbsp;
> <br>  Option Name 2 &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
> &nbsp;&nbsp; &nbsp;&nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 1
>  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; xxx &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp;  &nbsp; &nbsp; &nbsp; xxxx &nbsp;&nbsp; <br>  <br>  etc.&nbsp; The
> problem is that each column appears to be a single cell;  IOW, each row
> isn't (apparently) composed of 5 cells. I discovered the  problem when the
> final cell contained a long string and it didn't push  the subsequent rows
> down when it wrapped. It's as though text is being  appended to the single
> cell that comprises each column (I tried putting  a border around each
> cell and got one border around each column.)<br>  <br>  What do I need to
> do differently so that each row is comprised of 5 cells?<br>  <br>
> Thanks,<br>  <br>  Ken<br>  <br>  <p>&#32;
>       <hr size=1>Get the Yahoo! toolbar and <a
> href="http://us.rd.yahoo.com/evt=48225/*http://new.toolbar.yahoo.com/toolb
> ar/features/mail/index.php">be alerted to new email </a>wherever you're
> surfing.
> --0-1673119234-1184767505=:91754--
>

Received on Thursday, 19 July 2007 09:47:35 UTC