"CONC is not a sub-item of PAGE"
kenahoo opened this issue · 3 comments
Hi Paul,
I exported a GEDCOM file from Family Tree Maker in order to try to do some visualization on the graph. When I fed it into the Gedcom
module, I get a lot of noise like this:
/tmp/Williams-Schechinger Family Tree 2_2013-07-22.ged:132: CONC is not a sub-item of PAGE
Valid sub-items are
/tmp/Williams-Schechinger Family Tree 2_2013-07-22.ged:140: CONC is not a sub-item of PAGE
Valid sub-items are
/tmp/Williams-Schechinger Family Tree 2_2013-07-22.ged:151: CONC is not a sub-item of PAGE
Valid sub-items are
It looks like that's coming from entries like the following, when I do Gedcom->new($filename)
:
0 @I00794@ INDI
1 NAME Glenn /Grage/
2 SOUR @S00056@
3 PAGE Year: 1940; Census Place: Kinyon, Cass, North Dakota; Roll: T627_2997;
4 CONC Page: 3B; Enumeration District: 9-65
1 SEX M
1 BIRT
2 DATE ABT 1931
2 PLAC North Dakota
2 SOUR @S00056@
3 PAGE Year: 1940; Census Place: Kinyon, Cass, North Dakota; Roll: T627_2997;
4 CONC Page: 3B; Enumeration District: 9-65
1 RESI
2 DATE 1935
2 PLAC Kinyon, Cass, North Dakota
2 SOUR @S00056@
3 PAGE Year: 1940; Census Place: Kinyon, Cass, North Dakota; Roll: T627_2997;
4 CONC Page: 3B; Enumeration District: 9-65
1 RESI Age: 9; Marital Status: Single; Relation to Head of House: Son
2 DATE 01 APR 1940
2 PLAC Kinyon, Cass, North Dakota, United States
2 SOUR @S00056@
3 PAGE Year: 1940; Census Place: Kinyon, Cass, North Dakota; Roll: T627_2997;
4 CONC Page: 3B; Enumeration District: 9-65
1 FAMC @F00275@
Any reason not to allow CONC
as subelement of PAGE
?
Hi Ken
The spec is unfortunately ambiguous in this and other cases. In chapter 1, it says that long values (len > 248 chars) can be continued/concatenated with CONT/CONC tags, however in chapter 2 it only explicitly mentions the CONT/CONC tags as subtags of certain tags such as TEXT, AUTH, TITL, etc.
I personally interpret the spec as saying that any value can be extended with CONT/CONC, but it apepars Paul has a stricter interpretation.
I'm afraid there's no canonical answer.
Mikkel
Spec can be found here
Yeah, looks like kind of a loose spec.
Paul, if you were amenable to this change, would a patch like the following accomplish it?
diff --git a/gedcom-5.5.grammar b/gedcom-5.5.grammar
index fc740c5..e83c517 100644
--- a/gedcom-5.5.grammar
+++ b/gedcom-5.5.grammar
@@ -511,6 +511,8 @@ n @<XREF:INDI>@ INDI {1:1}
[
n SOUR @<XREF:SOUR>@ {1:1}
+1 PAGE <WHERE_WITHIN_SOURCE> {0:1}
+ +2 CONC <WHERE_WITHIN_SOURCE> {0:M}
+ +2 CONT <WHERE_WITHIN_SOURCE> {0:M}
+1 EVEN <EVENT_TYPE_CITED_FROM> {0:1}
+2 ROLE <ROLE_IN_EVENT> {0:1}
+1 DATA {0:1}
Thanks very much for this. I've decided that it's probably easiest to interpret the spec loosely, and also to accommodate the idiosyncrasies of popular genealogy programs, so I have made the default grammar loose and included this change (but not other similar changes - though I have no objection to so doing). I have also included the strict grammar which people can choose to use if they would prefer.
This is included in version 1.19, which I have just released.
Thanks again,