2,037
edits
Changes
m
→Record definitions via XML
= Record definitions via XML =
Different records can be stored in different XML files. First the user downloaded versions are scanned ~/.gramps/grampsxx/plugins/records. Next the definitions installed are scanned, skipping duplicates present also in plugins dir.
== Current Census XML ==
Currently, version 4.0, census plugin has following xml.
<?xml version="1.0" encoding="UTF-8"?>
<censuses>
<census id='UK1841' title='1841 England and Wales Census' date='6 Jun 1841'>
<heading>
<_attribute>City or Borough</_attribute>
</heading>
<heading>
<_attribute>Parish or Township</_attribute>
</heading>
<column>
<_attribute>Name</_attribute>
<size>25</size>
</column>
<column>
<_attribute>Age</_attribute>
<size>5</size>
</column>
<column>
<_attribute>Occupation</_attribute>
<size>25</size>
</column>
<column>
<_attribute>Where Born</_attribute>
<size>5</size>
</column>
</census>
</censuses>
When records are general, the census is just one of the records. Some other problems with this design is
# very census orientated with the use of column as names.
# why is date part of the census line? Don't understand what that date actually is.
# English content like 'Where Born' is also the attribute key. As a consequence, non English users who make a record definition will try to use English will will be wrong, or worse, they will use a translated string so it would show up in Gramps. If the user definition is accepted into Gramps, we will need to change to proper English, and the record already present for the creator of the definition is no longer valid.
# only text input for attribute. We can allow more versatility with a range, a bool, and a list of values.
== Proposed Record XML ==
<?xml version="1.0" encoding="UTF-8"?>
<records>
<record type='Census' layout='UK1841' title='1841 England and Wales Census' datefixed='1' date='6 Jun 1841' fieldorder='columns'>
<heading nameid='city_borough' _description='City or borough where this Census Page was taken' object='Place'/>
<heading nameid='parish_township' _description='Parish or Township where this Census Page was taken' object='Place' />
<field nameid='Name' size='25' object='Person' relation='center' _description='Name of a person on Census row/>
<field nameid='Age' size='5'/>
<field nameid='Occupation' size='25'/>
<field nameid='Where Born' size='5' />
</record>
<record type='Baptize Church' layout='Generic Catholic' title='Baptize Record Catholic Church' datefixed='0' fieldorder='editor'>
<heading nameid='parish' _description='Parish where this Baptize was done' object='Place'/>
<heading nameid='churchbooktitle' _description='Title of Church Book' object='Source' />
<heading nameid='page_index' _description='Parish or Township where this Census Page was taken' />
<field nameid='Date' size='10' object='DateField/>
<field nameid='Name' size='25' object='Person' _description='Name of person born' relation='center'/>
<field nameid='Father' size='25' object='Person' relation='father'/>
<field nameid='Mother' size='25' relation='mother'/>
<field nameid='First Witness' size='25' relation='witness'/>
<field nameid='Second Witness' size='25' relation='witness/>
<field nameid='Celebrant' size='25' relation='celebrant'/>
</record>
</records>
<english>
<key id="city_borough" _en="City or Borough">
<key id="parish_township" _en="Parish or Township">
<key id="name" _en="Name">
....
</english>
= Record input GUI =