Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Original Gedcom Record ID Missing #75

Open
Sinistrius opened this issue Jan 17, 2020 · 3 comments
Open

Original Gedcom Record ID Missing #75

Sinistrius opened this issue Jan 17, 2020 · 3 comments

Comments

@Sinistrius
Copy link

Gedcom uses record identifiers enclosed in @ signs, e.g. @I123@ for an individual or @R321@ for a repository. They usually never change and are therefore suited as permanent identifiers. However in the GedcomDatabase tree objects there seem to be no such IDs. I find XRefID properties instead, but can't link them to anything the original file. So, where are the original record IDs?

@fire-eggs
Copy link

One of the flaws of David Knight's Gedcom.NET (on which GeneGenie is based) is that the original ids are all "translated". There is no copy of the original record IDs, only the XRefID values.

To add to the problem, the ids are not translated in any sort of human-logical order. They are reassigned in the order the parser encounters ids. For example, testing with a GEDCOM file I have, the first individual is assigned XREF6, the first family XREF1, the first note XREF3.

The only way to change this behavior is to modify and rebuild the source. In GedcomRecordReader.cs, method ResetParse(), there is this chunk of code:

// always replace xrefs
_xrefCollection.ReplaceXRefs = true;

Change true to false and you might (I haven't tested!) preserve the original ids.

@RyanONeill1970
Copy link
Member

Thanks for answering this @fire-eggs , I was intending to reply but you seem to know more than I do! I do recall that the references are not kept.

I would love to recreate a pure .Net version from the group up, with tests first and things like this fixed but it will require too much effort for a part time endeavour. If Ancestry.com were willing to back it...

@Sinistrius does that answer the question for you? I appreciate it is not the answer you want.

@fire-eggs
Copy link

I've poked at a few Gedcom projects, including Gedcom.NET / GeneGenie. I've learned a lot and borrowed a bunch of code for my own solution. Of course, there are bugs and limitations, which I've not tackled in my "copious free time".

JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/GeneGenie.Gedcom that referenced this issue Dec 8, 2022
RyanONeill1970 pushed a commit that referenced this issue Dec 18, 2022
* Switch to net6.0

* Adapt StyleCop warnings

* Original Gedcom Record ID Missing #75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants