<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>The Hopper ledgers: the TEI customisation this corpus uses</title>
        <author>Commutator</author>
      </titleStmt>
      <publicationStmt>
        <publisher>Commutator</publisher>
        <availability status="free">
          <p>CC0 1.0 Universal. This file is the maintainers' own work; see
             LICENSE and RIGHTS.md. It describes the encoding of transcriptions
             whose text is not the maintainers' — see transcripts/NOTICE.</p>
        </availability>
      </publicationStmt>
      <sourceDesc>
        <p>Written against the export produced by
           <ref target="../scripts/tei.mjs">scripts/tei.mjs</ref> from the
           <ref target="../transcripts/">transcriptions</ref>, which are the
           source of record.</p>
      </sourceDesc>
    </fileDesc>
    <encodingDesc>
      <p>An ODD, in the ordinary sense: one document from which the schema and
         the documentation of this customisation are both derived.</p>
    </encodingDesc>
  </teiHeader>

  <text>
    <body>

      <div>
        <head>What this declares, and why a subset is the honest form</head>

        <p>TEI P5 has some six hundred elements. This corpus uses fifty-eight,
           and the fifty-eight are not a sample of the six hundred: they are the
           exact reach of a mechanical conversion from a small set of LaTeX
           macros. Every element here exists because a macro in the
           transcriptions maps onto it, and the mapping is one to one — the
           table in <ref target="../scripts/tei.mjs">scripts/tei.mjs</ref> is
           the whole of it. Nothing in the export is a judgement the .tex did
           not already make.</p>

        <p>Publishing the subset matters more here than the usual reason. A
           reader who is handed a TEI file with no customisation has been told
           that six hundred elements are possible and that none of them is
           promised, which is a way of saying nothing. The list below is a
           promise: these elements and no others, these attribute values and no
           others, and a build that breaks the promise fails rather than
           quietly widening it. <ref target="../scripts/tei-validate.mjs">
           scripts/tei-validate.mjs</ref> reads this file and enforces it
           against the export on every run, in both directions — an element
           used and not declared is an error, and an element declared and used
           nowhere is an error too, because a declaration nobody has read is a
           claim about the corpus that is not true.</p>

        <p>The customisation is a pure subset. It removes; it adds nothing, it
           renames nothing, and it changes no content model. So a file from this
           corpus is valid against TEI P5 unmodified — which is the property
           that makes the export worth depositing — and the subset is a
           statement about what a consumer will actually meet, not a dialect
           they would have to learn.</p>
      </div>

      <div>
        <head>The one thing that could not be reconstructed without it</head>

        <p>These are two hands. Edward Hopper drew the record sketches and
           wrote the dimensions; Josephine Hopper wrote everything else, over
           fifty-four years, in four or five hands of her own that are datable.
           Which hand wrote a line is a reading — it is made by looking at the
           sheet, it is recorded in <gi>hand</gi> in the .tex, and it is the one
           part of the transcription that <emph>could not be recovered from the
           photographs by somebody else</emph> without doing the whole work
           again.</p>

        <p>TEI has carried the notion of a hand since P3. That is the reason
           this export exists at all: <gi>handNote</gi> and <att>hand</att> on
           <gi>seg</gi> carry the attributions out of this repository and into a
           format that will outlive it. Everything else in the subset is there
           to hold them up.</p>
      </div>

      <div>
        <head>The customisation</head>

        <schemaSpec ident="hopper" start="TEI" prefix="tei_"
                    source="https://www.tei-c.org/Vault/P5/4.12.0/xml/tei/odd/p5subset.xml">

          <!-- Infrastructure. Not optional and not a choice. -->
          <moduleRef key="tei"/>

          <!-- The document, the leaves, and the divisions the leaves make. -->
          <moduleRef key="textstructure" include="TEI body div text"/>

          <!-- The reading itself: what is illegible, what is doubtful, what is
               struck, what the transcriber says about it, and the tags. -->
          <moduleRef key="core"
                     include="author bibl date del gap head hi item lb list name note p pb
                              publisher resp respStmt term title unclear"/>

          <!-- Provenance: the model that read the sheets, the date, the
               accession number, the rights, the facets. -->
          <moduleRef key="header"
                     include="availability catDesc category change classDecl edition editionStmt
                              editorialDecl encodingDesc fileDesc handNote idno keywords
                              profileDesc publicationStmt revisionDesc sourceDesc taxonomy
                              teiHeader textClass titleStmt"/>

          <!-- The object at the Whitney, as the museum identifies it. -->
          <moduleRef key="msdescription"
                     include="history institution msDesc msIdentifier origDate origin"/>

          <!-- The ruled tables, which are most of what these books are, and the
               record sketches and pasted clippings that stand beside them. -->
          <moduleRef key="figures" include="cell figure row table"/>

          <!-- The hand attributions. -->
          <moduleRef key="transcr" include="handNotes supplied"/>
          <moduleRef key="linking" include="seg"/>

          <!-- The closed value lists. These are the part a consumer can rely
               on: a `@type` here is drawn from a list, not invented per file.
               They are declared `closed`, and the validator refuses a value
               outside them rather than letting the vocabulary drift one
               transcription at a time. -->

          <elementSpec ident="div" module="textstructure" mode="change">
            <attList>
              <attDef ident="type" mode="change" usage="req">
                <desc>What the division is on the page.</desc>
                <valList type="closed">
                  <valItem ident="leaf">
                    <desc>One leaf of the ledger, headed as the transcription
                       heads it. A leaf is the unit the Hoppers numbered.</desc>
                  </valItem>
                  <valItem ident="part">
                    <desc>A division within a leaf that is not a work — a run of
                       entries the transcription sets apart under its own
                       heading.</desc>
                  </valItem>
                  <valItem ident="work">
                    <desc>The record of one work, which is what a leaf of the
                       paintings books is organised around.</desc>
                  </valItem>
                  <valItem ident="entry">
                    <desc>One entry of a notebook, headed by its date as
                       written; the date the transcriber assigns it is the
                       <att>when</att> of the <gi>date</gi> in the head. The
                       notebooks only.</desc>
                  </valItem>
                </valList>
              </attDef>
            </attList>
          </elementSpec>

          <!-- A doubtful reading against an offered one. `low` is the only
               value: the distinction is binary, and a scale of five would be
               five ways of saying the same two things. -->
          <elementSpec ident="unclear" module="core" mode="change">
            <attList>
              <attDef ident="cert" mode="change" usage="opt">
                <valList type="closed" mode="replace">
                  <valItem ident="low">
                    <desc>Offered rather than read: the transcriber proposes a
                    reading without having read it.</desc>
                  </valItem>
                </valList>
              </attDef>
            </attList>
          </elementSpec>

          <elementSpec ident="figure" module="figures" mode="change">
            <attList>
              <attDef ident="type" mode="change" usage="req">
                <desc>What is on the paper that is not writing. Neither is
                   reproduced here: the export records that it is there and
                   what the transcriber saw in it.</desc>
                <valList type="closed">
                  <valItem ident="record-sketch">
                    <desc>Edward Hopper's ink drawing of the finished work, made
                       for the record.</desc>
                  </valItem>
                  <valItem ident="clipping">
                    <desc>A cutting pasted to the leaf — a review, a
                       photograph, a dealer's notice.</desc>
                  </valItem>
                </valList>
              </attDef>
            </attList>
          </elementSpec>

          <elementSpec ident="head" module="core" mode="change">
            <attList>
              <attDef ident="type" mode="change" usage="opt">
                <valList type="closed">
                  <valItem ident="work">
                    <desc>The heading is the title of a work as the ledger
                       writes it, and not the transcriber's description of a
                       leaf.</desc>
                  </valItem>
                </valList>
              </attDef>
            </attList>
          </elementSpec>

          <elementSpec ident="note" module="core" mode="change">
            <attList>
              <attDef ident="type" mode="change" usage="opt">
                <desc>Present on the transcriber's own notes and absent on the
                   book's. The distinction is the point: a note with
                   <att>place</att> of <val>margin</val> is something written on
                   the leaf, and an <val>editorial</val> note is not.</desc>
                <valList type="closed">
                  <valItem ident="editorial">
                    <desc>The transcriber's observation about the leaf.</desc>
                  </valItem>
                </valList>
              </attDef>
            </attList>
          </elementSpec>

          <elementSpec ident="hi" module="core" mode="change">
            <attList>
              <attDef ident="rend" mode="change" usage="opt">
                <desc>How the writing appears. The three typographic values
                   carry the transcription's own emphasis; the three inks
                   record the colour on the leaf, which in Book IV is its
                   status field — charges black, receipts red, sums pencil —
                   and is recorded as what is on the paper, not as what it
                   means. Black is unmarked.</desc>
                <valList type="closed">
                  <valItem ident="italic"/>
                  <valItem ident="bold"/>
                  <valItem ident="mono"/>
                  <valItem ident="ink-red"/>
                  <valItem ident="ink-pencil"/>
                  <valItem ident="ink-blue"/>
                </valList>
              </attDef>
            </attList>
          </elementSpec>

          <elementSpec ident="row" module="figures" mode="change">
            <attList>
              <attDef ident="rend" mode="change" usage="opt">
                <desc>A rule the writer drew across the money column above
                   this row's figure — her own line under the items she is
                   about to sum. Present only where the leaf has it.</desc>
                <valList type="closed">
                  <valItem ident="rule-above"/>
                </valList>
              </attDef>
            </attList>
          </elementSpec>

          <elementSpec ident="term" module="core" mode="change">
            <attList>
              <attDef ident="type" mode="change" usage="opt">
                <desc>The facet the tag declares, from the taxonomy each file's
                   header carries. A tag that declares none is a tag and not a
                   classification, and the attribute is then absent rather than
                   empty.</desc>
                <valList type="closed">
                  <valItem ident="medium"/>
                  <valItem ident="place"/>
                  <valItem ident="work"/>
                  <valItem ident="person"/>
                  <valItem ident="dealer"/>
                  <valItem ident="collection"/>
                  <valItem ident="society"/>
                  <valItem ident="publication"/>
                  <valItem ident="prize"/>
                  <valItem ident="client"/>
                  <valItem ident="subject"/>
                  <valItem ident="feature"/>
                </valList>
              </attDef>
            </attList>
          </elementSpec>

        </schemaSpec>
      </div>

      <div>
        <head>Generating the schema from this file</head>

        <p>This ODD is the source. The RELAX NG schema for the subset is
           derived from it, and is not kept in the repository, for the same
           reason no other derived file is kept: a copy that can drift from its
           source will.</p>

        <p>To generate it, use the TEI's own stylesheets — Roma, at
           <ref target="https://roma.tei-c.org/">roma.tei-c.org</ref>, or
           OxGarage, or <code>teitorelaxng</code> from the
           <code>tei-xsl</code> package:</p>

        <p><code>teitorelaxng --localsource=p5subset.xml tei/hopper.odd hopper.rng</code></p>

        <p>Continuous integration does not run that step, and the reason is
           worth stating rather than hiding. Generating a schema from an ODD
           needs an XSLT 3.0 processor and the TEI stylesheet library — Saxon
           and some forty megabytes of XSL — to produce a schema whose only job
           would be to re-state constraints that
           <ref target="../scripts/tei-validate.mjs">scripts/tei-validate.mjs</ref>
           already checks directly against this file, in seconds, with no
           network. What CI does run is the part that cannot be shortcut:
           every exported file, and this ODD itself, validated against
           unmodified TEI P5 4.12.0 with <code>xmllint --relaxng</code>.</p>

        <p>So the chain is: TEI P5 validity, proved against the Consortium's own
           schema at a pinned version and a checked digest; and subset
           conformance, proved against this file. A generated
           <code>hopper.rng</code> would sit between the two and prove neither
           of them again.</p>
      </div>

      <div>
        <head>What this rests on</head>

        <listBibl>
          <bibl><author>TEI Consortium</author>. <title level="m">TEI P5:
             Guidelines for Electronic Text Encoding and Interchange</title>,
             version 4.12.0, 28 July 2026.
             <ref target="https://www.tei-c.org/Vault/P5/4.12.0/">
             www.tei-c.org/Vault/P5/4.12.0/</ref>. The version this corpus is
             validated against, by the Vault URL rather than the moving
             one.</bibl>
          <bibl><author>Rahtz, Sebastian</author> and
             <author>Burnard, Lou</author>. <title level="a">Reviewing the TEI
             ODD System</title>. In <title level="m">DocEng '13: Proceedings of
             the 2013 ACM Symposium on Document Engineering</title>,
             pp. 193–196. New York: ACM, 2013.
             <ref target="https://doi.org/10.1145/2494266.2494321">
             doi:10.1145/2494266.2494321</ref>. The account of the mechanism
             this file uses, by the two people who built it.</bibl>
          <bibl><author>Wilkinson, Mark D.</author>, et al. <title level="a">The
             FAIR Guiding Principles for scientific data management and
             stewardship</title>. <title level="j">Scientific Data</title> 3,
             160018 (2016).
             <ref target="https://doi.org/10.1038/sdata.2016.18">
             doi:10.1038/sdata.2016.18</ref>. Assessed against, and departed
             from in two places on purpose — see
             <ref target="../docs/fair.md">docs/fair.md</ref>.</bibl>
        </listBibl>

        <p>One reference was carried for a while and is not here, because it
           does not exist: a book by Sebastian Rahtz called <title level="m">
           Digital Humanities: Tools and Methods</title>. Searching his
           bibliography turns up no such title. What he actually built is the
           thing this customisation stands on — the TEI stylesheets, OxGarage,
           and the ODD processing chain — and the paper above is where he and
           Burnard describe it. <emph>A plausible citation is worse than
           none</emph>, and this project would rather say what it checked.</p>
      </div>

    </body>
  </text>
</TEI>
