[sword-devel] SWORD, diatheke and a self-closing OSIS note element...
Greg Hellings
greg.hellings at gmail.com
Sat Jun 20 11:07:49 EDT 2020
I believe that we can mandate, through the schema, that a tag not be self
closing. If the schema really permits that, it can be prevented at that
level if deemed necessary. If it's not appropriate to prevent an empty
note, then we need to update the filter to at least close the brackets when
it's a self closing tag.
On Fri, Jun 19, 2020, 07:50 David Haslam <dfhdfh at protonmail.com> wrote:
> 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.
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20200620/55ce1f49/attachment.html>
More information about the sword-devel
mailing list