[sword-devel] Titles and other Inter-verse material

DM Smith dmsmith at crosswire.org
Tue Jul 24 05:32:19 MST 2012


On Jul 24, 2012, at 5:45 AM, David Haslam wrote:

> Quite so!
> 
> Ignoring titles and all other preverse content for the purpose of this
> reply, I still find it strange that the only placement of the paragraph
> elements (in relation to verse eID and sID milestones) that works
> empirically without causing widowed verse tags (in at least one front-end)
> is as follows:
> 
> .... text of previous verse.
> </p>
> <p>
> <verse eID="previous verse id"/>
> <verse sID="current verse id"/>Text of current verse ...
> 
> I can't get my head round the logic of this!

It is really simple, but first let me say that semantically, this is really bad.

The problem is that the paragraph start is appended to the prior verse rather than being put with the next verse. I say problem because semantically the paragraph goes with the next verse.

The headings filter has special code to handle what stands before the verse. If the only thing that is marked as x-preverse is the title, then only that is taken as pre-verse. Everything else that is pre-verse is taken as verse text. Thus the number will go before it.

The issue is that the headings filter needs to be improved. The pre-verse milestone div of the more recent osis2mod is not handled well. The purpose of this thread is to outline what can be found in it so that we can create test cases for it and fix the filter.

On the wiki page for osis2mod, it explains how the boundary between verses is found. Basically between two verses, say 2 and 3, any end tags found immediately after a verse end are appended to the prior verse. Once a start tag is found everything from there until the verse start is found is marked as pre-verse.

By putting it before the end tag, it hides it from this algorithm and protects it from the headings filter.

> 
> The way my mind works, I'd have expected this to be a more logical sequence
> in OSIS:
> 
> .... text of previous verse.
> <verse eID="previous verse id"/>
> </p>
> <p>
> <verse sID="current verse id"/>Text of current verse ...
> 
> If the <p> element is logically a feature of the current verse, 
> and </p> element is logically a feature of the previous verse, 
> then why do verse tags get widowed?
> (leaving the text of the current verse orphaned from its tag).
> 
> What seems empirically to be required differs from what is documented in
> http://crosswire.org/wiki/OSIS_Bibles#OSIS_Milestones
> 
> As yet, no-one within CrossWire who's habitually involved in module making
> has come up with a satisfying explanation. 
> 

Until the filter is fixed, I don't think there will be any satisfaction. However, I hope that this explanation is calming. ;)

In Him,
	DM


More information about the sword-devel mailing list