Test repository for a new proposal for TEI
- Able to say what unit it's refering to
- Flexible way of treating citations patterns (regex probably)
- Hierarchical and able to deal with mixed kind of contents
- Easy enough to parse so that you can extract a table of contents or list of passage references from your document
- Able to provide a passage name as well as an identifier
- Able to provide different refsDecl depending on the objective
(example constructed for https://github.com/sjhuskey/Calpurnius_Siculus/blob/master/editio.xml)
<encodingDesc>
<refsDecl type="canonical">
<tocItem
unit="front"
discover="//front/div[@type='introduction']/div[@type='section']"
matchPattern="Introduction (\w+)"
xPathPattern="//front/div[@type='introduction']/div[@type='section'][@n='$1']"
>
<metadataDecl type="dc:title" xPathPattern=".//head" />
<metadataDecl type="dc:author" xPathPattern="./persName[@type='author']" />
</tocItem>
<tocItem
unit="poem"
discover="//body/div[@type='edition']/div[@type='textpart']"
matchPattern="(\d)"
xPathPattern="//body/div[@type='edition']/div[@type='textpart'][@n='$1']"
>
<tocItem
unit="line"
discover=".//l[parent::div or parent::lem]"
matchPattern="(\d)\.(\d+)"
xPathPattern="//body/div[@type='edition']/div[@type='textpart'][@n='$1]//l[parent::div or parent::lem][@n='$2']"
>
</tocItem>
</tocItem>
</refsDecl>
</encodingDesc>
- Satisfies #1 with
@unit
on refState - Satisfies #2 with a
@matchPattern
insidetocPattern
- Satisfies #3 with nested
tocPattern
. RefStates at the same level should be considered alternates. - Satisfies #4 with
@discover
and@use
. Nested@discover
es use relative XPaths. - Satisfies #5 with
metadataDecl
which provides an@xPathPattern
and a@type
for metadata plurality (epistolary exchange can have different authors, dates, etc.) - Statisfies #6 with
@type
onrefsDecl
- TODO: algorithm for generating passage IDs at any level using the example.