xml:id values: general notes

Abstract

General information on use of xml:id in WWP texts, including guidelines for choosing values

identifiers quotation note cast list anchor metadata
note said anchor xml:id

The value of xml:id is used to uniquely identify a particular element, so that it can be pointed at by other elements (to create links and references of various sorts). In order for a given file to parse, its xml:id values must be unique within the file. However, when our individual files are brought together to form a completed textbase, the xml:id values will need to be unique not only within the file but within the textbase as a whole.

For current encoding purposes, encoders need only create xml:id values which are unique within the file they are currently encoding. They may invent any system of which they find convenient (and lucid to other encoders and WWP staff).

Later on, as part of the completion of the textbase, a routine will be written which will go through the entire textbase and replace all existing xml:id values with new ones which are unique across the textbase.

Notes and anchors

Values for xml:id on note elements and on the elements to which notes point (including anchor and any other element used for this purpose) should be of the following form (see 093 for more on notes):

  • for notes, value should be n001, n002, etc., with sufficient leading zeroes to accommodate the total number of notes in the document
  • for anchors, value should be a001, a002, etc., matching the numeration of the corresponding note elements

Divisions and pages

Values for xml:id on elements which are pointed to by indexes and tables of contents should use prefix letters matching the element itself (e.g. div001, p001) to make it easy to see what kind of element is being pointed to.

Cast lists

For the xml:id values in cast lists, the WWP has developed a system to ensure consistency between files, since many of our plays are taken from larger collections. We recommend that xml:id values for each character take the form of r.xxx where r stands for role, followed by three letters of the character’s name, as in the following (fictitious) examples:

Examples

<role xml:id="r.blo">Lady Blown-Over</role>
<role xml:id="r.fee">Mr. Feeble</role>

See 163 for information on xml:id values for the TEI header.