Skip to content

Main content

TEI Gap Extent Unit Token Tool

Format a bounded TEI gap extent attribute fragment from an explicit count, unit token and precision flag; no textual loss is inferred.

Loading tool…

Description

Return TEI gap-extent attribute text.

A TEI fragment combines XML syntax with editorial semantics. Escaping attribute text can produce a well-formed local fragment while leaving namespaces, schema requirements and the interpretation of a gap or milestone unresolved.

Return TEI gap-extent attribute text.

When to use this tool

Use TEI Gap Extent Unit Token when assembling the stated bounded TEI fragment or attribute set.

How to use the tool and how it works

  1. Enter quantity, unit, precision. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read attributes. Use the output convention below.

Return TEI gap-extent attribute text. Require nonnegative whole quantity, an ASCII unit token and precision exact or approximate; approximate adds the literal low-precision attribute, while exact omits it.1

A TEI gap records omitted transcription material. Extent attributes require an editorial explanation in the edition.2

Input fieldMeaning and unitsAccepted input
quantityQuantityRequired. Safe integer; minimum 0.
unitUnitRequired. Text; maximum UTF-16 length 8192.
precisionexact omits precision; approximate adds precision="low".Required. Text; one of "exact", "approximate"; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
attributesAttribute text only, rather than a complete XML element.Required. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "quantity": 3,
    "unit": "character",
    "precision": "exact"
  },
  "output": {
    "attributes": "quantity=\"3\" unit=\"character\""
  }
}

Limitations and assumptions

  • These attributes alone are not a complete TEI element or a verified editorial interpretation.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use a proper XML serializer and TEI schema validation for a complete edition, together with an explicit editorial policy.

References

  1. Calculation and input contract: digital-humanities/tei-gap-extent-unit-token — tool.io

  2. TEI P5: gap — TEI Consortium

Similar or alternative tools