There is an existing issue about this:

https://github.com/apache/jena/issues/1720

> On Apr 3, 2024, at 2:46 PM, Justin <[email protected]> wrote:
> 
> Hi all,
> 
> According to RDFS 1.1 (https://www.w3.org/TR/rdf-schema/#ch_range), when
> you use `rdfs:range` this inference is expected:
> 
> ```
> gist:containedText rdfs:range xsd:string .
> :thing0 gist:containedText "this is my text"^^xsd:string .
> ```
> 
> providing those triples to riot (with the --rdfs option) yields the
> following:
> ```
> "this is my text"  rdf:type  xsd:string .
> ```
> 
> That is what RDFS 1.1 specifies. Notice however the RDF isn't well-formed
> (we have a literal in the subject position). If you do `riot --validate` on
> the output you'll see the error.
> 
> BUT it turns out OWL (re)defined `rdfs:range` (
> https://www.w3.org/TR/owl-ref/#range-def) to allow the thing in the object
> position to be a datatype (that a literal can be):
> "rdfs:range is a built-in property that links a property (some instance of
> the class rdf:Property) to to either a class description *or a data range*.
> An rdfs:range axiom asserts that the values of this property must belong to
> the class extension of the class description *or to data values in the
> specified data range*."
> 
> So it appears riot is using the RDFS 1.1 interpretation of `rdfs:range`. Is
> that intended (even though it can produce malformed triples)?
> On stackoverflow people are saying "Don't be misled by Jena's confusing
> behavior."
> https://stackoverflow.com/questions/78245972/rdf-when-a-property-is-used-the-thing-in-the-object-position-is-a-literal-of-da
> 
> Maybe riot should have a note on the `--rdfs` option that says it is using
> RDFS 1.1 strictly (not OWL). I think that would clear up this confusion
> perhaps.
> 
> A little more discussion is here:
> https://github.com/semanticarts/gist/issues/1069
> 
> Thanks,
> Justin

Reply via email to