[sword-devel] SWORD, diatheke and a self-closing OSIS note element...

David Haslam dfhdfh at protonmail.com
Sat Jun 20 14:01:03 EDT 2020


Thanks, Peter.

Created API-241 as requested.
Unable to assign your username to the issue. You weren’t listed.

I will add something to the wiki page OSIS 211 CR.

Grab a copy of the HunUj module for testing before it’s updated.

David

Sent from ProtonMail Mobile

On Sat, Jun 20, 2020 at 18:16, refdoc at gmx.net <refdoc at gmx.net> wrote:

> Fixing the filter should be done to avoid the picture, and I can likely do that asap, particularly in light of Troy's announcement. Please though file a bug against the engine (not diatheke) , the likely source of the problem is in the osisplain filter. And file a further bug against the scheme, which will stay until that is fixed even once the engine does not produce bad output anymore
>
> Thanks
>
> Peter
>
> Sent from my mobile. Please forgive shortness, typos and weird autocorrects.
>
> -------- Original Message --------
> Subject: Re: [sword-devel] SWORD, diatheke and a self-closing OSIS note element...
> From: Greg Hellings
> To: David Haslam ,SWORD Developers' Collaboration Forum
> CC:
>
>> 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/5841a512/attachment.html>


More information about the sword-devel mailing list