Importing existing files
Import in the toolbar reads a TEI-XML file (.xml, .tei) or a plain text file
(.txt) and replaces the current document with it.
TEI-XML
Section titled “TEI-XML”The body of the document is converted to shorthand, which you then edit as usual:
- line breaks become
//; - page breaks
///; - each paragraph starts with
.p; - and so on for the other constructs.
Lemmas, analyses and normalized forms in the file are taken over, and its header is read into the metadata editor.
An imported document is marked Imported in the editor header. In this mode, the original file is kept and only edited passages are rewritten when the document is saved or exported.
What is written back
Section titled “What is written back”- Everything you have not edited is written out exactly as it was, byte for byte, including the header, comments, namespaces and markup the shorthand cannot express.
- Changes that do not affect the encoding — whitespace in the shorthand, for instance — do not change the file.
- Lemmas confirmed in Saga-Scribe are written into the words’
lemmaandme:msa(ormsa) attributes; a changed normalized form is written into the word’s<me:norm>. Removing a lemma removes these attributes. - Notes and other annotations are kept in the project only, since they would add markup the file does not have.
- A paragraph can be split by adding
.pand joined by removing one. A split has to fall between elements such as sentences (<s>), not inside one. - If the shorthand contains an error, the document is not saved or exported, rather than written incomplete.
Editing imported words
Section titled “Editing imported words”Words from the file keep their identity as you edit around them. Deleting or editing one of two identical neighbouring words changes that word, not whichever one a comparison guesses.
If you edit an imported word slightly — a typo fix, changing at most half its letters — its lemma, analysis and hand-curated normalized form are kept, and the diplomatic form follows the edit. The word is underlined in the previews and flagged edited in the word panel until the document is re-imported, as a reminder to check the analysis against the new spelling.
Round-trip guarantees
Section titled “Round-trip guarantees”The behaviour above is deliberate, not incidental. Unedited content is emitted byte-for-byte; the importer records the source span of every tag and the patcher splices edits into the original bytes. The project treats this as a guarantee and tests it, including a round trip of a complete MENOTA manuscript.
See Round-trip guarantees for the full list and the tests behind it.
Plain text
Section titled “Plain text”The text is placed in the editor as it is. Add line and page breaks and other markers by hand. Plain text carries no structure, lemmas or metadata, so the import only saves you the copy-and-paste step.
