Skip to content

Commit

Permalink
Work on issue #6: constrain some attribute value lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
martindholmes committed Dec 29, 2024
1 parent 00dc1e5 commit 78ea707
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 26 deletions.
83 changes: 83 additions & 0 deletions tei/bbti.odd
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<attDef ident="evaluate" mode="delete"/>
</attList>
</classSpec>

<classSpec ident="att.anchoring" type="atts" mode="delete"/>
<classSpec ident="att.ascribed" type="atts" mode="delete"/>
<classSpec ident="att.breaking" type="atts" mode="delete"/>
Expand Down Expand Up @@ -118,7 +119,89 @@
<classSpec ident="att.witnessed" type="atts" mode="delete"/>
<classSpec ident="att.written" type="atts" mode="delete"/>

<elementSpec ident="state" mode="change">
<attList>
<attDef ident="type" mode="change">
<valList type="closed" mode="add">
<valItem ident="dateStates">
<gloss>A wrapper containing child <gi>state</gi>
elements relating to biographical or trading dates.</gloss>
</valItem>
<valItem ident="tradeStates">
<gloss>A wrapper containing child <gi>state</gi>
elements relating to trades (primary, secondary, non-book-related).</gloss>
</valItem>
<valItem ident="bioStart">
<gloss>A biographical start date</gloss>
</valItem>
<valItem ident="bioEnd">
<gloss>A biographical end date</gloss>
</valItem>
<valItem ident="tradeStart">
<gloss>A trade-related start date</gloss>
</valItem>
<valItem ident="tradeEnd">
<gloss>A trade-related end date</gloss>
</valItem>
<valItem ident="primaryTrade">
<gloss>(One of) a trader's primary trades</gloss>
</valItem>
<valItem ident="secondaryTrade">
<gloss>(One of) a trader's secondary trades</gloss>
</valItem>
<valItem ident="nonBookTrade">
<gloss>A trade not related to the book industry</gloss>
</valItem>
</valList>
</attDef>
<attDef ident="subtype" mode="change">
<valList type="closed" mode="add">
<valItem ident="b">
<gloss>A qualifier from the original relational database. We do not know what this means.</gloss>
</valItem>
<valItem ident="r">
<gloss>A qualifier from the original relational database. We do not know what this means.</gloss>
</valItem>
<valItem ident="s">
<gloss>A qualifier from the original relational database. We do not know what this means.</gloss>
</valItem>
<valItem ident="t">
<gloss>A qualifier from the original relational database. We do not know what this means.</gloss>
</valItem>
</valList>
</attDef>
</attList>
</elementSpec>

