I'm authoring a vocab currently and would like to suggest a range for a property to give users as hint what resources they could use.
I currently specify an rdfs:range
for the property but this is too restrictive.

- 84,998
- 9
- 154
- 353

- 4,816
- 37
- 44
-
1How is it too restrictive? If you only want to _suggest_ what users should use, why not mention it in an `rdfs:comment`, or define your own `vanithome:suggestedRange` property? – Joshua Taylor Feb 19 '14 at 12:55
-
Introducing an own property is of course always an option but for such low-level things the worst one. However, I think if RDFS and co. provide nothing for it, I use an `rdfs:comment`. – vanthome Feb 20 '14 at 06:41
2 Answers
The vocabulary Schema.org defines/uses the property schema:rangeIncludes
:
Relates a property to a class that constitutes (one of) the expected type(s) for values of the property.
This property merely gives a hint to authors and consumers; it doesn’t apply rdfs:range
:
schema:rangeIncludes a rdf:Property ;
rdfs:label "rangeIncludes" ;
rdfs:comment "Relates a property to a class that constitutes (one of) the expected type(s) for values of the property." ;
schema:domainIncludes schema:Property ;
schema:isPartOf <https://meta.schema.org> ;
schema:rangeIncludes schema:Class .
FWIW, Schema.org adds this disclaimer to their meta terms:
They are not currently advocated for widespread use across the web.

- 1,804
- 3
- 13
rdfs:range
restricts nothing. Just because you've stated that some property P
has a range V
does not mean when you assert data :a :P :b
that b
has to be of type V
. It can, in fact, be anything.
If you hook a reasoner up, in the aforementioned case, it will tell you that b
is a V
due to the range assertion, but it will not complain that you've done anything wrong or violated any condition.

- 4,858
- 19
- 32
-
1Ok, I think you are right. A `:a :P :b` does not describe a validation rule but I think you will agree that it is not best practice to use something different on it due to the 'wrong' reasoning you describe. – vanthome Feb 26 '14 at 11:34
-
No, I don't really agree with you on that, there are certainly use cases where that modeling is desirable. If you need validation, you should use something that supports closed world reasoning, or more specifically, RDF validation (http://www.w3.org/2012/12/rdf-val/) – Michael Feb 26 '14 at 11:59
-
Actually, `:a :P :b` means exactly that `b` *has* to be of type `V`. Under RDF Schema, `b` can indeed be anything, but if such a triple is countered, `:b a :V` is *asserted*. The only thing that RDF Schema does that could be in conflict with this is if datatypes are involved, then it follows XSD and reports a contradiction if something is of two disjoint datatypes at once. Other, `:b a :V` will never cause any contradiction. However if you "upgrade" to OWL, it may very well be the case, but the meaning of `rdfs:range` remains unchanged. – IS4 May 12 '23 at 11:41