[sword-devel] Need some help before starting new OSIS file

Daniel Owens dhowens at pmbx.net
Thu Aug 20 15:16:37 MST 2009


John,

I don't have all the answers, but I can give some off the top of my head 
below. In general I would recommend saving your work at various stages 
in order to preserve as much of what you already have in the way of 
headings and line breaks along the way so that if you decide you want to 
do something a different way down the road you can back up to a previous 
step. I have found that it is feasible to go from RTF in OpenOffice to 
USFM with a little bit of work. USFM uses << for opening double quotes, 
 >> for double closing quotes, < for opening single quotes, and > for 
single closing quotes. That's easy to prepare. Then set up all headings 
as a heading style in OpenOffice and use an export filter. I can hunt 
around in my back of tools to see what I have. I transformed a 
Vietnamese Catholic translation and notes from RTF to USFM and from 
there to OSIS. It made life easier to use an export filter for 
OpenOffice. Once you have USFM there are several tools to help you go 
from USFM to OSIS. Bibledit has a nice conversion tool, for example, or 
there is a Perl script that I have used and abused. :)

johnduffy at cgcf.net wrote:
> Hi,
>  
> I mentioned some months ago about wanting to convert the Bible in 
> Irish into a Sword module.  It became clear then that to do so, I need 
> to produce an OSIS file.  I'm now able to work on it again, and have 
> some questions that I would appreciate some help on. 
>  
> I'm not trying to produce the most enhanced version of an OSIS file at 
> this stage, but I simply want to convert the existing vpl format file 
> into OSIS as a starter.  The results will be basic, but usable, I 
> trust.  I'm a newbie to Sword also, so some questions may seem rather 
> basic, but please bear with me.
>  
> 1    Can I use alternative quotation marks (&#8220; for " and so on) 
> to globally replace single and double quotations, instead of having to 
> go through the whole text and use the 'q level'?  The use of single 
> and double quotations has already been differentiated by the publisher 
> for nested quotations.

That should work, but the wiki advises this:

<q marker="&#8220" sID="qN"/> ... <q marker="&#8221" eID="qN"/>

I'm not sure if the start and end IDs really matter. You can always try 
it without them. If it doesn't work you haven't lost anything, I 
suppose. You can just insert the unicode character too, if I am not 
mistaken, though that's not the best practice.
>  
> 2    I have two file versions - one file with line breaks (using rtf 
> code) and headings (marked up as bold using rtf code) within verses, 
> while the other file has neither and is the most basic vpl.  I would 
> like to use the version with line breaks and headings.  The 
> headings seem relatively easy to implement in OSIS using title.  Is it 
> OK to use type="main" for a book title, type="chapter" for the start 
> of chapters, and type="sub" for passage headings within a chapter?
I would use main for a book, but other titles don't really need a type 
unless they are a sub to another title. Just use: <title>... </title> 
and put it under the <div> element for that section. Here is the first 
part of a Bible I prepared:

<div type="x-testament">
<div type="book" osisID="Gen">
<title type="main">SÁCH THỨ NHỨT CỦA MÔI-SE GỌI LÀ SÁNG-THẾ KÝ</title>
<chapter sID="Gen.1" osisID="Gen.1"/>
<div type="majorSection">
<title>Về thời cổ, từ buổi sáng-thế đến đời Áp-ra-ham</title>
<title type="sub">(Từ đoạn 1 đến 11:9)</title>
<div type="section">
<title>Tạo-thành trời đất</title>
<p>
<verse sID="Gen.1.1" osisID="Gen.1.1"/>Ban đầu Đức Chúa Trời dựng nên 
trời đất.<verse eID="Gen.1.1"/>
</p>

If I remember right, those div elements are important.
>  
> 3    Can I implement line breaks using lb within a verse?  (They are 
> not grouped so lg seems like a lot of work to get the same result.)
I have tried this and it doesn't work very well. Last I knew, osis2mod 
converted lg and l elements so that the output is <lb 
type="x-end-paragraph"/> <lb type="x-begin-paragraph"/>. You can always 
try inserting that at the end of each paragraph, but it's not the best 
practice. I haven't worked on this for awhile, but my memory of back 
then (a year maybe) is that it was the challenging part of preparing a 
module.
>  
> 4    Just for clarity, I gather that I should be using milestones for 
> chapter and verses - is that correct?
This is the most significant issue. The main reason to use milestones 
for chapter and verse is to deal with line groups and paragraphs that 
span chapters and verses. If you plan to use <p> or <lg>, use milestones.
>  
> 5    Since I don't have paragraphs marked and therefore won't be using 
> paragraphs in OSIS, I presume that each verse will automatically start 
> on a new line when displayed - is this correct?
Not necessarily. GoBible does this verse per line automatically, but 
most display a whole chapter as if it were one paragraph. BPBible, among 
others, allows you to toggle this so that the entire chapter appears as 
one paragraph or as a verse per line. Look at the KJV for an example.
>  
> 6    For the very occasional places where italics are found in the 
> original, if I use the <hi type="italic"> element will that be 
> interpreted correctly by osis2mod?  (I'm currently marking them up 
> using rtf code.)  There is no uniform reason for their use so other 
> more specific markups are not practical at this time.
>
I think it does, or at least it should. If it doesn't, you can ask about 
it on this list.
> 7    This is a 73 book canon.  Is there a definition or specification 
> for the KJVA or Vulgate v11n available with the number of verses in 
> each chapter and chapters per book?
>
Someone else can answer this one.
> I appreciate all your help at this stage.
>  
> Thanks
>  
> John Duffy
>  
>   
Feel free to ask more questions, and anyone is welcome to correct or add 
to what I have written.

Daniel



More information about the sword-devel mailing list