What is the difference between rdf:resource and rdfs:resource?

What is the difference between rdf:resource and rdfs:resource?

  • rdf:resource is a built-in piece of syntactic suger used in RDF/XML syntax. It's an XML attribute used to say that its value is a URI. See here. Importantly, the term rdf:resource will not appear in the final triples parsed from the RDF/XML document. As such, rdf:resource is specific to RDF/XML and doesn't mean anything (and is poorly named IMO).

  • rdfs:resource (with lower-case "r") is not defined.

  • rdfs:Resource (with upper-case "R") is the class containing all resources that can be described in RDF ... essentially the class that contains everything.

If you parse this example in the W3C validator here, you get back two triples about Tim Berners-Lee:

 <?xml version="1.0"?>
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   <rdfs:Resource rdf:about="http://www.w3.org/People/Berners-Lee/card#i">
     <rdfs:seeAlso rdf:resource="http://www.w3.org/" /> 

The first triple says that Tim is in the class rdfs:Resource. The second gives a related link to the W3C through the rdfs:seeAlso predicate. Importantly, rdf:resource will not be mentioned anywhere in the output.

In summary, unless talking about the RDF/XML syntax, rdfs:Resource is probably what is meant ... it refers to the class of all things in RDF.