Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Wed 26 Sep 2007, 12:37 PM
While a lot of companies use our Midas Rich Text LSX and Midas Rich Text C++ API to render HTML because it does such a good job reproducing the look and feel of the Notes client, that is by no means whatever everybody wants.  I thought it might be worth mentioning that in Midas 3.70 (and in the upcoming 4.0), it is possible to let CSS guide the style much more effectively.  As an example, you can say that you want your tables rendered "sparsely", so that the following table

Original table

which might normally render (using Midas) as

<table border='1'>
  <tr valign='top'>
    <td width='96' bgcolor="#00ff00"><b>City</b></td>
    <td width='192' bgcolor="#00ff00" valign='top'><b>City</b></td>
  </tr>
  <tr valign='top'>
    <td width='96' bgcolor="#00ffff">80,000</td>
    <td width='192' bgcolor="#00ffff">Barcelona</td>
  </tr>
  <tr valign='top'>
    <td width='96' bgcolor="#00ffff">16,050</td>
    <td width='192' bgcolor="#00ffff">Madrid</td>
  </tr>
</table>

instead would render as

<table>
  <tr>
    <td><b>Sightings</b></td>
    <td><b>City</b></td>
  </tr>
  <tr>
    <td>80,000</td>
    <td>Barcelona</td>
  </tr>
  <tr>
    <td>16,050</td>
    <td>Madrid</td>
  </tr>
</table>

thus allowing you to use CSS to set the look and feel.  And if you need a bit more control, you could also AutoTag the table and rows (and cells, but that isn't needed here), and get

<table id='tbl1'>
  <tr id='tbl1_r1'>
    <td><b>Sightings</b></td>
    <td><b>City</b></td>
  </tr>
  <tr id='tbl1_r2'>
    <td>80,000</td>
    <td>Barcelona</td>
  </tr>
  <tr id='tbl1_r3'>
    <td>16,050</td>
    <td>Madrid</td>
  </tr>
</table>

which would then allow you to set the color of the first row differently.  In Midas 4.0 you can go one step further and instead AutoClass the rows (and columns and cells, but not here) so that you would get

<table id='tbl1'>
  <tr class='tblr1'>
    <td><b>Sightings</b></td>
    <td><b>City</b></td>
  </tr>
  <tr class='tblr2'>
    <td>80,000</td>
    <td>Barcelona</td>
  </tr>
  <tr class='tblr3'>
    <td>16,050</td>
    <td>Madrid</td>
  </tr>
</table>

so that you could set all first rows one style and all second rows another and so on.

It is all up to you, as it should be.

Copyright © 2007 Genii Software Ltd.