<elementSpec ident="idno" mode="change">
<attList>
<attDef ident="type" mode="change">
<valList type="closed" mode="add">
<valItem ident="BBTI">
<gloss>A BBTI numeric identifier, originally derived
from the relational database, and forming the final part of
the <att>xml:id</att> in TEI.</gloss>
</valItem>
<valItem ident="ORCID">
<gloss>An Open Researcher and Contributor ID (see
<ref target="https://orcid.org/">https://orcid.org/</ref>)</gloss>
</valItem>
<valItem ident="ISO-3166">
<gloss>A country or region code from the ISO-3166 family of standards</gloss>
</valItem>
<valItem ident="ISO-3166_Deleted">
<gloss>A now-deleted (but still useful) country or region code from the ISO-3166 family of standards</gloss>
</valItem>
<valItem ident="Feather">
<gloss>The identifier of an item in John Feather's bibliography</gloss>
</valItem>
<valItem ident="Chapman">
<gloss>The Chapman Code for a region or county</gloss>
</valItem>
</valList>
</attDef>
</attList>
</elementSpec>
</schemaSpec>
</body>
</text>
Expand Down
85 changes: 59 additions & 26 deletions tei/bbti.rng
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.tei-c.org/ns/1.0"><!--
Schema generated from ODD source 2024-12-29T01:39:44Z. .
Schema generated from ODD source 2024-12-29T01:58:07Z. .
TEI Edition: P5 Version 4.9.0a. Last updated on 27th December 2024, revision cd15f1132
TEI Edition Location: https://www.tei-c.org/Vault/P5/4.9.0a/
Expand Down Expand Up @@ -2875,31 +2875,23 @@ Sample values include: 1] main; 2] sub (subordinate); 3] alt (alternate); 4] sho
<ref name="att.typed.attribute.subtype"/>
<optional>
<attribute name="type">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">categorizes the identifier, for example as an ISBN, Social Security number, etc.
Suggested values include: 1] ISBN; 2] ISSN; 3] DOI; 4] URI; 5] VIAF; 6] ESTC; 7] OCLC</a:documentation>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">categorizes the identifier, for example as an ISBN, Social Security number, etc.</a:documentation>
<choice>
<value>ISBN</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">International Standard Book Number: a 13- or (if assigned prior to 2007) 10-digit identifying number assigned by the publishing industry to a published book or similar item, registered with the <a xmlns="http://www.w3.org/1999/xhtml"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
href="https://www.isbn-international.org"> International ISBN Agency.</a>
</a:documentation>
<value>ISSN</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">International Standard Serial Number: an eight-digit number to uniquely identify a serial publication.</a:documentation>
<value>DOI</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">Digital Object Identifier: a unique string of letters and numbers assigned to an electronic document.</a:documentation>
<value>URI</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">Uniform Resource Identifier: a string of characters to uniquely identify a resource, following the syntax of <a xmlns="http://www.w3.org/1999/xhtml"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
href="https://datatracker.ietf.org/doc/html/rfc3986">RFC 3986</a>.</a:documentation>
<value>VIAF</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">A data number in the Virtual Internet Authority File assigned to link different names in catalogs around the world for the same entity.</a:documentation>
<value>ESTC</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">English Short-Title Catalogue number: an identifying number assigned to a document in English printed in the British Isles or North America before 1801.</a:documentation>
<value>OCLC</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">OCLC control number (record number) for the union catalog record in WorldCat, a union catalog for member libraries in the Online Computer Library Center global cooperative.</a:documentation>
<data type="token">
<param name="pattern">[^\p{C}\p{Z}]+</param>
</data>
<value>BBTI</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A BBTI numeric identifier, originally derived
from the relational database, and forming the final part of
the xml:id in TEI.) </a:documentation>
<value>ORCID</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(An Open Researcher and Contributor ID (see
https://orcid.org/)) </a:documentation>
<value>ISO-3166</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A country or region code from the ISO-3166 family of standards) </a:documentation>
<value>ISO-3166_Deleted</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A now-deleted (but still useful) country or region code from the ISO-3166 family of standards) </a:documentation>
<value>Feather</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(The identifier of an item in John Feather's bibliography) </a:documentation>
<value>Chapman</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(The Chapman Code for a region or county) </a:documentation>
</choice>
</attribute>
</optional>
Expand Down Expand Up @@ -3729,7 +3721,48 @@ Suggested values include: 1] ISBN; 2] ISSN; 3] DOI; 4] URI; 5] VIAF; 6] ESTC; 7]
<ref name="att.global.attributes"/>
<ref name="att.datable.attributes"/>
<ref name="att.dimensions.attributes"/>
<ref name="att.typed.attributes"/>
<optional>
<attribute name="type">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">characterizes the element in some sense, using any convenient classification scheme or typology.</a:documentation>
<choice>
<value>dateStates</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A wrapper containing child state
elements relating to biographical or trading dates.) </a:documentation>
<value>tradeStates</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A wrapper containing child state
elements relating to trades (primary, secondary, non-book-related).) </a:documentation>
<value>bioStart</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A biographical start date) </a:documentation>
<value>bioEnd</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A biographical end date) </a:documentation>
<value>tradeStart</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A trade-related start date) </a:documentation>
<value>tradeEnd</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A trade-related end date) </a:documentation>
<value>primaryTrade</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">((One of) a trader's primary trades) </a:documentation>
<value>secondaryTrade</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">((One of) a trader's secondary trades) </a:documentation>
<value>nonBookTrade</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A trade not related to the book industry) </a:documentation>
</choice>
</attribute>
</optional>
<optional>
<attribute name="subtype">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(subtype) provides a sub-categorization of the element, if needed.</a:documentation>
<choice>
<value>b</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A qualifier from the original relational database. We do not know what this means.) </a:documentation>
<value>r</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A qualifier from the original relational database. We do not know what this means.) </a:documentation>
<value>s</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A qualifier from the original relational database. We do not know what this means.) </a:documentation>
<value>t</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(A qualifier from the original relational database. We do not know what this means.) </a:documentation>
</choice>
</attribute>
</optional>
<empty/>
</element>
</define>
Expand Down

0 comments on commit 78ea707

Please sign in to comment.