FamilySearch/gedcomx-rs

Which data types support links?

Closed this issue · 1 comments

The specification for Link says:

Instances of Link can be reasonably expected as extension elements to any GEDCOM X data type.

I believe that statement should be more explicit.

In gedcomx-java (the canonical implementation of GEDCOM X), anything that supports links inherits from HypermediaEnabledData. There are a number of data types that don't inherit from HypermediaEnabledData and thus don't support links. Why?

The best reason I could see for not supporting links is not supporting extension elements but Address supports extension elements while not supporting links. Was that intentional?

The spec should either say "All data types support links," list data types that do support links, or list data types that don't support it and imply that all others do.

At 6f6c84a, I added some language that clarifies that a link cannot be applied to data types that explicitly do not allow extension elements.

It's true that the Java implementation doesn't have links on a bunch of data types that technically do support links, but that's just because this is one of the rare cases where the Java implementation is incomplete with regards to the specification.

In the Java implementation at the time of this comment this applies to:

  • NameForm
  • OnlineAccount
  • Address
  • PlaceReference
  • NamePart
  • Date
  • Attribution

The Java implementation will be updated as needed if links ever need to be used on those data types.