Are individual verses in a Sword Module well formed? was Re: [sword-devel] Verses not in sequential order - front-end problem

DM Smith dmsmith555 at gmail.com
Sun Apr 17 17:14:17 MST 2005


Chris Little wrote:

> DM Smith wrote:
>
>> I took a look at your example and I don't know if it matters, but it 
>> has been posted here that using milestones for verses is a bad thing.
>
> Actually, encoding <verse> tags with milestones is the OSIS best 
> practice recommendation. If you have an extremely simplistic Bible 
> without anything like paragraph or poetry formatting, you can go ahead 
> and use <verse> containers, but in all other circumstances, the 
> book/chapter/verse hierarchy is to be subordinate to the 
> book/section/paragraph hierarchy. Book/chapter/verse is viewed as a 
> foreign system placed over the inherent organization of the text.

I looked again at the OSIS website and could not find that verse with 
milestones is the best practice. I think I was able to figure out why it 
would be a necessary practice. It is mentioned that if any OSIS 
container element is used in the milestone form then that element must 
always use the milestone element in the entire work.

Help me if I am missing something here:
If a Bible has rich markup, then there will be a need for milestones. 
Lets take <q> and <verse> overlapping as in <q>...<verse>... </q>...</verse>
1) Milestones are used for <verse> and not for <q>.
2) Milestones are used for <q> and not for <verse>.
3) Milestones are used for <q> and <verse>.

If 1 is chosen then it will have the most likely side effect of 
requiring most, if not all other containers to be milestoned. This 
means: abbr, closer, div, foreign, l, lg, q, salute, seg, signed, and 
speech. It will be easier to use milestones for all of them unless one 
is certain that verses will never be split by one.

If 2 is chosen then it is likely that only verse and possibly chapter 
will need to be milestoned. So I can see why this may be the best 
practice. Also, the OSIS manual notes that pretty much the only 
practical consequence of a verse element is the rendering of a verse 
number. And of course Sword will use it to mark the start and the length 
of the verse in the module.

3 is the easiest to adhere to the OSIS rule of consistency in 
milestoning an element in a work.

Of the elements that can contain a verse, at least one, <p>, is not 
milestoneable. So, if a verse ever crosses one of these then using 
milestones for verses is a must. What is not clear from the schema is 
which container elements that can contain verses can hold part of a 
verse. For example, I don't imagine that <cell> or <item> should. <p> is 
specifically mentioned in the OSIS manual as allowing verses to be split.

With regard to the Sword API, it is possible to get a single verse. If 
the verse has an an element end tag and not its begin or a begin element 
and not its end, i.e. it is not well formed, then an XML parse of that 
verse will fail. OSIS does not require that a verse be well-formed. Does 
Sword in making a module from OSIS ensure that each verse is well formed?

If not, then how should it be handled?






More information about the sword-devel mailing list