YAML description format
This page documents the organization of YAML documents delivered at the URIs of the standard tags in the FamilySearch GEDCOM 7 specification and the extension tag registry. The YAML documents are not part of the standard itself, and while the intent is that they remain stable and usable in the long term, if a valid reason arises they may be changed independently of the versioning process.
YAML documents in this form are used to define
- Structure types
- Enumeration values and sets
- Calendars and months
- Payload datatypes
- Known payloads for URI-valued structures
For ease of presentation, we call whatever a YAML document is describing a “concept”.
Readable YAML
The files are provided in YAML 1.2. YAML was chosen because it is readily parseable in many programming languages and it can be formatted in a human-readable way. Because YAML provides many formatting options, using a readable style is an option, not a guarantee, and should be considered when preparing the YAML documents.
The YAML should use only untagged nodes with types seq, map, and str from the fail safe schema
and null from the JSON schema.
Long strings should be wrapped on whitespace to keep the YAML under 80 columns if feasible. Strings containing newlines should be presented using the literal block style. Strings without newlines may presented in any flow style (though note the restrictions on plain style strings).
Sequences and mappings should be in the block style unless they are empty, in which case a flow style should be used instead. The top-level mapping should have a blank line between each mapping entry.
To ease machine identification of YAML blocks, document markers are recommended. In particular, documents should begin with both the YAML directive “%YAML 1.2” and the directives end marker “---”, and should end with the document end marker “...”.
YAML document schema
Each YAML document is a map with str keys.
The following shorthand types are used in this document:
| Name | YAML type | Other constraints |
|---|---|---|
| Cardinality Marker | str |
A cardinality marker as defined in the FamilySearch GEDCOM 7 specification |
extTag |
str |
Matching extTag from the FamilySearch GEDCOM 7 specification |
| Language Tag | str |
A valid language tag, as defined in BCP 47 |
stdTag |
str |
Matching stdTag from the FamilySearch GEDCOM 7 specification |
Tag |
str |
Matching Tag from the FamilySearch GEDCOM 7 specification |
| URI | str |
A valid URI, as defined by RFC 3986 |
Required keys
Three keys are always present:
-
Key langType Language Tag Required by all Allowed by — A language tag, as specified in BCP 47. The entire YAML document is presented in this language.
-
Key typeType strfrom a limited set (see below)Required by all Allowed by — One of the following string values:
structureenumerationenumeration setcalendarmonthdata typeuri
Which other keys are present depends on the
type.It is anticipated that additional types will be added in the future. Types for assisting in knowing which extensions a given application supports and for finding a translation of the YAML document into other languages are expected.
-
Key uriType URI Required by all Allowed by — The URI that identifies the concept documented in this YAML file. If the YAML file also includes the key
fragment, this URI should be followed by a fragment identifier when used; the meaning of the fragment is defined by thefragmententry.For example, if
uriis “https://gedcom.io/terms/v7/RIN” andfragmentis “Source System”, then a full URI might be “https://gedcom.io/terms/v7/RIN#MyProgram” where the fragment identifier “MyProgram” indicates the source system that generated the RIN payload value.
Other keys
The following keys may appear in a YAML file.
Their names may be changed a YAML file with a lang other than en.
-
Key abnf productionType strRequired by — Allowed by type: data typeThe rule name of an ABNF rule defining this datatype. Should only be included if the corresponding ABNF grammar is provided.
-
Key calendarsType seqof URIRequired by type: monthAllowed by — A list (in no particular order) of the URIs of calendars that use this month.
The list may be incomplete, as a new calendar might be defined that uses an existing month.
-
Key change controllerType strRequired by — Allowed by all An identifier of who is allowed to authorize changes to this file. For example, it could be FamilySearch, another company name, or a domain name. If not present, the change controller is the GEDCOM Steering Committee.
-
Key contactType strRequired by — Allowed by all Contact information for the maintainer of this file. For example, it could be personal contact information or a mailing list.
-
Key documentationType seqof URIRequired by — Allowed by all One or more external URLs where additional documentation can be found. If there is no such URL, this entry should be omitted.
-
Key enumeration setType URI Required by type: structurewithpayloadeitherg7:type-Enumorg7:type-List#EnumAllowed by — The URI of the set of enumeration values permitted in the payload of this structure.
-
Key enumeration valuesType seqof URIRequired by type: enumeration setAllowed by — A list (in no particular order) of URIs of enumeration values supported by the structure.
The listed URIs needn’t identify only enumeration values: some structures explicitly enumerate other concepts, such as https://gedcom.io/terms/v7/SOUR-EVEN enumerating even types.
The list may be incomplete, as a new enumeration values might be defined that may be included in existing structures.
-
Key epochsType seqof TagRequired by type: calendarAllowed by — A list of all of the epoch markers used in the given calendar.
The list should be taken as exhaustive. Extensions may not add new epochs to existing calendars.
-
Key extension tagsType seqofextTagRequired by — Allowed by typescalendar,enumeration,month,structureA list, with the most-preferred tag first, of extension tags known to be used by applications for this concept.
Standard structures may have an
extension tagsentry to list fully compatible extensions that predated the standard and can be converted to thestandard tagwithout any other modification. For example, 7.0’sUIDstructure is fully compatible with the common 5.5.1 extension identified by tag_UID. -
Key nonconformant tagsType seqofstdTagRequired by — Allowed by typescalendar,enumeration,month,structureA list of nonconformant tags known to be used by applications incorrectly using a
stdTagrather than anextTagfor extensions. Such nonconformant tags may be recognized when reading a GEDCOM file, but should be converted to equivalent conformant tags (whether standard or extension tags) when writing a GEDCOM file. -
Key fragmentType strRequired by — Allowed by type: uri
A recommended brief name or label for a fragment identifier, to show to users. Labels are user-centric; for programmer-centric explanations of the concept, see specification.
Labels are short to fit in forms and other constrained-space UI elements; for more detailed text see help text.
By being present in the YAML file, this field also implies that the URI should have a fragment identifier appended to it when used.
-
Key help textType strRequired by — Allowed by all A recommended detailed description to show to users. For programmer-centric explanations of the concept, see
specification.Help text may be lengthy; for brief text to use in UI elements, see
label. -
Key labelType strRequired by — Allowed by all A recommended brief name or label to show to users. Labels are user-centric; for programmer-centric explanations of the concept, see
specification.Labels are short to fit in forms and other constrained-space UI elements; for more detailed text see
help text. -
Key monthsType seqof URIRequired by type: calendarAllowed by — A list of all of the months used in the given calendar. Months are listed in the order they appear in a year to facilitate chronological sorting. Some calendars include leap months, so it may be that not all months appear every year in the given calendar.
The list should be taken as exhaustive. Extensions may not add new months to existing calendars.
-
Key payloadType nullorstr; see below for moreRequired by type: structureAllowed by — Indicates the payload type of the given structure. This will be one of
null, meaning no payload is permitted- The special string “
Y|<NULL>”, meaning the payload is either “Y” or omitted - The URI of a datatype, meaning a payload of this type is required
- A string of the form
@<URI>@, meaning the payload is a pointer to a structure whose type is given by the URI.
-
Key prereleaseType boolRequired by — Allowed by all If present with a true value, the URI documented by this YAML file is not yet released; breaking changes may appear in the future without changing the URI.
If absent, or if present with a false value, the URI documented by this YAML file is released; patches may be applied, but any minor or major revisions would require a new URI.
-
Key specificationType seqofstrRequired by all except type: enumeration setAllowed by all A list (in no particular order) of descriptions of the concept the YAML document is defining.
The specification are generally programmer-centric; for user-centric text, see
labelandhelp text -
Key standardType boolRequired by — Allowed by enumeration setIf present with a true value, the enumeration set is defined in an official GEDCOM standard document, but may still be in prerelease depending on the value of the
prereleasefield. the URI documented by this YAML file is not yet released; breaking changes may appear in the future without changing the URI.If absent, or if present with a false value, the enumeration set is not in any official GEDCOM standard.
-
Key standard tagType stdTagRequired by — Allowed by typescalendar,enumeration,month,structureThe tag for this concept, either as given in an official GEDCOM standard document, or for an extension-defined substructure that uses a tag matching
stdTag. -
Key subsumesType seqof URIRequired by — Allowed by all A list of URIs that can be replaced by this URI without any loss of information or change of meaning. This does not simply mean they can express the same thing, but rather that they express the same thing in the same way, i.e., with no change in payloads or substructures.
One example use-case is an extension becoming standard and being given a URI with a gedcom.io host, in which case both the extension URI’s YAML file and the standard URI’s YAML file can list the other as URIs it
subsumes.Another example use-case is an extension that adds to another extension, for example by allowing a larger set of payloads or more substructures. In this case the more permissive/larger extension would say it
subsumesthe more strict/smaller extension, but not the other way around. -
Key substructuresandsuperstructuresType mapwith URI keys and Cardinality Marker valuesRequired by type: structureAllowed by — These express how structures may be nested, and with what cardinality. Structure types are given by URI; cardinalities are expressed using the same strings as the standard (i.e. “
{0:1}”, “{1:1}”, “{0:M}”, and “{1:M}”)Because new structures may be added over time in any order, x may be a substructure of y if either x’s
superstructuresincludes y or y’ssubstructuresincludes x.If the relationship is listed in both a
substructuresentry and asuperstructuresentry, the two must have the same cardinality.If
superstructuresis an emptymap, then the structure is a record and must not appear in any other structure’ssubstructures. -
Key translated fromType Language Tag Required by — Allowed by all A language tag, as specified in BCP 47, which must be different from the language tag included in the
langkey. If present, this field indicates that this YAML file is a translation of a different YAML file, one presented in the indicated language. In the event that the two disagree, the other YAML file shall be taken as more correct. -
Key used byType seqofstrRequired by — Allowed by all A list of
g7:HEAD-SOURvalues of applications known to use an extension tag for this concept. -
Key value ofType seqof URIRequired by type: enumerationAllowed by type: structure** Note that potentially any concept could be referred to in an enumeration set, and hence any YAML file could include the
value ofkey. So far, all known examples are eithertype: enumerationortype: structure.A list (in no particular order) of enumeration sets that are known to contain this concepts as an enumeration value.
The list may be incomplete, as a new enumeration set might be defined that re-uses an existing enumeration value.