Login to participate
  
       
Register   Lost ID/password?
The Behold User Forum » Topic           prev Prev   Next next

Date validation - case sensitive - Categorized in: Report a ProblemReport a Problem

6 posts. Started 13 Apr 2012 by brett. Latest reply 14 Apr 2012 by lkessler. RSS 2.0 feed for this topic RSS
1. Brett (brett)
Australia flag
Joined: Mon, 12 Jan 2009
35 blog comments, 52 forum posts
Posted: Fri, 13 Apr 2012 Permalink

Louis
What do you make of Tamura Jone's comment (http://www.tamurajones.net/SiblingTortureTest.xhtml):

None of these produced any errors or warnings, except Behold 1.04.
Behold warned that the date 13 Apr 2012 is non-standard, and should be 13 APR 2012; the warning is that the abbrevation should be in ALL-CAPITALS.
That is what the specification seems to say, but it does not;
Chapter 2 of the GEDCOM 5.5.1 specification clearly states that All controlled line_value choices should be considered as case insensitive.,
and that values should be converted to all uppercase or all lowercase prior to comparing.
That means that Apr is fine, and that means that you may even write aPR or aPr

It seems to me that all lower or all upper is correct but not mixed, as Tamura suggests.

Brett

2. Louis Kessler (lkessler)
Canada flag
Joined: Sun, 9 Mar 2003
131 blog comments, 191 forum posts
Posted: Fri, 13 Apr 2012 Permalink

Brett,

See my blog post: How To Get A Developer To Fix A Bug.

No, Tamura's correct. The statement: "values should be converted to all uppercase or all lowercase prior to comparing" means that aPR and aPr should be both changed to APR (if uppercase is used for comparison) or to apr (if lowercase is used for comparison). Either way, aPR and aPr are equivalent to apr, APR and Apr.

Louis

3. Brett (brett)
Australia flag
Joined: Mon, 12 Jan 2009
35 blog comments, 52 forum posts
Posted: Fri, 13 Apr 2012 Permalink

So what does:

values should be converted to all uppercase or all lowercase prior to comparing.

actually mean?

Is this when:

1. comparing two dates within a program, such as to work out age or

2. two supposedly identical GEDCOMs are compared for differences?

If 1 above, how does a user know it is being done correctly by the user?

If 2 above, how do we change a GEDCOM to same case in both files, without a large (and possibly manual) conversion.

Brett

4. Louis Kessler (lkessler)
Canada flag
Joined: Sun, 9 Mar 2003
131 blog comments, 191 forum posts
Posted: Fri, 13 Apr 2012 Permalink

I think it simply means comparing for the purpose of interpreting its value.

For a DATE value, I don't just compare the month-part to JAN, FEB, MAR,..., but I compare the uppercased value of the month-part to JAN, FEB, MAR,...

For a TYPE value, I don't just compare the value to STILLBORN, but I compare the uppercased value of the value to STILLBORN.

Louis

5. Brett (brett)
Australia flag
Joined: Mon, 12 Jan 2009
35 blog comments, 52 forum posts
Posted: Fri, 13 Apr 2012 Permalink

I assume this applies to BET, ABt etc in that they can be Bet, bet etc but compared upper or lower cased.

Brett

6. Louis Kessler (lkessler)
Canada flag
Joined: Sun, 9 Mar 2003
131 blog comments, 191 forum posts
Posted: Sat, 14 Apr 2012 Permalink

Yes. All parts of the date. And that actually simplifies the work that Behold is doing.

Personally, I think it is a great idea that the GEDCOM designers had. I should have discovered it earlier, but now that I have, I'll make use of it.

Louis

Leave your Reply

You must login to post your reply.

Login to participate
  
       
Register   Lost ID/password?