Decorative Arch, Resafa, Syria. Copyright, Daniel Schwartz. Documentation

Deprecated records are records for entities that are no longer maintained, because they have either been merged into another record or deleted. Properly handling deprecated records is important for maintaining stable URIs and accurate data.

Finding a Deprecated Record

Deprecated TEI records are stored in the "data/deprecated" folder for future reference, using the same relative directory path as the original directory it was stored in (e.g., "persons/tei/saints/tei").

Excluding Deprecated Records from Search or Analysis

When downloading records or accessing them through the file system, you may exclude deprecated records by simply deleting the data/deprecated folder from your local copy.

When using xQuery or XSLT to process records, you can exclude deprecated records using the XPath expression not(/TEI/teiHeader/revisionDesc/@status="deprecated").

Deprecating a Record

There are two types of records that may need to be deprecated: merged records and deleted records. The format for these was originally discussed here:

Deprecating a Merged Record

If you are deprecating a record because the data from it has been merged into another record, you should change the following in the deprecated record (see as an example):

  1. Change the value of /TEI/teiHeader/revisionDesc/@status to deprecated.
  2. Leave the old idnos intact, but add an idno/@type="redirect" in /TEI/teiHeader/fileDesc/publicationStmt and in the main child of /TEI/text/body pointing to the URI of the record this was merged into (see example below).
  3. Append " [deprecated] to the value in /TEI/teiHeader/fileDesc/titleStmt/title[@level="a"].
  4. Add a change element describing your changes to /TEI/teiHeader/revisionDesc. Include an @xml:id.
  5. Add a desc element as the first child of /TEI/text/body describing the deprecation in human-readable prose.
  6. Link the above-mentioned idno and desc elements to the description of your changes by adding a @change attribute using the value of the @xml:id on your change element above.

Also do the following in the record that received the merged data (i.e., the record that will be kept; see as an example):

  1. Add an idno/@type="deprecated" containing the URI of the deprecated record in the same places as number 2. above.
  2. Add a change element describing your changes to /TEI/teiHeader/revisionDesc. Include an @xml:id (which you can link to from the idnos you added using a @change attribute).

Example Merged & Deprecated Record

<TEI xml:lang="en">
    <idno type="URI"></idno>
    <idno type="redirect" change="#change2096-1"></idno>
  <revisionDesc status="deprecated">
   <change who="" when="2016-06-14+02:00" xml:id="change2096-1">Merged into [] and deprecated.</change>
   <desc change="#change2096-1" type="deprecation">This record has been deprecated and merged into</desc>
    <person xml:id="saint-2096" ana="#syriaca-saint">
     <idno type="URI"></idno>
     <idno type="redirect" change="#change2096-1"></idno>

Deprecating a Deleted Record

In rare cases, a record should be deleted rather than merging it with another record, for example because it contains no useful information. In such cases, follow the steps above without adding any idno/@type="redirect".

Expected App Behavior

  • The application handling URI resolution is expected to redirect any records with an idno[@type="redirect"] to the URI contained within that element.
  • Records having /TEI/teiHeader/revisionDesc/@status="deprecated" but no idno[@type="redirect"] should display a notification and redirect to a browse page.
  • All records with /TEI/teiHeader/revisionDesc/@status="deprecated" or contained in the /data/deprecated directory should be excluded from search and browse.