Open pletcher opened 2 months ago
Another approach is to allow duplicate location
s and order the blocks by offset
:
[...,
{ offset: n,
subtype: "paragraph",
location: ["1", "13", "2"],
text: "μετὰ δὲ τὴν ἐν Ἰταλίᾳ πληγὴν ... },
{ offset: n + 1,
location: ["1", "13", "2"],
subtype: "quote",
text: ""
},
{ offset: n + 2,
location: ["1", "13", "2"],
subtype: "line",
text: "τοὺς θυρεοὺς ὁ Μολοσσὸς Ἰτωνίδι δῶρον Ἀθάνᾳ"
},
// whenever the location changes, close all open tags?
{ offset: n + 3,
subtype: "paragraph",
location: ["1", "13", "3"],
text: "",
},
{ offset: n + 4,
location: ["1", "13", "3"],
subtype: "line",
text: "Πύρρος ἀπὸ θρασέων ἐκρέμασεν Γαλατᾶν,"
},
{ offset: n + 5,
location: ["1", "13", "3"],
subtype: "line",
text: "πάντα τὸν Ἀντιγόνου καθελὼν στρατόν. οὐ μέγα θαῦμα·"
},
...
]
But this presents problems as well, as it's not always clear when a block-level element should be closed.
This will enable block-level elements to nest properly.
Consider this excerpt from Pausanias (tlg0525.tlg001.perseus-grc2):
Section 1.13.3 begins in the middle of the quoted inscription, and the TEI markup has split it into two
<quote>
blocks.We want the
TextContainer
s to look something like this:The problem is that the lines in the quotations are not addressable by CTS URN, which breaks our current system of storing and applying annotations via URN.
It's basically trivial to do a depth-first reassembly of the plain strings, but then we lose the block-level definition that's encoded in the TEI.
Is there a syntax we can adopt to append to the locations that says, "Go to this block-level element in the
text
tree of this location"?Or is there a better way to solve this issue?