GEDCOM/XREF ID

From GenWiki

Jump to: navigation, search

Contents


This page is an English extract of the German page GEDCOM/XREF-Tag [1], for full details see the German page.

Name and Meaning

Cross-Reference

This article describes the topic unique cross-reference and pointer in GEDCOM files.

Tag

XREF

Meaning

XREF_ID

Usage

Pointer and Cross-Reference_Id ( XREF_ID ) allow to create a cross reference from one record to another unique defined record by using the XREF_ID.

Formal Description of Permissible Values

Base: GEDCOM Standard Draft 5.5.1

The Standard defines

Cross-Reference_ID ( XREF_ID) is formed by any arbitrary combination of characters from the pointer_charset. The first character must be an alpha or a digit. The XREF_ID is not retained in the receiving system, and it may therefore be formed from any convenient combination of identifiers from the sending system. No meaning is attributed by the receiver to any part of the XREF_ID, other than its unique association with the associated record. The use of the colon (:) character is reserved for the future as a network reference to a permanent file record. The use of an exclamation point (!) is reserved for associations within a logical record ( intra-record pointers ). Uniqueness of the cross-reference identifier is required within the transmission file. The XREF_ID appears before the tag in a GEDCOM line.


Pointer A pointer stands in the place of the record or context identified by the matching XREF_ID. Theoretically, a receiving system should be prepared to follow a pointer to find any needed value in a manner that is transparent to the logic of the subsystem that is looking for specific tags.This highly flexible facility will probably be used more in the future. For the time being, however, the use of pointers is explicitly defined within the GEDCOM form, such as the Lineage-Linked GEDCOM Form defined in chapter 2. The pointer appears after the tag in a GEDCOM line. The pointer represents the association between two objects that usually reside in different records. Objects within a logical record can be associated. If this need exists, the pointer record composition contains an exclamation point (!) that separates the parent record's cross-reference ID from the specific substructure's cross-reference ID, which is at some subordinate level to the logical record at level zero. The cross-reference ID of the substructure subordinate to a zero level record, for inter-record associations is always composed of the Record ID number and the Substructure ID number, such as @I132!1@. Including the Record ID number in the pointer that associates objects within a record will allow the GEDCOM processors to build the index only at the record level and then search sequentially for the appropriate substructure cross-reference ID. The parent record ID is assumed when the cross-reference ID begins with a exclamation point (!) signifying an intra-record association.

Examples from the Standard

The following are examples of valid but unrelated GEDCOM lines:

0 @1234@ INDI
… 
1 AGE 13y 
… 
1 CHIL @1234@ 
… 
1 NOTE This is a NOTE field that is
2 CONT continued on the next line.

The first line has a levelnumber 0, a XREF_ID of @1234@, an INDI tag and no value.

The second line has a levelnumber 1, no XREF_ID, an AGE tag, and a value of 13y.

The third line has a levelnumber 1, no XREF_ID, a CHIL tag, and a value of a pointer to a XREF_ID named @1234@.

Agreements for XREF_ID

The agreements for XREF_ID are derived from the discussion on the Gedcom-L. They were decided by a vote of the program authors of the list.

Pointer and XREF_ID at Export

E1 Format of Pointer and XREF_ID

Pointer and XREF_ID must be formed in the following format:

Pointer := [(0x40) + alphanum + pointer_string + (0x40) ]

where:

(0x40)=@

pointer_char := [non_at ]

alphanum := [a to z|A to Z|_ (underscore)|0 to 9]

pointer_string := [null | pointer_char | pointer_string + pointer_char ]


E2 Uniqueness of XREF_ID

Uniqueness of the cross-reference identifier is required within the transmission file, that means, a XREF_ID formed according E1 is assigned to exactly one record. For each occurring pointer in the GEDCOM file the associated XREF_ID in the GEDCOM file must exist.


E3 Notation of XREF_ID

The notation of XREF_ID and associated pointers can be chosen freely at export, as long as the rules of E1 and E2 are respected. There is neither a mandatory requirement to maintain imported terms, or to rename the XREF_ID in a uniform format, e.g. in a numbered sequence.


E4 Recommendations for the Notation of XREF_ID

For the notation of XREF_ID the following is recommended:

The notation is composed of @Xnnnn@, where the X represents the type of the record by one letter and nnnn represents a positive number assuring uniqueness. In particular, it is recommended:

  • @Innnn@ for Individual records
  • @Fnnnn@ for Family records
  • @Nnnnn@ for Note records
  • @Onnnn@ for Multimedia records ( Objects )
  • @Snnnn@ for Source records
  • @Rnnnn@ for Repository records

This recommendation is intended to enable better readability of the GEDCOM file for the user.

Pointer and XREF_ID at Import

I1 Support for all permissible XREF_ID

During all XREF_ID and pointer formed according E1 and E2 must be supported.


I2 Handling of XREF_ID at Import

It is optional to accept the terms offered at import for XREF_ID and associated pointer or to identify the records program internally unambiguously otherwise instead. There is no obligation to continue to use the terms found at import or to store them in any form.

Personal tools
GenWiki-internal
In other languages