[sword-devel] osis2mod changes for Words of Christ and container elements
dmsmith555 at yahoo.com
Thu Sep 11 12:44:53 MST 2008
Greg Hellings wrote:
> DM, two questions:
> On Thu, Sep 11, 2008 at 1:57 PM, DM Smith <dmsmith555 at yahoo.com> wrote:
>> Added #define INCLUDE_TAGS to include all tags.
>> Currently osis2mod preserves text and most tags.
>> This would include all tags and their attributes, but it is
>> turned off.
> Why did you turn this off by default? I would presume it might break
> output with filters which are not currently set to strip out this
> extra tagset - was that your reason?
It preserves prior behavior.
That behavior is that <verse>, </verse>, <chapter>, </chapter> and <div
type="book"> are not included in the module.
>> One thing to note, I've used "genX" as the sID/eID value (where X is
>> unique to the pair). This allows for reverse engineering in mod2osis.
> What is the value placed in X?
osis2mod starts with 1 and every time an sID is created, osis2mod use
the next number.
A stack is used to find the corresponding end tag and when it is found,
the top element is changed from sID to eID and output.
> Recreating in mod2osis should be
> relatively straightforward if my formulated thoughts on how you
> described it are accurate. However, there would need to be some
> indication from the Sword library that we're entering a new
> section/paragraph. I don't believe mod2osis currently looks for any
> such information. Finding those locations seems almost like it would
> fall to the filters to have direct access to the module data,
> especially for a section which might be placed before the start
> milestone for version book.1.1 or book.0.0, etc.
I haven't looked at mod2osis. If the module is already osis, then there
is no need for filters. A simple loop over all keys calling getRawText
and transforming that should be nearly sufficient.
You might want to have two routines, one for OSIS modules and one for
More information about the sword-devel