The resource description framework (RDF) allows specifying a distributed system of resources. For example, I could specify that I am friends with Bill using the triple <http:example.com/me>
<http:example.com/friendsWith>
<http:otherExample.com/Bill>
. And "http:otherExample.com/Bill" could be dereferenced if it turns out that "http:otherExample.com/Bill" is an rdf resource (e.g., application/rdf+xml). However, what if I want to dereference "http:otherExample.com/Bill" as some literal with some dataType?
The problem is that it seems impossible to specify that the object should be a literal with a datatype at some remote location given the contradiction of specifying rdfs:range
of some property to be a datatype and then providing a URI instead. For example, if I specify a property ex:hasProfilePic
with rdfs:range xsd:base64Binary
, but then I have a triple such that <http:otherExample.com/Bill>
ex:hasProfilePic
<http://otherExample.com/BillsProfilePic>
, wouldn't this be invalid since the range of the specified ex:hasProfilePic
is actually a URI resource?
A possible solution is to include a datatype in the dereferenced URL, "data:image/png;base64,iVBORw0KGgoAAAANS...", but this still wouldn't encode a literal in the RDF graph.
Ideally, I think there would be a datatype that is a union of URI and a datatype so that that the literal is interpreted as either based on the content. For example, ex:externalImage
could be a union datatype of URI and image and allow specifying literals using datatype notation "http://otherExample.com/BillsProfilePic"^^ex:externalImage. Does such a datatype scheme already exist? Or are there other ways of dereferencing literals with datatypes in RDF?
rdfs:range xsd:integer`. Am I correct assuming you would like to say ` ` such that `someURI` dereference to an integer?
– Antoine Zimmermann Mar 05 '23 at 10:10"ex:locationofInt"^^namespace:unionOfURIAndInt OR
"ex:5"^^namespace:unionOfURIAndInt, where the datatype expresses that the literal should be interpreted based on content. Does such a standard of datatypes exist?
"VGhlIHF1a..."? My understanding is that if is dereferencable then there are additional triples at someURI. For example if someURI is an rdf resource of triples