Skip to content

Main content

TEI Milestone Unit Number Token Tool

Serialize one TEI milestone fragment with XML double-quoted attribute escaping.

Loading tool…

Description

Construct one escaped TEI milestone fragment.

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.

Construct one escaped TEI milestone fragment.

When to use this tool

Use TEI Milestone Unit Number Token when assembling the stated bounded TEI fragment or attribute set.

How to use the tool and how it works

  1. Enter unit, number. 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 fragment. Use the output convention below.

Construct one escaped TEI milestone fragment. Require an ASCII unit token beginning with a letter and XML 1.0-compatible number characters; escape ampersand, less-than, quotes and attribute whitespace before assembling the fragment.1

TEI milestones mark textual boundaries; the returned local fragment still needs the surrounding edition and its encoding policy.2

Input fieldMeaning and unitsAccepted input
unitASCII token beginning with a letter, followed by letters, digits or hyphen.Required. Text; maximum UTF-16 length 8192.
numberAttribute text satisfying XML 1.0 character constraints; XML-sensitive characters and attribute whitespace are escaped.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
fragmentOne escaped milestone element as text; namespace, TEI schema and document context are not supplied.Required. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "unit": "page",
    "number": "12r"
  },
  "output": {
    "fragment": "\u003cmilestone unit=\"page\" n=\"12r\"/>"
  }
}

Limitations and assumptions

  • No complete document, namespace, TEI schema validation or semantic milestone interpretation is provided.
  • 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.

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-milestone-unit-number-token — tool.io

  2. TEI P5: milestone — TEI Consortium

Similar or alternative tools