Srophé Application : Documentation
Deprecated Records
Deprecated records are records for Digital Syriac Corpus 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
- Excluding Deprecated Records from Search or Analysis
- Deprecating a Record
- Expected App Behavior
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").
When downloading Digital Syriac Corpus 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")
.
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: https://github.com/srophe/srophe-app-data/issues/104.
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 https://github.com/srophe/srophe-app-data/blob/28d73e0bafdc01d31077b3fd8c4d37749b1b8e45/data/deprecated/persons/tei/saints/tei/2096.xml as an example):
- Change the value of
/TEI/teiHeader/revisionDesc/@status
todeprecated
. - Leave the old
idno
s intact, but add anidno/@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). - Append " [deprecated] to the value in
/TEI/teiHeader/fileDesc/titleStmt/title[@level="a"]
. - Add a
change
element describing your changes to/TEI/teiHeader/revisionDesc
. Include an@xml:id
. - Add a
desc
element as the first child of/TEI/text/body
describing the deprecation in human-readable prose. - Link the above-mentioned
idno
anddesc
elements to the description of your changes by adding a@change
attribute using the value of the@xml:id
on yourchange
element above.
Also do the following in the record that received the merged data (i.e., the record that will be kept; see https://github.com/srophe/srophe-app-data/blob/32279300b63078d128e81cbc9b788fe838682051/data/persons/tei/53.xml as an example):
- Add an
idno/@type="deprecated"
containing the URI of the deprecated record in the same places as number 2. above. - Add a
change
element describing your changes to/TEI/teiHeader/revisionDesc
. Include an@xml:id
(which you can link to from theidno
s you added using a@change
attribute).
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"
.
- 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 noidno[@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.