|
Menu "Edit" - "User defined tags" opens the User Tags Editor.
ATTENTION! Creation/editing of the user tags requires that the user has some experience in the GEDCOM format and a certain level of computer expertise.
The user tags (the tags defined by the user) are among those tags which are not described in the GEDCOM standard but are created by the user for his or her own needs. Usually such tags are created by genealogic program makers, so the term "user", as related to the end user, is not exactly correct. The user tags describe elements which, from the user's point of view, are necessary for normal functioning the program, but such tags are not provided in the standard set of GEDCOM tags.
So, in the "Relatives" program a "Person" record (tag INDI) has user tags _X and _Y. These tags store the geometric coordinates of that person in the tree. Without these tags the program could not work - the GEDCOM standard does not provide any means to store such data. A mechanism for definition of user tags has been offered in the GEDCOM format creator in version 5.3 (with special tag SCHEMA), but it does not appear to be well thought out, and does not sufficiently allow for the description of additional tags as new data types. That's why already in version 5.5 the GEDCOM authors have ignored the SCHEMA tag, and the item, as the saying goes, "has hung in mid-air" - the user tags still could be used, but there was nothing already in place to define them...
The "Relatives" program offers its own mechanism to support user tags, providing their fuller description - in particular, for a tag it is possible to describe type of its value - a string, a text, a reference to record, etc.
When importing a GEDCOM file created by other program, the mechanism works as follows:
- If the file header has tag SCHEMA definitions of the user tags are read from it and stored in the program;
- All the user tags (i.e. those which names begin with underscore "_"), not defined in SCHEMA, are also stored in the program;
- All the standard GEDCOM tags which are found, but not in their standard (expected) places, are marked as user tags and are stored in the program;
- Tags which are not standard GECDOM tags and do not begin with "_", also are marked as user tags and are stored in the program, and the symbol "_" is added to the beginning of their names;
- The tags can then be edited in the User Tags Editor;
- Tag SCHEMA in the header is invisible (and cannot be added), all functions of maintain the user tags can be done through the User Tags Editor;
- When exporting to GEDCOM format the user tags information is saved in the file header as SCHEMA tags.
User Tags Editor
In the left panel of the Editor there will be a list of the user tags in the given file. Each tag is represented by a "chain" of tags in the form Tag - tag - ... - tag, i.e. in form "The main tag (Person, Family, etc.) - then a tag belonging to it - etc... - at last, the actual user tag".
Selecting a line in the list causes the properties of the chosen user to be displayed in the right panel:
- Tag - tag name;
- Label - brief definition, label i.e. how the tag will be shown, for example, in the tree of record's elements, etc.;
- Definition - expanded description of the tag: What the tag means, what data it stores;
- Help - even more detailed description of the tag, including information on how to edit value of the tag, what values it can accept, etc. See:
Record Editor;
- Min. number - what minimum number of this tags the parental element can have. Can be 0 or 1;
- Max. number - what maximum number of this tags the parental element can have. Can be from 1 to 65535;
- Value type - type of value, the tag's element can have. These types are: empty, line, text, regex, reference, choice;
- Value length - maximum length of the value for types line and regex.
Buttons "New" and "Edit" on the bottom panel open Tag Editor dialog for creation of a new user tag or editing a selected existing user tag.
Button "Remove" deletes the selected user tag.
Note that removal of a tag means that all elements with this tag should be removed as well. Before the tag is removed, the program checks whether there are such elements in the file. If they are found, a warning is shown. The user can then cancel the removal and see the records in which these elements were found (see button "Check").
If the deleted tag has subtags (which are also, naturally, user tags) these subtags will also be removed (along with the corresponding elements).
As you can see, removal of a user tag (and also change of type of its value) can lead to unintended loss of data. It is therefore necessary to use this feature with great caution. In this version of the program changes in the user tags cannot be undone.
The "Check" button lists the records in which elements with the given user tag are found. It is used before removal of a tag (see button "Remove"). However, there is another (and probably even more convenient) way to find all records with the elements of the given tag - by using "Advanced search". To do this in the search dialog, find the necessary tag in the tree of tags, click on it with the right mouse button and choose "Add to search" from the drop-down menu. In the text field that will subsequently appear in the panel on the right, enter nothing (or enter the wild-card '*' symbol, that means the same thing in this case - search for any value) and press "Search". All records with elements of the given tag will be found.
Tag Editor
Has the following interface:
- Tag - text field to enter tag name.
The tag name should begin with underscore sign '_' and can include capital letters from A to Z, numeric digits 0 to 9 and the underscore character (_). The editor will not allow any other symbols to be entered. Attention: if you cannot enter anything into this field it most likely because your keyboard layout is switched to a non-English layout!. If you have forgotten to begin the name with '_', the editor will correct it.
- Context used to define a "parental" tag for the new tag, i.e. a tag in which the user tag will be a subtag. In this version of the program it is possible to set context only for a new user tag, i.e. at its creation.
The context is defined as follows:
a) Choose a tag of the uppermost level (Person, Family, etc.) from the dropdown list and press "Add" button - the tag will appear in the text field above, and the dropdown list will now contain all possible subtags of the tag that has been added.
b) Choose a tag of the next level from the dropdown list and press button "Add" - the chosen tag will be added to the top level tag. This creates a "chain" of parental tags of our user tag.
c) The "Deduct" button is used to remove the last tag from the context.
- Label is used to enter the tag's label. The label of the tag should be as short as possible, better just a word. The tag will be shown with this label in the program, for example the tag INDI has the label "Person".
- Definition - this is used to enter the tag's definition. Defines the tag in more detail and has no length restriction. Nevertheless, do not make the definition too long. No more than 50-60 letters is desirable.
- Help - Enter help text here. The length of this text is not limited, and it can be on multiple lines. Help will be available to the user while creating or editing an element with the given tag and can contain the expanded description of a tag, information on what values the element can have, or any other features.
- Min. number - dropdown list with values 0 and 1; "0" means that the element with such tag is not obligatory. A "1" means that it must be present in the parental element at least once.
- Max. number - text field to enter the maximum number of elements with the given tag in the parental element. Can accept value from 1 up to 65535.
- Value type - a set of radiobuttons to define the value type of the given tag:
- Empty - the element of this tag doesn't have any value. Such an element just contains other elements.
- Line - value is a single line of text. You can specify maximum length of the line in the last text field (up to 248 symbols according to GEDCOM standard) but in this version it is not limited;
- Text - value is a multi-line text of unlimited length;
- Regex - the same as Line, but value should match to the certain pattern. The pattern is specified in the text field as a regular expression. For example, to limit value to four-digits decimal number, regular expression "\d{1,4}" is used. About regular expressions read: Mastering Regular Expressions, 2nd Edition, Jeffrey E. F. Friedl, O'Reilly and Associates, 2002.
- Ref. to - The value of the element is a reference to a record. The type of the record is taken from the dropdown list beside.
- Choice - value of the element can be one of the several preset values. The list of these values is specified in the text area below. Each line of the text specifies one value. Value can be supplied with a comment after an equal sign '='. For example, the list
CAD = Canadian dollar
USD = US dollar
FR = French franc
specifies three possible values - CAD, USD and FR. Comments after an equal sign will be shown during editing of the element, but will be ignored by Record Editor (only the left part of the line, before the equal sign, will be considered as being the actual value).
- Value length - a text field that specifies the maximum length of the value.
- Buttons "OK" and "Cancel" are self-explanatory...
See also:
About the "expanded" support of the user tags
Menu "File" - "Import from:" - "GEDCOM 5.5 file"
Note:
Tags in "Relatives" are seldom presented anywhere by their real names (INDI, FAM, SOUR, etc.), but only by their labels (Person, Family, Source, etc.)
Note:
Change of value type of an existing user tag can lead to loss of data if elements of the tag exist elsewhere in the records in the tree. For example, if the type of data was "Reference", and you have replaced it with "Line" the reference to the record will inevitably be lost. In another example, if type "Text" is replaced by "Line" all carriage returns will be removed from the value to make it into a single line. The program checks and warns the user regarding what data might be lost or changed. Nevertheless be careful when changing type of a user tag value!
|