[sword-devel] Misplaced <div> tags in OSIS

Greg Hellings greg.hellings at gmail.com
Fri Aug 29 14:16:57 MST 2008


So I'm continuing to toy around with the mod2osis changes.  It looks
like the round-trip module-OSIS-module is working properly for Bible
modules (OSIS-module-OSIS round-trip is extremely close) with the
exception of Psalm 119 section headers, which appear to be beyond the
scope of mod2osis to fix.  IIRC, DM's description of the import tools
indicates that this material is prefixed onto the verse, since there
is no provision in the engine for verse-heading information.

However, at the end of each of the epistles of Paul, plus the epistle
to the Hebrews, the OSIS that is produced by the engine is malformed.
In each of those books, the final chapter has a <div> tag which is
placed within the chapter, but outside of the last verse.  This has
been taken by the importer and appended to the value of the verse.
The result, on output, is a <verse> element with a <div> element
inside of it.  The importer claims that this is malformed OSIS, but it
doesn't choke and still produces identical module data from it.  Are
there options I could use to the engine to pull this information out
and place it in its proper location?  It's not a footnote, etc, so
using those options would not likely produce any desirable results.
Unless the OSIS filters have some sort of option to pull that text out
(and presuming the importer is correct that the construct is malformed
OSIS), the only way to rectify the situation is to parse the verse
text for a <div> tag, correct?

Unless this is deemed an unnecessary update, it is the only thing
standing in the way of being able to round-trip modules which began
life as OSIS documents.  My next chore will then be to expand the
ability to handle modules which came in a different format.

--Greg



More information about the sword-devel mailing list