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:
http://en.wikipedia.org/wiki/User:Fnielsen/Sandbox#Template_.22list.22_argu…
http://en.wikipedia.org/w/index.php?title=User:Fnielsen/Sandbox&oldid=1…
I think the cleanest way would be if something like the following was
allowed (I guess it is not?):
{{Talairach coordinates | x(1)=-38 | y(1)=2 | z(1)=37 | x(2)= 48 |
y(2)=-40 | z(2)=9 | anatomy(2)=Right temporoparietal junction | x(3)=51 |
y(3)=15 | z(3)=34 | functional_area(3)=[[Supplementary motor area]] }}
In this case the template would be able to find out which fields
("columns") are defined. Whereas in the case where two templates are used
the child template (i.e. the entry for a specific row) can only identify
its own defined columns. For example this situation:
{{Talairach coordinates | {{Talairach
coordinate | x=-38 | y=2 | z=37}} {{Talairach coordinate | x= 48 | y=-40 |
z=9 | anatomy=Right temporoparietal junction }} {{Talairach coordinate |
x=51 | y=15 | z=34 | functional_area=[[Supplementary motor area]] }} }}
Also in this case the two templates are dependent: If the information is
rendered in a table the column header (defined in the parent template) and
content (defined in the child template) should correspond.
I have been trying to find Wikipedia template examples for table-like
data. The closest I could get is the "GNF_Protein_box" template and its
"Process" field that may have multiple "GNF_GO" templates. Are there
any
different examples? Or what would actually possible in my situation? A
third possibility would be:
{{Talairach coordinates | x_1 =-38 | y_1=2 | z_1=37 | x_2= 48 |
y_2=-40 | z_2=9 | anatomy_2=Right temporoparietal junction | x_3=51 |
y_3=15 | z_3=34 | functional_area_3=[[Supplementary motor area]] }}
But this format looks quite ugly, and it seems to me that it would be
difficult to write a template in this case, though a perl script for
off-line processing may handle this situation ok.
/Finn Aarup Nielsen