[sword-devel] osis2mod warnings

DM Smith dmsmith555 at yahoo.com
Mon Dec 1 07:13:36 MST 2008


Adrian/David (and others):
Most of these warnings are gone with with the latest build of  
osis2mod. When you run it, it will say:
You are running osis2mod: $Rev: 2197

If you are running an earlier version, please upgrade.

A bit of history.
There are some notions of well-formed.
1) Well-formed XML document. This is something that any XML validator  
can check. All that it says is that the document minimally conforms to  
the definition of XML.
2) Most of the SWORD front-ends will display a single verse in  
isolation. If the verse, taken in isolation, has an un-matched begin  
or end tag then that verse is not well formed. This is what these  
errors indicate. That is, osis2mod is creating a module that has  
verses that will display badly (i.e. not as intended) in one or more  
front-ends, in some circumstances.
3) OSIS defines two conflicting structures: Book/Chapter/Verse (BCV)  
and Book/Chapter/Section/Paragraph (BCP). In order for these to co- 
exist, OSIS allows all container elements, except <p> to be  
milestoned. This allows for the one to overlap the other. The SWORD  
engine assumes BCV, but the recommended best-practice for writing an  
OSIS Bible is BCP. The OSIS manual states that if the milestone form  
of a container is used that it needs to be used consistently. The  
milestoned form of containers can lead to semantically invalid XML  
that no validator of XML can catch. We do not check for these today.

Regarding these:
1) It is expected that all documents submitted to osis2mod are both  
well-formed XML and are validated against the OSIS 2.1.1 schema.
2) While these problems don't prevent a module from being submitted,  
it is recommended that for the widest usefulness of the module that  
they be heeded. The latest version of osis2mod converts all BCP  
containers to their milestoned form or, in the case of <p>, to a  
nearly equivalent form. This eliminates nearly all of the warnings.
3) Some day, we should write a tool that will validate this. Here is  
an example of the problem:
<div sID="www"/>
<lg sID="xxx">
....
<div eID="www"/>
....

In this example there are three problems:
1) There is no corresponding end tag <lg eID="xxx"/>.
2) The <div> crosses the <lg> boundary. The principle here is that the  
document should be well-formed when re-written to milestone BCV and  
not BCP (and visa versa), flipping the axis.
3) <lg> does not allow <div> to be a child. The principle here is that  
the document should be valid when re-written to flip the axis.

If/When we get such a validator, osis2mod should be changed to not do  
any validation.

In Christ's Service,
	DM

On Dec 1, 2008, at 8:03 AM, David Haslam wrote:

>
> Hi Adrian,
>
> I too found loads of warnings and some errors when I tried to use  
> the Win32
> build of osis2mod.
> I was making an attempt in converting the Tedim Bible (from Myanmar  
> Bibles)
> to make a Sword module.
> The list of outputs is too long to include here.
>
> Using  http://xml-copy-editor.sourceforge.net/ XML Copy Editor , I had
> already ensured that all 66 XML files were both validated and well  
> formed,
> after updating the OSISSchemaLocation link.
>
> I just wonder if all these "bugs" would be solved if we were not  
> using an
> Windows osis2mod build as old as June 2008.
>
> I just haven't had the time to remake it from the latest trunk in  
> SVN, as
> this would entail me going up a very steep learning curve.
>
> -- David
>
>
> Adrian Korten wrote:
>>
>> Good day,
>>
>> Thanks, the icu_dll helped to make it work. Now, I have a question  
>> about
>> the output.
>>
>> Warning verse Matt.1.23 is not well formed:(7,5)
>> Warning verse Matt.3.3 is not well formed:(5,7)
>> Warning verse Matt.4.4 is not well formed:(5,7)
>> Warning verse Matt.5.2 is not well formed:(0,5)
>>
>> Do the various codes indicate different types of errors? Is a (7,5)
>> different from a (5,7)? What kinds of errors am I looking for? I  
>> found
>> something for the (0,5) but the other errors are harder to spot with
>> beginner experience.
>>
>> ak
>>
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Win-version-of-osis2mod-tp20716002p20771556.html
> Sent from the SWORD Dev mailing list archive at Nabble.com.
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page





More information about the sword-devel mailing list