RE: Nested tables

"Stephen F. Booth" <[email protected]>
Newsgroups gmane.comp.gcc.cgicc.general
Message-ID <000601c1d092$f6c9fdc0$39c4bd3f@hades>
> 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.



_______________________________________________
help-cgicc mailing list
[email protected]
http://mail.gnu.org/mailman/listinfo/help-cgicc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.