[jsword-devel] Another patch for WLS verse problem

Joe Walker joe at eireneh.com
Tue Aug 10 15:29:15 MST 2004


Thanks,
Applied along with some of my ongoing build work

Joe.

DM Smith wrote:

> I have put together a patch for the WLS verse problem.
> I changed the signature of Filter.toOSIS
> from
>     void Filter.toOSIS(Element ele, String text)
> to
>     List Filter.toOSIS(String text)
> Each of the implementations create a dummy element and attach OSIS to 
> it. The content (i.e. List) of that dummy element is removed and 
> returned.
>
> In PassageAbstractBook I added a method
>     void addOSIS(Key k, Element e, List l)
> that adds the list of OSIS elements to e.
> In PAB getData it is passed the div element.
>
> In SwordBook I overrode that method. It checks the list to see if 
> there is a verse element present and if there is not then it adds the 
> verse element as the parent of the list and attaches it.
>
> I also changed getText to take a Key instead of a Verse. The idea here 
> is that if we had a robustly marked up OSIS document we could get all 
> the text at once rather than one verse at a time. This is just a step 
> in that direction.
>
> I also made BlockType a Type Safe Enumeration. In doing so I also did 
> it to CompressionType. The code is a bit simpler and safer because of it.
>
> I did some testing of the assumptions and found that Webster's 
> Dictionary is the only book that has a compression type but does not 
> indicate the blocking. I added some code to establish the default as 
> BOOK (which is the most frequent), but may not be correct.
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>jsword-devel mailing list
>jsword-devel at crosswire.org
>http://www.crosswire.org/mailman/listinfo/jsword-devel
>  
>




More information about the jsword-devel mailing list