[sword-devel] SWORD, diatheke and a self-closing OSIS note element...
David Haslam
dfhdfh at protonmail.com
Fri Jun 19 08:49:45 EDT 2020
Hi everyone,
Today I was testing the updated HunUj module in CrossWire Beta and I came across an unusual anomaly in OSIS that almost escaped being detected.
If one gives the following command:
diatheke -b HunUj -b plain -k Gen.32.2
the output is
Genesis 32:2: Jákób is útnak indult, és találkoztak vele Isten angyalai. [
(HunUj)
"What's odd about that?" one might ask
It's perfectly normal but for the unepected [ at the end of the verse text.
Upon inspection using osis2mod, the verse text ends with an OSIS note...
$$$Genesis 32:2
Jákób is útnak indult, és találkoztak vele Isten angyalai.<note n="a" osisID="Gen.32.2!crossReference.a" osisRef="Gen.32.2" type="crossReference"/>
Observe closely, the OSIS note element is self-closing and therefore contains no note text or reference element.
Now imagine the module developer getting ready to submit the module. He runs the OSIS through XML syntax check and then proceeds to validate it to the OSIS schema. It passes both. The self-closing note element is perfectly valid OSIS even though it's semantically deficient.
Had I not noticed the anomalous [ in the diatheke output, this source text anomaly would have remained undetected.
So the question for SWORD developers is this: Why does diatheke plain text output include the ] ?
I'm not complaining. I'm glad that it behaved in this way, otherwise the OSIS anomaly would have completely passed us by.
There are no other similar anomalies elsewhere in the HunUj module.
I'd just like to understand better how exactly diatheke parses this peculiar construct and thus give the otherwise unexpected ]
The textual bug is very interesting to me, because I can think of no readily available utility whereby it could have been flagged up in the OSIS file. If you know of such an XML tool, we'd all benefit from you sharing your wisdom and experience.
Best regards,
David
Sent with ProtonMail Secure Email.
More information about the sword-devel
mailing list