help-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Nested tables


From: Stephen F. Booth
Subject: RE: Nested tables
Date: Wed, 20 Mar 2002 23:43:29 -0500

> currently cgicc does not support nested tables due to the table
> element with friends being defined as Boolean Elements. You can not
> generate something like:
> 
>  <table border="1">
>  <tr>
>  <td>
>    <table border="1">
>    <tr>
>    <td>
>      Inner table.
>    </td>
>    </tr>
>    </table>
>  </td>
>  <td>
>    Outer table.
>  </td>
>  </tr>
>  </table>
> 
> Is this issue being adressed in some way?

This is something that has been brought up several times in recent
weeks.  I've thought long and hard for a way to allow this, but I have
been unable to come up with a solution that I think is elegant and also
consistent and compatible with the current design.  One proposed
alternative is to use C++ scoping (stack levels) to control nesting.
Basically, an element would render itself in the destructor.  This
approach was suggested by David McCombs, and is good, except that it is
almost fully incompatible with the current scheme.   The code might look
like

/* create a table */
{
  table(cout); 
  {
    tr(cout); 
    {
      /* inner table */
      table(cout);
      tr(cout).add(td("inner table"));
    }
  }
  {
    tr(cout);
    td(cout).add(td("outer table"));
  }
} /* end table */

I personally think this is a little confusing- it took me a while to
figure out the example above!  And I haven't fully thought it through
yet.  But it is an alternative.

As always, I'm open to suggestions.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]