Reputation: 21
I am new in the field and I am a bit confused about the definition of the RDFS vocabulary.
Specifically, the vocabulary defines that rdfs:XMLLiteral
, which is a class, is the subclass of rdfs:Literal
(rdfs:XMLLiteral
and rdfs:Literal
are connected using rdfs:subClassOf
).
This is straightforward and is easily understood. However, the vocabulary also said the class rdfs:XMLLiteral
is an instance of rdfs:DataType
(linked by rdf:type
). So, in this case, why the rdf:type
is used instead of rdfs:subClassOf
, given both the rdfs:XMLLiteral
and the rdfs:DataType
are classes.
My personal thought is that, because subclass relationship between Class A and B (suppose A ∈ B) implies that every individual that belongs to A also belongs to B.
So suppose we have an "x" which belongs to the rdfs:XMLLiteral
class, if there was a subclass relationship between rdfs:XMLLiteral
and rdfs:DataType
, then "x" is also a rdfs:DataType
, which is not the fact (because "x" is just an individual literal). Furthermore, because the rdfs:DataType
and rdfs:Class
are connected by rdfs:subClassOf
according to the vocabulary, then "x" is also a class, if the subclass relationship between rdfs:XMLLiteral
and rdfs:DataType
existed. Therefore, such a subclass relationship should not exist.
I do not know if my thought here is right, and I hope someone can give some suggestions to help me understand the subclass relationship and instance relationship in the RDFS vocabulary.
Upvotes: 2
Views: 219
Reputation: 5505
If you understand well the set-theoretic relations ∈ and ⊆, then you have a good basis for understanding rdf:type
and rdfs:subClassOf
. What you describe about rdf:XMLLiteral
is pretty accurate. However:
suppose A ∈ B
This means that A belongs to B, not that every individual that belongs to A also belong to B.
A rdf:type B
could be understood (roughly) as "A ∈ B", while A rdfs:subClassOf B
could be understood (roughly) as "A ⊆ B".
A set can be an element of another set, as well as included in yet another one, or the same. E.g., {a} ⊆ {a,{a}} and {a} ∈ {a,{a}}.
However, the analogy with set theory is only roughly correct because RDF allows classes to be instances of themselves, whereas set theory forbids sets to be elements of themselves (assuming the axiom of regularity). The reason why RDF still "works" is due to the way its semantics is defined, where rdf:type
is not really interpreted as the set membership relation, and rdfs:subClassOf
is not really interpreted as set inclusion.
Upvotes: 3