Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

File Identifier

The unique, immutable key by which an IbiScript/BEDA text is referenced from other texts. It is mandatory and produces no text.

Syntax

A key, preceded by the reserved word id and a colon :, enclosed within two dollar signs $…$. A trailing semicolon ; before the closing dollar sign is allowed and optional.

The key consists exclusively of Latin letters, digits, underscore _, hyphen - and full stop ., and cannot start with a digit. This character set is chosen because:

  • every valid key is directly a valid xml:id, and so is exported without transformation;
  • none of the characters coincides with a delimiter of the notation (: ; / # @ = ,), so a key is never ambiguous inside a locus reference.

Overview

NotationSimplified ASTPaper Output
$id:ιₖ$Id {key: ιₖ}ιₚ
  • ιₖ is the file key, of type BedaKey.
  • ιₚ is the permitted position: only at the outermost level of the file, once.

Rules

  • Mandatory and unique. Every file declares exactly one $id:. Tools that aggregate several files (such as the lexicon builder) reject files without an identifier and files that declare more than one.
  • Outermost level only. An $id: cannot appear inside other units. By convention it is the first line of the file.
  • Unique within the project. Two files of the same corpus cannot share a key. Tools report the error, naming the two conflicting files.
  • Immutable. The key is the target of other texts’ locus references: changing it invalidates them. It should be chosen with care and not derived from data likely to change.
  • Reserved prefixes. Keys starting with gen-, app-, surface- or region- are reserved, because the same prefixes are used by the EpiDoc export for the identifiers it generates automatically within the document.

Distinction

The $id: identifies the encoding and is distinct from the metadata of the object declared with $beda::

$id:$beda: idno
IdentifiesThis encoding fileThe ancient object or text (its classification)
How many per fileExactly onePossibly several, with alternative identifiers
May it change?No: it is a citation targetYes: it depends on the catalogue
Used forReferences between textsDescription and classification

Export

FormatRendering
EpiDocxml:id of the <TEI> root element and <idno type="beda"> in publicationStmt. The key is inserted by the document assembler, not by the inscription text.
HTMLOn the wrapper element: id="beda-key" and data-beda-id="key". No visible content. Not emitted for inline fragments.
Unicode, TypstNo text produced.
IbiScriptWritten back unchanged in formatted and minified source.

Inside a fragment (the ibi macro in EpiDoc) an $id: is not allowed, because the fragment is embedded in a document that already has its own identity.

Examples

NotationPaper Output
$id: pyrgi-1$
$id: paikuli.A1$
$id: pde.paikuli-d2-mp;$
$id: pyrgi-2$
$beda: idno = 6315;$

EpiDoc Outputs

NotationEpiDoc (XML)
$id: pyrgi-1$
<ab>
</ab>
$id: paikuli.A1$
<ab>
</ab>
$id: pde.paikuli-d2-mp;$
<ab>
</ab>
$id: pyrgi-2$
$beda: idno = 6315;$
<ab>
</ab>

Structural Analysis (Conceptual AST)

NotationAST
$id: pyrgi-1$
Id(pyrgi-1)
$id: paikuli.A1$
Id(paikuli.A1)
$id: pde.paikuli-d2-mp;$
Id(pde.paikuli-d2-mp)
$id: pyrgi-2$
$beda: idno = 6315;$
Id(pyrgi-2)
NL
Beda
  → idno: "6315"