[jsword-devel] Comparison of TreeKeys can lead to false positives

Martin Denham mjdenham at gmail.com
Mon Mar 21 13:06:52 MST 2011


Hi,

Some Books like Pilgrim's Progress and Edersheim have keys with identical
names but different parents.

Here is an example from Pilgrims Progress:
   Part I/The First Stage
   Part II/The First Stage

So if I have a key1='The First Stage' (in Part II) and I go through a list
of keys looking for a key that equals key1 I will arrive at the wrong key.

I am currently changing my code so that if a TreeKey has a parent I also
compare parents but I was wondering if you think the KeyTree equals method
in JSword should be extended to check parents.

If the above isn't clear I can create a simple junit so show the problem
because I may possibly be taking the wrong approach.

Regards
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20110321/e53f7e24/attachment.html>


More information about the jsword-devel mailing list