I think that testfiles/gedcom70/spaces.ged should be removed. Its internal TYPEs suggest a subtle yet important misunderstanding of the specification: conflating LineVal and payload.
The LineVal is the sequence of characters after a space after the tag and the before the newline. It must not be empty and if it starts with an @ it must start with two of them.
The payload is the string made by processing the LineVal and any following CONT pseudo-structures. It de-duplicates off leading @@, adds line breaks for CONTs, and is the empty string if there was no LineVal. It also treats the empty string and the lack of a payload as equivalent; or, in more theoretical language, payloads implicitly cast between Ɛ (the empty string) and ∅ (no string at all) as needed by their structure type's expected payload.
Thus
the line 1 XYZ has no LineVal and has a payload that is equivalently either "" or null.
the line 1 XYZ is a syntax error: it has a space after the tag but no LineVal, which is forbidden by the spec
the phrase "with space but no payload" in spaces.ged is nonsensical, and should say "with syntax error caused by space but no LineVal"
Discussed in steering committee; agreed that spaces.ged is in violation of the spec and should be removed from the set of testfiles and unlinked from the tools page
I think that testfiles/gedcom70/spaces.ged should be removed. Its internal
TYPE
s suggest a subtle yet important misunderstanding of the specification: conflatingLineVal
and payload.The
LineVal
is the sequence of characters after a space after the tag and the before the newline. It must not be empty and if it starts with an@
it must start with two of them.The payload is the string made by processing the
LineVal
and any followingCONT
pseudo-structures. It de-duplicates off leading@@
, adds line breaks forCONT
s, and is the empty string if there was noLineVal
. It also treats the empty string and the lack of a payload as equivalent; or, in more theoretical language, payloads implicitly cast between Ɛ (the empty string) and ∅ (no string at all) as needed by their structure type's expected payload.Thus
1 XYZ
has noLineVal
and has a payload that is equivalently either""
ornull
.1 XYZ
is a syntax error: it has a space after the tag but no LineVal, which is forbidden by the specspaces.ged
is nonsensical, and should say "with syntax error caused by space but no LineVal"