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
- Enter quantity, unit, precision. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| quantity | Quantity | Required. Safe integer; minimum 0. |
| unit | Unit | Required. Text; maximum UTF-16 length 8192. |
| precision | exact omits precision; approximate adds precision="low". | Required. Text; one of "exact", "approximate"; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| attributes | Attribute text only, rather than a complete XML element. | Required. Text; maximum UTF-16 length 8192. |
{
"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
-
Calculation and input contract: digital-humanities/tei-gap-extent-unit-token — tool.io
-
TEI P5: gap — TEI Consortium
Similar or alternative tools
- TEI Milestone Unit Number Token
Construct one escaped TEI milestone fragment.
- TEI Locus Line Token
Split a locus-line reference at its final literal separator.