FamilySearch/gedcomx — Issue #154: RDF Schemas Have Errors
Author: joshhansen
Created: 2012-03-02 06:10:20+00:00
State: open

I'm referring to the schemas located at
* http://www.gedcomx.org/model/gx.rdf.xml
* http://www.gedcomx.org/model/gxr.rdf.xml
* http://www.gedcomx.org/model/gxc.rdf.xml

# Problems
1. The general and record model schemas don't validate. See [[1]](http://www.w3.org/RDF/Validator/ARPServlet?URI=http%3A%2F%2Fwww.gedcomx.org%2Fmodel%2Fgx.rdf.xml&PARSE=Parse+URI%3A+&TRIPLES_AND_GRAPH=PRINT_TRIPLES&FORMAT=PNG_EMBED) and [[2]](http://www.w3.org/RDF/Validator/ARPServlet?URI=http%3A%2F%2Fwww.gedcomx.org%2Fmodel%2Fgxr.rdf.xml&PARSE=Parse+URI%3A+&TRIPLES_AND_GRAPH=PRINT_TRIPLES&FORMAT=PNG_EMBED). The cause for this is that some `rdfs:comment` properties contain not just text but embedded HTML tags (`` and ``). One remedy is to surround these HTML fragments with `...` tags and to declare their datatype to be `XMLLiteral`. This is demonstrated in this [diff](https://github.com/joshhansen/gedcomx/commit/de49723efeb3d5eeeb27aaf5fc059486a346dabd).
2. None of the namespaces nor any of the vocabulary defined therein resolve to RDF as is standard practice, and as specifically mandated in the Linked Data paradigm. The namespaces in use seem to be `http://gedcomx.org/`, `http://gedcomx.org/conclusion/v1/`, and `http://gedcomx.org/record/v1/`. Except for `http://gedcomx.org/` itself, they all give 404's as far as I can tell. If `http://gedcomx.org/` is to be used as a namespace, it should serve either HTML or RDF as requested using HTTP content negotiation.
3. In the conclusion model, both the `original` and `formal` properties have a domain of `formalizeable`. However, `formalizeable` is never defined. Additionally, since the domain of a property is supposed to be a class, this should probably be capitalized as `Formalizeable`.
4. Incorrect file extension. `.rdf.xml` is not the right file extension for RDF/XML documents. The correct extension is `.rdf`. (Nitpicky, I know....)

# Potential Problems
The following things seem a little iffy to me:
1. In the general model, the `persistentId` and `source` properties have no domain. Maybe this is intentional?
2. In the conclusion model, the `father`, `fatherRelationship`, `mother`, `motherRelationship`, `spouse`, and `spouseRelationship` properties have no domain. I doubt this is intented.
3. In the record model, the `alternateId` and `persistentId` properties have no domain. Again, maybe on purpose?
4. The schemas do not use XML namespaces for the very namespaces they are defining. For example, instead of `http://gedcomx.org/record/v1/Age` it would be more concise (and more readable, in my opinion) to say `gxr:Age` using the namespace prefix of `gxr` to represent the record model namespace.
5. There are a ton of top-level classes in `gx.rdf.xml`. Shouldn't they be part of a hierarchy?
6. I don't know OWL that well, but a number of the classes in `gx.rdf.xml` represent conditions that I suspect could be expressed using OWL. For example, `NeverHadChildren`. Just a thought.