diff --git a/.github/workflows/generate-files.yml b/.github/workflows/generate-files.yml index 5d9df58..8dbda47 100644 --- a/.github/workflows/generate-files.yml +++ b/.github/workflows/generate-files.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Check out GEDCOM - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Get the branch name id: extract_branch diff --git a/.github/workflows/propagate-main-to-v7.1.yml b/.github/workflows/propagate-main-to-v7.1.yml index b8511b0..b17d02b 100644 --- a/.github/workflows/propagate-main-to-v7.1.yml +++ b/.github/workflows/propagate-main-to-v7.1.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Check out GEDCOM - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Set git config env: diff --git a/.github/workflows/validate-yaml.yml b/.github/workflows/validate-yaml.yml index 575f227..70e2fb9 100644 --- a/.github/workflows/validate-yaml.yml +++ b/.github/workflows/validate-yaml.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout GEDCOM - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Validate YAML run: yamllint . diff --git a/build/hyperlink-code.py b/build/hyperlink-code.py index e9fca01..d8baaf7 100644 --- a/build/hyperlink-code.py +++ b/build/hyperlink-code.py @@ -44,7 +44,6 @@ def anchorify(m): return full doc = re.sub(r'(g7:[^<]*)\1(g7.1:[^<]*)\1]*ged(?:struct|com)[^>]*>.*?)', doc, flags=re.DOTALL) diff --git a/build/hyperlink.py b/build/hyperlink.py index 1fe7a24..4dd9abf 100644 --- a/build/hyperlink.py +++ b/build/hyperlink.py @@ -20,10 +20,6 @@ def slugify(bit): si = bit.rfind('`g7:')+4 ei = bit.find('`', si) slug = bit[si:ei].replace('#','-') - elif '`g7.1:' in bit: - si = bit.rfind('`g7.1:')+6 - ei = bit.find('`', si) - slug = bit[si:ei].replace('#','-') elif '`' in bit: bit = re.search('`[A-Z0-9_`.]+`', bit) slug = bit.group(0).replace('`','').replace('.','-') @@ -91,7 +87,7 @@ def abnf(m): slug = table_tags[m.group(1)] return linkify(m.group(0), slug) return m.group(0) - uried = re.sub(r'(?]+)', txt): - assert prefix_of.get(slug,pfx) == pfx, f"Multiple prefixes for {slug}: {prefix_of[slug]} and {pfx}" - prefix_of[slug] = pfx - def addpfx(tag): - if tag in prefix_of: return prefix_of[tag]+':'+tag - if '-' in tag: - lead = tag[:tag.find('-')+1] - if lead in prefix_of: return prefix_of[lead]+':'+tag - assert False, 'no prefix for '+tag+' in '+str(prefix_of) dtypes = find_data_types(txt, g7) rules = parse_rules(txt) ssp = parse_gedstruct(txt, rules, dtypes) @@ -398,7 +372,7 @@ def addpfx(tag): enums, calendars = find_cat_tables(txt, g7, tagsets) find_enum_by_link(txt, enums, tagsets) for k in enums: - g7[k[k.find(':')+1:]] = ('enumeration set',[]) + g7[k[3:]] = ('enumeration set',[]) enumsets = find_enumsets(txt) find_calendars(txt, g7) dtypes_inv = {expand_prefix(v,prefixes):k for k,v in dtypes.items()} @@ -411,19 +385,17 @@ def addpfx(tag): for tag in g7: print('outputting', tag, '...', end=' ') - prerelease = False maybe = join(dirname(specs[0]),'terms',tag) if exists(maybe): copyfile(maybe, join(dest,tag)) print('by copying', maybe, '...', end=' ') continue - thispath = join(dest,tag.replace('#','-')) - with open(thispath, 'w') as fh: + with open(join(dest,tag.replace('#','-')), 'w') as fh: fh.write('%YAML 1.2\n---\n') print('lang: en-US', file=fh) print('\ntype:',g7[tag][0], file=fh) - uri = expand_prefix(addpfx(tag),prefixes) + uri = expand_prefix('g7:'+tag,prefixes) print('\nuri:', uri, file=fh) if g7[tag][0] in ('structure', 'enumeration', 'calendar', 'month'): @@ -452,7 +424,7 @@ def addpfx(tag): print('\npayload:', payload, file=fh) payload_lookup.append([uri, payload if payload != 'null' else '']) if d['pay'] and 'Enum' in d['pay']: - setname = expand_prefix(enumsets[addpfx(tag)],prefixes) + setname = expand_prefix(enumsets['g7:'+tag],prefixes) print('\nenumeration set: "'+setname+'"', file=fh) enum_lookup.append([uri,setname]) # print('\nenumeration values:', file=fh) @@ -478,7 +450,7 @@ def addpfx(tag): struct_lookup.append(['',ptag,uri]) elif g7[tag][0] == 'calendar': print('\nmonths:', file=fh) - for k in calendars[addpfx(tag)]: + for k in calendars['g7:'+tag]: print(' - "'+expand_prefix(k, prefixes)+'"', file=fh) if len(g7[tag][2]) == 0: print('\nepochs: []', file=fh) @@ -488,11 +460,11 @@ def addpfx(tag): print(' -', epoch, file=fh) elif g7[tag][0] == 'month': print('\ncalendars:', file=fh) - for k in calendars[addpfx(tag)]: + for k in calendars['g7:'+tag]: print(' - "'+expand_prefix(k, prefixes)+'"', file=fh) elif g7[tag][0] == 'enumeration set': print('\nenumeration values:', file=fh) - for k in enums[addpfx(tag)]: + for k in enums['g7:'+tag]: valname = expand_prefix(k, prefixes) print(' - "'+valname+'"', file=fh) enumset_lookup.append([uri, valname]) @@ -501,20 +473,11 @@ def addpfx(tag): # handle use in enumerations (which can include any tag type) is_used_by = False for tag2 in sorted(enums): - if (addpfx(tag)) in enums[tag2]: + if ('g7:'+tag) in enums[tag2]: if not is_used_by: print('\nvalue of:', file=fh) is_used_by = True print(' - "'+expand_prefix(tag2,prefixes)+'"', file=fh) - - if prerelease: - print('\nprerelease: true', file=fh) - - # manually check for v7.1 subsuming v7.0 - if '/v7.1/' in uri: - res = run(['git','show','main:'+thispath], capture_output=True) - if not res.returncode: - print('\nsubsumes:', uri.replace('/v7.1/','/v7/'), file=fh) print('\ncontact: "https://gedcom.io/community/"', file=fh) fh.write('...\n') @@ -542,4 +505,3 @@ def addpfx(tag): for row in data: print('\t'.join(row), file=f) print('done') - diff --git a/specification/gedcom-0-introduction.md b/specification/gedcom-0-introduction.md index 161c21c..cdff9f7 100644 --- a/specification/gedcom-0-introduction.md +++ b/specification/gedcom-0-introduction.md @@ -147,7 +147,6 @@ is shorthand for a URI beginning with the corresponding URI prefix | Short Prefix | URI Prefix | |:-------------|:------------------------------------| | `g7` | `https://gedcom.io/terms/v7/` | -| `g7.1` | `https://gedcom.io/terms/v7.1/` | | `xsd` | `http://www.w3.org/2001/XMLSchema#` | | `dcat` | `http://www.w3.org/ns/dcat#` | diff --git a/specification/gedcom-1-hierarchical-container-format.md b/specification/gedcom-1-hierarchical-container-format.md index 9563f99..fed052a 100644 --- a/specification/gedcom-1-hierarchical-container-format.md +++ b/specification/gedcom-1-hierarchical-container-format.md @@ -319,7 +319,7 @@ Extensions cannot change existing meanings, cardinalities, or calendars. A **tagged extension structure** is a structure whose tag matches production `extTag`. Tagged extension structures may appear as records or substructures of any other structure. Their meaning is defined by their tag, as is discussed more fully in the section [Extension Tags]. Any substructure of a tagged extension structure that uses a tag matching `stdTag` is an **extension-defined substructure**. -Substructures of an extension-defined substructure that uses a tag matching `stdTag` are also extension-defined substructures, but this specification deprecates using a `stdTag` with a definition that does not match any standard type with that tag. +Substructures of an extension-defined substructure that uses a tag matching `stdTag` are also extension-defined substructures. The meaning and use of each extension-defined substructure is defined by the tagged extension structure it occurs within, not by its tag alone nor by this specification. :::example @@ -343,7 +343,9 @@ deprecated. - Even though both `DATE`s appear to have `g7:type-DATE` payloads, we can't know that is the intended data type without consulting the defining specifications of `_LOC` and `_POP`, respectively. The first might be a `g7:type-DATE#period` and the second a `g7:type-DATE#exact`, for example. ::: -If an extension-defined substructure has a tag that is also used by one or more standard structures, its meaning and payload type should match at least one of those standard structure types. +Extension-defined substructures should match the structure type, payload, and substructure collection of at least one +standard type with the same tag, though it can add more substructures to the substructure collection. +This specification deprecates using a `stdTag` with a definition that does not match any standard type with that tag. :::example An extension-defined substructure with tag "`DATE`" should provide a date or date period relevant to its superstructure, as do all `DATE`-tagged structures in this specification. Extensions should not use "`DATE`" to tag a structure describing anything else (even something that might reasonably be abbreviated "date", such as someone an individual dated). diff --git a/specification/gedcom-3-structures-1-organization.md b/specification/gedcom-3-structures-1-organization.md index d32b625..69161db 100644 --- a/specification/gedcom-3-structures-1-organization.md +++ b/specification/gedcom-3-structures-1-organization.md @@ -345,8 +345,7 @@ A `MULTIMEDIA_RECORD` may contain a pointer to a `SOURCE_RECORD` and vice versa. #### `REPOSITORY_RECORD` := ```gedstruct -n @XREF:REPO@ REPO {1:1} g7.1:record-REPO - +1 RESN {0:1} g7:RESN +n @XREF:REPO@ REPO {1:1} g7:record-REPO +1 NAME {1:1} g7:NAME +1 <> {0:1} +1 PHON {0:M} g7:PHON @@ -371,8 +370,7 @@ Until such time, it is recommended that the repository record store current cont #### `SHARED_NOTE_RECORD` := ```gedstruct -n @XREF:SNOTE@ SNOTE {1:1} g7.1:record-SNOTE - +1 RESN {0:1} g7:RESN +n @XREF:SNOTE@ SNOTE {1:1} g7:record-SNOTE +1 MIME {0:1} g7:MIME +1 LANG {0:1} g7:LANG +1 TRAN {0:M} g7:NOTE-TRAN @@ -417,8 +415,7 @@ A `SHARED_NOTE_RECORD` may contain a pointer to a `SOURCE_RECORD` and vice versa #### `SOURCE_RECORD` := ```gedstruct -n @XREF:SOUR@ SOUR {1:1} g7.1:record-SOUR - +1 RESN {0:1} g7:RESN +n @XREF:SOUR@ SOUR {1:1} g7:record-SOUR +1 DATA {0:1} g7:DATA +2 EVEN {0:M} g7:DATA-EVEN +3 DATE {0:1} g7:DATA-EVEN-DATE @@ -456,8 +453,7 @@ A `SOURCE_RECORD` may contain a pointer to a `MULTIMEDIA_RECORD` and vice versa. #### `SUBMITTER_RECORD` := ```gedstruct -n @XREF:SUBM@ SUBM {1:1} g7.1:record-SUBM - +1 RESN {0:1} g7:RESN +n @XREF:SUBM@ SUBM {1:1} g7:record-SUBM +1 NAME {1:1} g7:NAME +1 <> {0:1} +1 PHON {0:M} g7:PHON diff --git a/specification/gedcom-3-structures-3-meaning.md b/specification/gedcom-3-structures-3-meaning.md index 009b1ad..75976f4 100644 --- a/specification/gedcom-3-structures-3-meaning.md +++ b/specification/gedcom-3-structures-3-meaning.md @@ -21,7 +21,7 @@ An event structure asserts the event did occur if any of the following are true:
- + Version 5.4 (1995) introduced the "event did occur" meaning of event.`DATE`, so it is now well-established in applications and files. However, it is common for users to enter a date range with no end without intending to indicate that the event occurred. For example, pre 7.0 files sometimes used @@ -41,7 +41,7 @@ An event structure asserts the event did occur if any of the following are true: without intending to imply that `NATU` ever did actually occur. Because this is a "sometimes used" rather than a "formally means" situation, it is likely that data using 5.x "after meaning not before" *de facto* pattern will be transferred as-is into 7.0 and persist in files for the foreseeable future. - +
- There is a `PLAC` substructure @@ -902,7 +902,7 @@ for this asset, the `FORM`.`MEDI` is recommended to be `PHOTO` rather than `ELEC Indicates the [media type](#media-type) of the payload of the superstructure. -As of version 7.1, three media types are supported by this structure: +As of version 7.0, there are two standard media types for this structure: - `text/plain` shall be presented to the user as-is, preserving all spacing, line breaks, and so forth. @@ -919,59 +919,33 @@ As of version 7.1, three media types are supported by this structure: Supporting more of HTML is encouraged. Unsupported tags should be ignored during display. -
- Applications are welcome to support more XML entities or HTML character references in their user interface. - However, exporting must only use the core XML entities, translating any other entities into their corresponding Unicode characters. -
- -
- Applications are welcome to support additional HTML elements, - but they should ensure that content is meaningful if those extra elements are ignored and only their content text is displayed. -
- - If needed, `text/html` can be converted to `text/plain` using the following steps: - - 1. Replace any sequence of 1 or more spaces, tabs, and line breaks with a single space - 2. Case-insensitively replace each ``, ``, and `` with a line break - 3. Remove all other `<`...`>` tags - 4. Replace each `<` with `<` and `>` with `>` - 5. Replace each `&` with `&` +:::note +Applications are welcome to support more XML entities or HTML character references in their user interface. +However, exporting must only use the core XML entities, translating any other entities into their corresponding Unicode characters. +::: -- `text/markdown` employs a plain text format for creating structured documents, and is designed - to be fairly understandable by users even if only displayed as plain text. - Applications should support the elements specified by [CommonMark](https://commonmark.org). +:::note +Applications are welcome to support additional HTML elements, +but they should ensure that content is meaningful if those extra elements are ignored and only their content text is displayed. +::: - For example: -
+:::note +Media types are also used by external files, as described under `FORM`. External file media types are not limited to `text/plain` and `text/html`. +::: - ````gedcom - 1 NOTE # 1940 US Census for New York, New York - 2 CONT __Individuals located at this address__ - 2 CONT * John **Doe** (age 35) - 2 CONT * Sally (age 32) - 2 CONT * Junior (age 3) - 2 CONT * Betty (age 1) - 2 MIME text/markdown - ```` - -
+If needed, `text/html` can be converted to `text/plain` using the following steps: -
- Applications are welcome to support additional Markdown elements, - but they should ensure that content is meaningful if those extra elements are only displayed as plain text. -
+1. Replace any sequence of 1 or more spaces, tabs, and line breaks with a single space +2. Case-insensitively replace each ``, ``, and `` with a line break +3. Remove all other `<`...`>` tags +4. Replace each `<` with `<` and `>` with `>` +5. Replace each `&` with `&` -:::note Other `text` media types not discussed above are also permitted, though not recommended. If present, they are considered extensions. Such extensions do not require an [extension tag](#extensions) because the definition of `g7:MIME` is sufficient to cover this kind of extension. -::: - -:::note -Media types are also used by external files, as described under `FORM`. External file media types are not limited to `text` types. -::: #### `NAME` (Name) `g7:NAME` @@ -1246,7 +1220,7 @@ This is metadata about the structure itself, not data about its subject. See `SOURCE_REPOSITORY_CITATION`. -#### `REPO` (Repository) `g7.1:record-REPO` +#### `REPO` (Repository) `g7:record-REPO` See `REPOSITORY_RECORD`. @@ -1356,7 +1330,7 @@ See also `LDS_SPOUSE_SEALING`. A pointer to a note that is shared by multiple structures. See `NOTE_STRUCTURE` for more details. -#### `SNOTE` (Shared note) `g7.1:record-SNOTE` +#### `SNOTE` (Shared note) `g7:record-SNOTE` A note that is shared by multiple structures. See `SHARED_NOTE_RECORD` for more details. @@ -1366,7 +1340,7 @@ See `SHARED_NOTE_RECORD` for more details. A description of the relevant part of a source to support the superstructure's data. See `SOURCE_CITATION` for more details. -#### `SOUR` (Source) `g7.1:record-SOUR` +#### `SOUR` (Source) `g7:record-SOUR` A description of an entire source. See `SOURCE_RECORD` for more details. @@ -1405,7 +1379,7 @@ An enumerated value from set `g7:enumset-FAMC-STAT` assessing of the state or co A contributor of information in the substructure. This is metadata about the structure itself, not data about its subject. -#### `SUBM` (Submitter) `g7.1:record-SUBM` +#### `SUBM` (Submitter) `g7:record-SUBM` A description of a contributor of information to the document. See `SUBMITTER_RECORD` for more details.