rdflib binds SDO to https://schema.org/ and ships no http variant, so any code reaching for rdflib.namespace.SDO emits https predicates. OO-LD schemas bind http://schema.org/ (OO-LD/oold-schema#179). The two do not join, and nothing errors when they fail to.
import rdflib
g = rdflib.Graph()
g.add((rdflib.BNode(), rdflib.URIRef("http://schema.org/name"), rdflib.Literal("Alice")))
list(g.subject_objects(rdflib.namespace.SDO.name)) # []
That is RDFLib/rdflib#1120, closed as working-as-intended. The binding was described by its author as "a flip of the coin", and schema is bound to https://schema.org/ in every fresh Graph().
Ask
Normalize protocol variants at the rdflib boundary, without requiring a schema to declare the other form as an x-oold-context synonym. A user should not have to annotate every schema.org term to make a round-trip join.
Shape, to be settled in implementation:
- Canonicalize on ingest rather than on export, so a graph built from any source presents one form internally.
- Drive it from a small set of known protocol-variant vocabularies rather than a blanket
http to https rewrite: a string replacement over all IRIs would also rewrite unrelated ones, and schema.org itself has terms like schema:httpMethod whose values contain the substring.
- Keep it inspectable. Silent IRI rewriting is the same class of problem as the mismatch it fixes, so it belongs behind something a caller can see and disable.
Also in this repository
Two fixtures bind https and should follow oold-schema once OO-LD/oold-schema#180 lands:
tests/data/oold/UiAnnotations.schema.json:7
tests/test_backends.py:54
The vendored meta-schema copies under src/oold/validation/meta/1.0.0-rc.*/ also carry https://schema.org/Person, inherited from upstream. Those are frozen snapshots and pick up the change at the next vendored version; they do not need editing by hand.
rdflib binds
SDOtohttps://schema.org/and ships nohttpvariant, so any code reaching forrdflib.namespace.SDOemitshttpspredicates. OO-LD schemas bindhttp://schema.org/(OO-LD/oold-schema#179). The two do not join, and nothing errors when they fail to.That is RDFLib/rdflib#1120, closed as working-as-intended. The binding was described by its author as "a flip of the coin", and
schemais bound tohttps://schema.org/in every freshGraph().Ask
Normalize protocol variants at the rdflib boundary, without requiring a schema to declare the other form as an
x-oold-contextsynonym. A user should not have to annotate every schema.org term to make a round-trip join.Shape, to be settled in implementation:
httptohttpsrewrite: a string replacement over all IRIs would also rewrite unrelated ones, and schema.org itself has terms likeschema:httpMethodwhose values contain the substring.Also in this repository
Two fixtures bind
httpsand should follow oold-schema once OO-LD/oold-schema#180 lands:tests/data/oold/UiAnnotations.schema.json:7tests/test_backends.py:54The vendored meta-schema copies under
src/oold/validation/meta/1.0.0-rc.*/also carryhttps://schema.org/Person, inherited from upstream. Those are frozen snapshots and pick up the change at the next vendored version; they do not need editing by hand.