From f15658fe5fa9165a1e86d4f433092eb299550ff8 Mon Sep 17 00:00:00 2001 From: Luther Tychonievich Date: Wed, 24 Jul 2024 13:03:43 -0500 Subject: [PATCH 01/10] Conversation draft of adding place records to 7.1 This puts PLAC and SPLAC side-by-side, like NOTE and SNOTE. That is not the only possibility, and alternative PRs with other designs are anticipated to allow better comparison of the options. This only addresses the record-vs-substucture topic. The additional substuctures that have also been considered for PLAC/_LOC/etc are prepared for by creating a `<>` production to be the home for such additions in a future PR. --- .../gedcom-3-structures-1-organization.md | 166 ++++++++++++++++-- .../gedcom-3-structures-3-meaning.md | 43 +++++ 2 files changed, 190 insertions(+), 19 deletions(-) diff --git a/specification/gedcom-3-structures-1-organization.md b/specification/gedcom-3-structures-1-organization.md index a153daa..65953ee 100644 --- a/specification/gedcom-3-structures-1-organization.md +++ b/specification/gedcom-3-structures-1-organization.md @@ -396,6 +396,90 @@ However, as of 2021 relatively few applications have a user interface that prese A `SHARED_NOTE_RECORD` may contain a pointer to a `SOURCE_RECORD` and vice versa. Applications must not create datasets where these mutual pointers form a cycle. Applications should also ensure they can handle invalid files with such cycles in a safe manner. +#### `SHARED_PLACE_RECORD` := + +```gedstruct +n @XREF:SPLAC@ SPLAC {1:1} g71:record-SPLAC + +1 TYPE {0:1} g71:SPLAC-TYPE + +1 LANG {0:1} g7:LANG + +1 TRAN {0:M} g71:TRAN + +2 LANG {0:1} g7:LANG + <> {1:1} + <> {0:M} g71:SPLAC +``` + +A descriptor of a single place, location, or jurisdiction. + +The `<>` inside a `SHARED_PLACE_RECORD` points to larger jurisdictions that this place is a part of. +If a city is part of a county which is part of a state, the city's place record should point to the county's place record, not the states. +Multiple `<>`s are permitted to support places within multiple hierarchies (for example, a church that's both within an ecclesiastical region and a political region). + +Shared place records offer more flexibility than place structures do. +A `PLAC` can be replaced by an `SPLAC` without loss of information by making one `SPLAC` record for each non-empty string in the `PLAC`'s payload and linking them together using the `SPLAC`'s `SHARED_PLACE_STRUCTURE`s. +Information is copied into the new chain of `SPLAC` records as follows: + +- The `PLAC` structure is replaced by an `SPLAC` structure that points to the first `SPLAC` record in the chain +- Any `NOTE` substructures of `PLAC` are retained as substructures of the new `SPLAC` structure +- Empty list entries are skipped. +- The `PLAC` payload parts become `SPLAC` payloads +- The `FORM` payload parts (which may be copied from the `HEAD`.`PLAC`.`FORM` if that is present but `PLAC`.`FORM` is not) become `SPLAC`.`TYPE` payloads +- The `TRAN` payload parts become `TRAN` payloads +- `LANG` and `TRAN`.`LANG` are copied to each record in the linked list +- All other substructures (`MAP`, `EXID`, `NOTE`) are copied only to the first record in the list. + +:::example + +The 7.0 structure + +```gedcom +2 PLAC one, two, , three +3 FORM city, county, state, country +3 LANG en +3 TRAN uno, dos, , tres +4 LANG es +3 MAP +4 LATI N12.3 +4 LONG W45.6 +3 NOTE this is an example +``` + +can be converted without loss of information into the new structure + +```gedcom +2 SPLAC @SP1@ +3 NOTE this is an example +``` + +and new records + +``` +0 @SP1@ SPLAC one +1 TYPE city +1 LANG en +1 TRAN uno +2 LANG es +3 MAP +4 LATI N12.3 +4 LONG W45.6 +1 SPLAC @SP2@ +0 @SP2@ SPLAC two +1 TYPE county +1 LANG en +1 TRAN dos +2 LANG es +1 SPLAC @SP3@ +0 @SP3@ SPLAC three +1 TYPE country +1 LANG en +1 TRAN tres +2 LANG es +``` + +::: + +Conversion in the other direction is also possible (from `SPLAC` to `PLAC`) but will in general discard information about individual places in the `SPLAC` chain. + + #### `SOURCE_RECORD` := ```gedstruct @@ -404,7 +488,7 @@ n @XREF:SOUR@ SOUR {1:1} g7:record-SOUR +2 EVEN {0:M} g7:DATA-EVEN +3 DATE {0:1} g7:DATA-EVEN-DATE +4 PHRASE {0:1} g7:PHRASE - +3 <> {0:1} + +3 <> {0:1} +2 AGNC {0:1} g7:AGNC +2 <> {0:M} +1 AUTH {0:1} g7:AUTH @@ -567,7 +651,7 @@ Time phrases are expected to be added in version 7.1. ```gedstruct n <> {0:1} -n <> {0:1} +n <> {0:1} n <> {0:1} n PHON {0:M} g7:PHON n EMAIL {0:M} g7:EMAIL @@ -957,7 +1041,7 @@ Ordinances performed by members of The Church of Jesus Christ of Latter-day Sain ```gedstruct n <> {0:1} n TEMP {0:1} g7:TEMP -n <> {0:1} +n <> {0:1} n STAT {0:1} g7:ord-STAT +1 DATE {1:1} g7:DATE-exact +2 TIME