hcayless / P3-processing

1 stars 2 forks source link

Addition of xml:id to lb tags in text divs #47

Open jcowey opened 2 years ago

jcowey commented 2 years ago

As it is at present the conversion produce the following:

https://github.com/hcayless/P3-processing/blob/main/articles/Claytor_Receipt_Didrachmia_Souchos/Claytor_Receipt_Didrachmia_Souchos.xml#L346-L354

            <div xml:id="ed1" xml:lang="grc" type="edition" xml:space="preserve">
<ab>
<lb n="1"/><gap reason="lost" extent="unknown" unit="line"/>
<lb n="1"/>Θρασύμαχος Μέλανος <expan>Μαρωνε<ex>ὺς</ex></expan>
<lb n="2"/>Πτολεμαίωι τῶι καὶ Πεθεῖ
<lb n="3"/><expan>π<supplied reason="lost">ρ</supplied><unclear>ε</unclear>σβ<ex>υτέρῳ</ex></expan> Πε<unclear>θ</unclear>έω<unclear>ς</unclear> <expan>χα<ex>ίρειν</ex></expan>. <expan>διαγέγρα<ex>φας</ex></expan> <unclear>τ</unclear>ὴν
<lb n="4"/><expan><unclear>διδ</unclear>ραχμί<ex>αν</ex></expan> τοῦ Σούχου θεοῦ <expan>μεγάλ<ex>ου</ex></expan> 
<lb n="5"/>μ<unclear>εγ</unclear>άλου ἧς ἐώνησαι κα<unclear>μ</unclear>άρας
<lb n="6"/>ἣ <unclear>ἦ</unclear>ν πρότερον ἐλαιούργιον

In order to cut out manual changing for the requirements of the GitLab XML in Heidelberg changes would be great. The XML used to produce the HTML of the article in question is as follows:

https://github.com/jcowey/P3/blob/master/pylon_1/89346.xml#L389-L397

            <div xml:id="ed1" xml:lang="grc" type="edition" xml:space="preserve">
<ab>
<lb n="1"/><gap reason="lost" extent="unknown" unit="line"/>
<lb n="1" xml:id="ed1ln1"/>Θρασύμαχος Μέλανος <expan>Μαρωνε<ex>ὺς</ex></expan>
<lb n="2" xml:id="ed1ln2"/>Πτολεμαίωι τῶι καὶ Πεθεῖ
<lb n="3" xml:id="ed1ln3"/><expan>π<supplied reason="lost">ρ</supplied><unclear>ε</unclear>σβ<ex>υτέρῳ</ex></expan> Πε<unclear>θ</unclear>έω<unclear>ς</unclear> <expan>χα<ex>ίρειν</ex></expan>. <expan>διαγέγρα<ex>φας</ex></expan> <unclear>τ</unclear>ὴν
<lb n="4" xml:id="ed1ln4"/><expan><unclear>διδ</unclear>ραχμί<ex>αν</ex></expan> τοῦ Σούχου θεοῦ <expan>μεγάλ<ex>ου</ex></expan> 
<lb n="5" xml:id="ed1ln5"/>μ<unclear>εγ</unclear>άλου ἧς ἐώνησαι κα<unclear>μ</unclear>άρας
<lb n="6" xml:id="ed1ln6"/>ἣ <unclear>ἦ</unclear>ν πρότερον ἐλαιούργιον

See the next comment for the changes requested.

jcowey commented 2 years ago

Please take the xml:id with its value as found in the div @type="edition" and suffix it with the letters ln followed without space by the value of the n tag for each lb.

I have removed the xml:ids when followed by <gap reason="lost" extent="unknown" unit="line"/> but that does not have to be written into the code.

lmaylein commented 2 years ago

Alternatively, we could put that in our pipeline.