[sword-devel] CzeCSP xref encoding error
DM Smith
dmsmith at crosswire.org
Thu Apr 10 07:58:13 MST 2014
Both are bad. See below.
On Apr 10, 2014, at 10:09 AM, Karl Kleinpaste <karl at kleinpaste.org> wrote:
> I got a Xiphos crash report this morning from someone using CzeCSP. The error is that there are xref encoding glitches that Sword fails to parse, which cause Xiphos to crash when trying to process them. Oops.
>
> The immediate glitch is fixed in Xiphos so as to avoid the crash. The underlying module problem is that there are many xrefs which have what I believe is an improper target.
>
> Good example:
> <note n="o308" osisID="Rom.7.11!o308" osisRef="Rom.7.11" type="crossReference">Gn 3,20</note>
This should be:
<note n="o308" osisID="Rom.7.11!o308" osisRef="Rom.7.11" type="crossReference"><reference osisRef="Gen.3.20">Gn 3,20</reference></note>
>
> Bad example:
> <note n="o305" osisID="Rom.7.8!o305" osisRef="Rom.7.8" type="crossReference">v. 11</note>
I think this should parse if given the basis of the current verse Romans 7.8. (Not that it does.) IIRC, the parser had special code to recognize v as a prefix for a verse number, but it may have been for 'v11' or 'v 11'.
But it should be:
<note n="o305" osisID="Rom.7.8!o305" osisRef="Rom.7.8" type="crossReference"><reference osisRef="Rom.7.11">v. 11</reference></note>
On a different note, the n="o305" is not appropriate. OSIS defines n as the value that should be shown for the footnote marker. Some front ends do this. It will look ugly.
>
> The xref target is not in BCV format. getEntryAttributes() returns nothingness for "v. 11", and in Xiphos' older code that eventually crawls down into a plain C interface to GTK, this propagates as NULL.
>
> So as I said, the crash is fixed. But I believe the example above is bad due to this target error. Am I correct?
IMHO: Yes it is bad.
-- DM
>
> $ mod2imp CzeCSP | grep '>v\.' | wc
> 2434 117012 1539356
>
> _______________________________________________
> 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/20140410/56947870/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140410/56947870/attachment.p7s>
More information about the sword-devel
mailing list