[sword-devel] OSIS troubles not yet resolved
dmsmith555 at yahoo.com
Mon Nov 5 08:07:25 MST 2007
I just looked at the file you sent me and in looking at it here are
On Nov 4, 2007, at 11:57 PM, DM Smith wrote:
> On Nov 4, 2007, at 10:03 PM, Daniel Owens wrote:
>> I have checked and rechecked my OSIS tagging of the New Vietnamese
>> (2002), for which I am currently seeking permission to distribute, by
>> the way (The copyright holders are hard to find.). I believe it is a
>> valid OSIS document. At the very least it matches the tagging
>> by mod2osis.
>> I removed all line breaks in the xml file after the header to
>> solve the
>> problem of line breaks displaying after the verse number in
>> and BibleTime. The two features which cause difficulty now are
>> and notes. I've had trouble with line breaks as well (<p></p> is
>> useless), but I'm leaving them aside until I have success with
>> and notes.
>> Headings display correctly in BibleTime 1.6.2 (Kubuntu 7.04),
>> 2.2.0 (Kubuntu 7.04), and BibleCS 1.5.10pre4 (Windows XP Home).
>> do not display at all in BibleDesktop 1.0.7 (Windows XP Home), though
>> the View Source dialog shows that the tags are there in the
> It could be that this bug is that the headings are becoming part of
> verse 0, which is automatically displayed in chapter mode in the
> other applications. At the moment BibleDesktop does not handle
> verse 0.
> A good example of how to attach a heading to verse 1 instead of
> verse 0 can be found in the KJV. You can get the xml for the KJV
> here: www.crosswire.org/~dmsmith/kjv2006.
> But given that you said that BibleDesktop's View Source shows it.
> My guess is that I have a bug in the code.
osis2mod has to handle headings specially. Sword does not store the
verse tags with the content of the verse. Therefore it needs to mark
anything that needs to stand before the verse number. It does this by
marking the <title> element as x-preverse and putting it within verse
Thus if you have
<title>This is a title</title>
<verse osisID="Gen.1.1">In the beginning...</verse>
osis2mod will convert it into:
<verse osisID="Gen1.1"><title type="section" subType="x-
preverse">This is a title</title>In the beginning...</verse>
You have encoded it as the second form. This is valid OSIS but it is
not proper OSIS.
If it is truly a section heading the proper OSIS way to mark this up
is to create a div around the entire section and have the title as
the first element in the div. It should be marked up in the following
<title type="section">This is a section header</title>
<verse osisID="Gen.1.1">Verse text</verse>
... and continuing onward to the end of the last verse in the
But I'm not sure that osis2mod handles this properly. I think
osis2mod only expects <div type="book"> and <div type="chapter"> and
tries its best with the others. (BTW <chapter>, which you use, is
favored over <div type="chapter">.)
I don't know why BD is not showing it. It should. I am assuming you
have "Show Headings" checked.
>> Notes do not display at all in BibeCS. In BibleDesktop, BibleTime,
>> GnomeSword the notes appear in the text like this (Genesis 2:24):
>> Vì thế, người nam sẽ rời cha mẹ để kết hiệp
>> với vợ và hai người trở
>> thành một thân." Nt: một thịt
> This should be encoded something like:
> <verse sID="Gen.2.24" osisID="Gen.2.24" n="24"/>Vì thế, người
> nam sẽ rời cha mẹ để kết hiệp với vợ và hai
> người trở thành một thân.<q eID="xxx" marker="""/><note
> osisRef="Gen.2.24" osisID="Gen.2.24!1" n="1" type="translation">Nt:
> một thịt</note><verse eID="Gen.2.24"/>
> I used xxx for eID to represent whatever the matching sID should be.
> Notice that there is no space before the <note....> This means that
> the note marker will be attached to what precedes it.
You have type="crossReference" for your translation note. This type
should only be used for notes that contain <reference> elements.
Change it to type="translation" and it should work. You will also
probably want to change the osisID to osisID="Gen.2.24!translation.a"
SWORD has special handling when the type is crossReference. All other
types are handled the same.
Other things I noticed:
You have a space before every </verse>. This is unnecessary. osis2mod
will remove it.
Fo readability and for text editors that cannot handle long lines, if
you wish, you can start each book, chapter, verse and every "block"
element on a new line in the file. Block elements include div,
chapter, title, p. And for readability, putting closing div and
chapter on their own lines is ok.
I found titles inside of notes. (Gen 4:25, 10:1, 21, 37:25, 38:1) The
way SWORD C++ works is that it will take every x-preverse title that
it finds out of the text and put it into a special data structure and
render the title before the verse number if headings is turned on. If
the notes filter is before the headings filter, and "Show notes" is
off then these won't be seen. However if the headings filter is
before the notes filter, they will be found. JSword works
differently, and never looks into notes for headings, but only within
verses. So these will never be shown.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sword-devel