On Tue, 11 Dec 2007, Thomas Dalton wrote:
I am trying to
represent table-like data in a structured way by using the
templates. The table-like data should both be rendered in Wikipedia (or
another wikimedia) as well as setup and extracted easily by a script. I am
wondering how this situation is handled the best. I have setup some
examples on the following web-page:
How do you want it rendered? If just as a table, then why not just use
a table? You can have the column headers as a template. Just have:
{{Talairach start}}
| -38 || 2 || 37
|-
| 48 || -40 || 9 || anatomy_2=Right temporoparietal junction
|-
| 51 || 15 || 34 || functional_area_3=[[Supplementary motor area]]
|}
There are two issues:
1) A script should be able to easily extract information from the table. I
have worked with the "Cite journal" template of Wikipedia (that is not
storing a table). It is relatively easy to extract information from this
template by simple regular expressions in Perl. If the information is
stored "just in a table" I guess it would be more difficult due to table
formatting encoding? A template may be better to separate format and
content.
2) An instance of the table may have fields that are not defined. In my
DTD XML-file defining the table I have presently 33 fields:
<!ELEMENT Loc (activatedSubjects | brainMapExpId | brainMapLocId |
brainMapPaperId | brodmann | comment | coord |
...
valueStd | volume | volumeStd | woroi | x | xReported | xStdReported |
y | yReported | yStdReported | z | zReported | zStdReported |
zScore)*>
A field such as 'brodmann' may or may not be defined for an instance of
the table. Seldom are more than 5-10 fields/columns defined. The table
would be too broad and too empty if all columns/fields are shown.
/Finn Aarup Nielsen