[sword-devel] failure to produce OSIS lemma without strong's

Karl Kleinpaste karl at kleinpaste.org
Sun Mar 26 18:45:18 MST 2017


The problem with OSIS failure to display lemmatization unless Strong's
is also selected is because of line 73 in osisxhtml.cpp:

    70  void processLemma(bool suspendTextPassThru, XMLTag &tag, SWBuf
&buf) {
    71          const char *attrib;
    72          const char *val;
    73          if ((attrib = tag.getAttribute("lemma"))) {
    74                  int count = tag.getAttributePartCount("lemma", ' ');

Picking on the first word of Tisch Matt.1.1 with diatheke -f xhtml in
gdb, when Strong's is selected with lemmatization (-o nl), then "tag" is
found in processLemma() as
    "w lemma=\"strong:G976 lemma.Strong:βιβλος lemma.ANLEX:βιβλος\" 
wn=\"001\""
whereas lemmatization alone (-o l) gives "tag" showing
    "w  savlm=\"strong:G976 lemma.Strong:βιβλος lemma.ANLEX:βιβλος\"" 

Note "lemma" -vs- "savlm". For -o l, line 70 causes the entire effort to
be skipped.

I've attached a somewhat ham-handed patch which handles the needed case,
but it has the fatal side effect that it produces lemmatization even
when neither strong's nor lemmatization is wanted.

Could someone who deals adequately with filter flow take a further look
and offer a working solution?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20170326/913822c1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osisxhtml.diff
Type: text/x-patch
Size: 1329 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20170326/913822c1/attachment.bin>


More information about the sword-devel mailing list