Midas: Letting CSS handle the formatting
Wed 26 Sep 2007, 12:37 PMTweet
by Ben Langhinrichs
Copyright © 2007 Genii Software Ltd.
What has been said:
629.1. W^L+ (09/26/2007 12:12 PM)
Ben, why do you use b tags instead of th tags there? With a th tag, the CSS can be used to impart the bold or to underline or center or whatever, while retaining the meaning of "header".
629.2. Ben Langhinrichs (09/26/2007 01:24 PM)
A valid question. It wasn't a great example, perhaps, because this is too evidently a header. If I had actually set the table to have a header row, the TH tags would have been created by Midas, but then I wouldn't have had a need to use this auto tagging or auto classing feature. So, Midas can certainly do what you suggest, but this is a different scenario. Perhaps I should make it the second row to avoid that sort of question.
By the way, it is also possible to AutoClass alternating rows or columns to allow those to be styled differently.
Thanks for the question.
629.3. Stan Rogers (09/27/2007 09:27 AM)
One can never infer TH from bold text. Let's take the typical competitive feature comparison chart, where "our stuff" is obviously going to be bold, while the competitor's lesser offerings will be, well, rather less than bold. The actual header cells on such a table are usually in a smaller font than the table data entries as well, so font size isn't a reliable indicator either. The only reliable means of programmatically determining where the headings are is by seeing which cells the table's creator set as heading cells -- at least until culturally aware AI (that can keep up with the current cool, but knows a classic when it sees it) can be written into a compact LSX.
629.4. Ben Langhinrichs (09/27/2007 10:16 AM)
Your point is well made. In this case, Notes does allow the possibility to designate a cell as a row or column header, and that is what we use to determine the TH, not the bold or anything else. In Notes releases before 7.0, where there was no native mechanism to designate this, we had an alternative scheme where you could specify a set of color/face/size/attributes as you chose, and Midas would intuit headerness from those, but only if you chose to do so.
A lot of this was put into place so that CoexEdit, which uses the same Midas engine underneath, could be part of an accessible solution for governments, schools and corporations who have the need for such accessibility.
Again, in this particular case, I just should not have made the table even look like it had a header, as that managed to confuse the issue and distract from the original point. Sigh! Such is the nature of examples.