[sword-devel] Detecting bad references?

Peter Von Kaehne refdoc at gmx.net
Mon Jan 11 11:11:39 MST 2016


Thanks that makes sense.

Peter

> Gesendet: Montag, 11. Januar 2016 um 17:39 Uhr
> Von: "Troy A. Griffitts" <scribe at crosswire.org>
> An: "SWORD Developers' Collaboration Forum" <sword-devel at crosswire.org>
> Betreff: Re: [sword-devel] Detecting bad references?
>
> If you'd like to see if a VerseKey was normalized for a module's
> reference system, you can parse the reference with normalization off,
> and then with it on and compare the keys to see if they are the the same.
> 
> vk2.setAutoNormalize(false);
> vk1.setText("1Sam.2.200");
> vk2.setText("1Sam.2.200");
> 
> cout << ((vk1==vk2) ? "no" : "") << " need for normalization\n";
> 
> I've added an example to the examples/ folder:
> 
> http://crosswire.org/svn/sword/trunk/examples/classes/versenorm.cpp
> 
> 
> On 01/11/2016 08:52 AM, David Haslam wrote:
> > Either during the process towards module build (in which it's often necessary
> > to fix xrefs) or even subsequently,
> > is it feasible for SWORD to test a reference to a specified versification
> > and to respond with whether the reference is good or bad?
> > 
> > The question naturally follows on from my observation about a gotcha (just 1
> > example) in the new FreDAW module.
> > 
> > NB. I was already aware of how SWORD handles a quirky reference like
> > 1Sam.14.600,
> > or even Gen.1.10000000  (but thanks for the reminder explanation, Karl).
> > 
> > If so, please explain how.
> > 
> > If not, is there an opportunity for an enhancement here?
> > 
> > David
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > View this message in context: http://sword-dev.350566.n4.nabble.com/Detecting-bad-references-tp4655692.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
> > 
> 
> _______________________________________________
> 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