-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Tools for managing split authority files
- Loading branch information
1 parent
1b2f587
commit 4918a85
Showing
9 changed files
with
757 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
|
||
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"> | ||
<ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/> | ||
|
||
<!-- currently, these are basic rules relating to correct entry of names and ids. Later they may be expanded to cover other areas. --> | ||
|
||
<pattern> | ||
<rule context="tei:person"> | ||
<assert test="matches(@xml:id, 'person_\d+')">The person element must have an xml:id attribute matching the pattern 'person_[digits]'</assert> | ||
<assert test="count(tei:persName[@type='display']) = 1">One persName element only must have @type=display</assert> | ||
</rule> | ||
</pattern> | ||
|
||
|
||
<pattern> | ||
<rule context="tei:org"> | ||
<assert test="matches(@xml:id, 'org_\d+')">The org element must have an xml:id attribute matching the pattern 'org_[digits]'</assert> | ||
<assert test="count(tei:orgName[@type='display']) = 1">One orgName element only must have @type=display</assert> | ||
</rule> | ||
<rule context="tei:place"> | ||
<assert test="matches(@xml:id, 'place_\d+')">The place element must have an xml:id attribute matching the pattern 'place_[digits]'</assert> | ||
<assert test="count(tei:placeName[@type='index']) = 1">One placeName element only must have @type=index</assert> | ||
</rule> | ||
</pattern> | ||
|
||
|
||
<pattern> | ||
<rule context="tei:text/tei:body/tei:listBibl/tei:bibl"> | ||
<assert test="matches(@xml:id, 'work_\d+')">The bibl element must have an xml:id attribute matching the pattern 'work_[digits]'</assert> | ||
<assert test="count(tei:title[@type='uniform']) = 1">One title element only must have @type=uniform</assert> | ||
<assert test="tei:textLang[@mainLang]">Works should have language(s) specified in a textLang element which must have an attribute @mainLang</assert> | ||
|
||
</rule> | ||
|
||
</pattern> | ||
|
||
<pattern> | ||
<rule context="tei:text/tei:body/tei:listBibl/tei:bibl[not(tei:author)]"> | ||
<assert test="tei:note[@type='subject']">Works without an author should have one or more subject headings</assert> | ||
</rule> | ||
</pattern> | ||
|
||
<!-- Import all the entries so that when editing an individual file checks can be made across all others --> | ||
<let name="allpeople" value="doc('persons_master.xml')//tei:person"/> | ||
|
||
<pattern> | ||
<rule context="tei:person"> | ||
<let name="thisid" value="@xml:id"/> | ||
<report test="count($allpeople[@xml:id eq $thisid]) gt 1" role="error"> | ||
The xml:id of <value-of select="$thisid"/> has been used elsewhere | ||
</report> | ||
</rule> | ||
</pattern> | ||
|
||
<!-- TODO: Similar code needed for other types of authority files --> | ||
|
||
</schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> | ||
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<?xml-model href="../authority-schematron.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<TEI xmlns="http://www.tei-c.org/ns/1.0"> | ||
<teiHeader> | ||
<fileDesc> | ||
<titleStmt> | ||
<title>Title</title> | ||
</titleStmt> | ||
<publicationStmt> | ||
<p>Publication Information</p> | ||
</publicationStmt> | ||
<sourceDesc> | ||
<p>Information about the source</p> | ||
</sourceDesc> | ||
</fileDesc> | ||
</teiHeader> | ||
<text> | ||
<body> | ||
<listPerson> | ||
|
||
<person xml:id="person_21717206"> | ||
<!-- SAMPLE DATA COPIED FROM MEDIEVAL. DELETE BEFORE EDITING FOR REAL. --> | ||
<persName type="display">Boethius, pseudo</persName> | ||
<persName type="crossref">Pseudo-Boethius</persName> | ||
<note type="links"> | ||
<list type="links"> | ||
<item> | ||
<ref target="http://viaf.org/viaf/21717206"> | ||
<title>VIAF</title> | ||
</ref> | ||
</item> | ||
</list> | ||
</note> | ||
<note type="source">This record contains information from <ref target="http://viaf.org/">VIAF (Virtual International Authority File)</ref> which is made available under the <ref target="http://opendatacommons.org/licenses/by/1.0/">ODC Attribution License</ref>.</note> | ||
</person> | ||
|
||
|
||
<person xml:id="person_40466384"> | ||
<!-- SAMPLE DATA COPIED FROM MEDIEVAL. DELETE BEFORE EDITING FOR REAL. --> | ||
<persName type="display" source="LC bodl">Griffolini, Francesco, 1420-1491</persName> | ||
<persName type="crossref" source="LC">Aretino, Francesco, 1418-1483</persName> | ||
<persName type="variant" source="LC">Aretinus, Franciscus Griffolinus, 1418-1483</persName> | ||
<persName type="variant" source="LC">Arretinus, Franciscus, 1418-1483</persName> | ||
<persName type="variant" source="LC">Franciscus, Aretinus, 1418-1483</persName> | ||
<persName type="crossref" source="LC">Francesco, d'Arezzo, 1418-1483</persName> | ||
<persName type="variant" source="LC">Griffolinus, Franciscus, 1418-1483</persName> | ||
<note>Humanist and translator; to be distinguished from the jurist Francesco Accolti.</note> | ||
<note type="links"> | ||
<list type="links"> | ||
<item><ref target="http://id.loc.gov/authorities/names/n93804055.html"><title>LC</title></ref></item> | ||
<item> | ||
<ref target="http://www.treccani.it/enciclopedia/francesco-griffolini_%28Dizionario-Biografico%29/"> | ||
<title>DBI</title> | ||
</ref> | ||
</item> | ||
<!-- BNF confuses with the jurist --> | ||
<item> | ||
<ref target="http://d-nb.info/gnd/129835021"> | ||
<title>GND</title> | ||
</ref> | ||
</item> | ||
<item> | ||
<ref target="http://www.mirabileweb.it/author/franciscus-griffolinus-aretinus-n-1420-m-1491-author/24182"> | ||
<title>Mirabile</title> | ||
</ref> | ||
</item> | ||
</list> | ||
|
||
</note> | ||
<note type="source">This record contains information from <ref target="http://viaf.org/">VIAF (Virtual International Authority File)</ref> which is made available under the <ref target="http://opendatacommons.org/licenses/by/1.0/">ODC Attribution License</ref>.</note> | ||
</person> | ||
|
||
<person xml:id="person_172419710"> | ||
<!-- SAMPLE DATA COPIED FROM MEDIEVAL. DELETE BEFORE EDITING FOR REAL. --> | ||
<!-- record originally created from https://viaf.org/viaf/172419710/viaf.xml at 2017-05-08 15:32:17.509859 --> | ||
<persName type="display" subtype="forenameFirst" source="LC">Henry, VIII, King of England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Heinrich, 8, England ; König, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Heinrich, VIII., König von England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Heinrich, VIII, King of England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Heinrich, VIII, König von England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Heinrich, VIII, Roi d'Angleterre, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Heinricus, VIII, König von England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henricus, VIII., Anglia, Rex, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henricus, VIII, Rex Anglorum, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henrie, VIII., Angleterre, Roi, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henri, VIII., 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henri, VIII., Angleterre, Roi, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henri, VIII., Roi d'Angleterre, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henri, VIII, King of England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henri, VIII, König von England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henri, VIII, Roi d'Angleterre, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henry VIII., König von England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henry, VIII., Angleterre, Roy, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henry, VIII., England, King, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henry, VIII., King of England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henry, VIII, King of England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henry, VIII, König von England, 1491-1547</persName> | ||
<persName type="variant" subtype="forenameFirst" source="DNB">Henry, VIII, Roi d'Angleterre, 1491-1547</persName> | ||
<birth source="VIAF">1491-06-28</birth> | ||
<death source="VIAF">1547-01-28</death> | ||
<note type="links"> | ||
<list type="links"> | ||
<item> | ||
<ref target="http://catalogue.bnf.fr/ark:/12148/cb11988809r"> | ||
<title>BNF</title> | ||
</ref> | ||
</item> | ||
<item> | ||
<ref target="http://d-nb.info/gnd/118548204"> | ||
<title>GND</title> | ||
</ref> | ||
</item> | ||
<item> | ||
<ref target="http://id.loc.gov/authorities/names/n79113093"> | ||
<title>LC</title> | ||
</ref> | ||
</item> | ||
<item> | ||
<ref target="http://www.idref.fr/027303608/id"> | ||
<title>SUDOC</title> | ||
</ref> | ||
</item> | ||
<item> | ||
<ref target="http://www.wikidata.org/entity/Q38370"> | ||
<title>Wikidata</title> | ||
</ref> | ||
</item> | ||
<item> | ||
<ref target="https://viaf.org/viaf/172419710"> | ||
<title>VIAF</title> | ||
</ref> | ||
</item> | ||
</list> | ||
</note> | ||
<note type="source">This record contains information from <ref target="http://viaf.org/">VIAF (Virtual International Authority File)</ref> which is made available under the <ref target="http://opendatacommons.org/licenses/by/1.0/">ODC Attribution License</ref>.</note> | ||
</person> | ||
|
||
|
||
</listPerson> | ||
</body> | ||
</text> | ||
</TEI> |
Oops, something went wrong.