I have the following RDF
:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:ppl="http://www.blah.com/people#">
<rdfs:Class rdf:ID="Person">
<ppl:Name/>
<ppl:LastName/>
</rdfs:Class>
<rdfs:Class rdf:ID="John">
<rdfs:subClassOf rdf:resource="#Person"/>
<ppl:name>John</ppl:name>
<ppl:LastName>Smith</ppl:LastName>
</rdfs:Class>
</rdf:RDF>
This looks fine but I would like to avoid the possibility of doing a subClassOf John. For instance, this should not work:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:ppl="http://www.blah.com/people2#">
<rdfs:Class rdf:ID="Person">
<ppl:Name/>
<ppl:LastName/>
</rdfs:Class>
<rdfs:Class rdf:ID="John">
<rdfs:subClassOf rdf:resource="#Person"/>
<ppl:name>John</ppl:name>
<ppl:LastName>Smith</ppl:LastName>
</rdfs:Class>
<rdfs:Class rdf:ID="Peter">
<rdfs:subClassOf rdf:resource="#John"/>
<ppl:name>Peter</ppl:name>
<ppl:LastName>Smith</ppl:LastName>
</rdfs:Class>
</rdf:RDF>
How may I add that restriction?
EDIT:
After cygri answer I tried a different approach:
<rdf:Description ID="John">
<rdf:type rdf:resource="#Person"/>
<ppl:name>John</ppl:name>
<ppl:LastName>Smith</ppl:LastName>
</rdf:Description>
<rdf:Description ID="Peter">
<rdf:type rdf:resource="#John"/>
<ppl:name>Peter</ppl:name>
<ppl:LastName>Smith</ppl:LastName>
</rdf:Description>
But this still works :(