On Sat, Aug 03, 2002 at 10:32:05AM -0400, The Cunctator wrote:
A wiki markup that's simple but able to handle
reasonably fancy tables by
employing stylesheets.
The complicated Sainfoin table (
http://www.wikipedia.com/wiki/Sainfoin)
would be written as:
[[table:plant
[{ Sainfoin }]
[| [image: OnobrychisViciifolia-thumb.jpg] |]
[{ [[Scientific classification]] }]
[| [[table:classification
[| [[Kingdom (biology)|Kingdom]]: | [[Plantae]] |]
[| [[Division (biology)|Division]]: | [[Magnoliophyta]] |]
[| [[Class (biology)|Class]]: | [[Magnoliopsida]] |]
[| [[Order (biology)|Order]]: | [[Fabales]] |]
[| [[Family (biology)|Family]]: | [[Fabaceae]] |]
[| [[Genus]]: |
'''''Onobrychis''''' |]
[| '''[[Species]]:''' |
'''''vicifolia''''' |]
]]
|]
[{ [[Binomial nomenclature|Binomial name]] }]
[| ''Onobrychis vicifolia'' |]
]]
Looks very understandable to me. Just a few minor remarks:
- The style markup [[table:plant]] is very similar to something with a
completely different meaning. Perhaps we should take Lee's suggestion here
and use {{table:plant}} or even {table:plant} although I prefer to use
double brackets for markup because single brackets are probably
already in normal use somewhere.
- Be careful with the indented lines because these now have the meaning of
<pre>...</pre> in the current markup.
- I don't if in CSS you can redefine a normal table rule as a header rule or
a caption rule, but if you can the the [{ }] notation is superflous, and
if you cannot then we probably need some extra notation for caption.
- The CSS for table:plant can probably already determine the formatting of
the nested table, so table:classifiction is probablu superfluous.
In theory, we could write
[[table:plant]]
[{ Sainfoin }]
[| ''Onobrychis vicifolia'' |]
instead, by using a blank-line rule to determine when tables end. That
looks nicer and probably would be simpler to parse. But would be a bit
less flexible. Do we need that flexibility? Not necessarily.
Actually, there's no problem here if you refine this rule such that a table
ends if a |] is not immediately followed by [| on this line or the next
line. In that case you don't lose any flexibility at all. However, you would
also have to adapt Lee's rule for defining a <DIV> section a little to allow
empty rules in tables.
-- Jan Hidders