Closed michelesalvador closed 6 years ago
Take a GEDCOM with this individual:
0 @I1@ INDI 1 NAME Victoria /Hanover/ 1 TITL Queen of England
ModelParser.handleTitl(Object) puts the TITL record within names adding the user-defined _type key:
ModelParser.handleTitl(Object)
TITL
names
_type
{ "id": "I1", "names": [ { "value": "Victoria /Hanover/" }, { "_type": "TITL", "value": "Queen of England" } ] }
This is strange, because in GEDCOM 5.5 specifications TITL is a standard attribute of INDI (like for example OCCU or PROP):
INDI
OCCU
PROP
INDIVIDUAL:= n <<NAME_STRUCTURE>> {1:M} n TITL <INDI_TITLE> {0:M} n ...
And also in GEDCOM 5.5.1 TITL is located among other standard attributes:
INDIVIDUAL_ATTRIBUTE_STRUCTURE:= [ n ... | n TITL <NOBILITY_TYPE_TITLE> {1:1} +1 <<INDIVIDUAL_EVENT_DETAIL>> {0:1} ]
Wouldn't be more correct to parse the TITL record as a simple EventFact? Like this:
EventFact
{ "id": "I1", "names": [ { "value": "Victoria /Hanover/" } ] "eventsFacts": [ { "tag": "TITL", "value": "Queen of England" } ] }
Fair enough. I'm happy to merge a pull request.
Take a GEDCOM with this individual:
ModelParser.handleTitl(Object)
puts theTITL
record withinnames
adding the user-defined_type
key:This is strange, because in GEDCOM 5.5 specifications
TITL
is a standard attribute ofINDI
(like for exampleOCCU
orPROP
):And also in GEDCOM 5.5.1
TITL
is located among other standard attributes:Wouldn't be more correct to parse the
TITL
record as a simpleEventFact
? Like this: