Best Practice: Use rdfs:label
and rdfs:comment
in RDF Vocabularies
State: Approved
Contact: Arthur Ryman
Scope
This Best Practice recommends appropriate usage of
rdfs:label
and
rdfs:comment
in RDF vocabularies.
Recommendation
The
RDF Schema vocabulary defines the terms
rdfs:label
and
rdfs:comment
, which have a similar meaning to
Dublin Core vocabulary terms
dcterms:title
and
dcterms:description
.
The RDF Schema terms SHOULD only be used in vocabulary documents. The value of
rdfs:label
SHOULD be the part of the URI that comes after the final hash or slash. The value of
rdfs:comment
should be a brief description of the term.
On the other hand, the Dublin Core terms SHOULD be used in descriptions of individual document-like resources, e.g. those defined in Open Services for Lifecycle Collaboration (OSLC) specifications.
dcterms:title
SHOULD be a one line summary of the resource, e.g. the title of an article or the headline of a bug report.
dcterms:description
should be a longer description, possibly containing multiple paragraphs. If either term contains markup then the datatype MUST be XML Literal. The preferred markup for text is XHTML. Note that
RDF Schema 1.1 introduced a new literal type for HTML, so this Best Practice needs to be revised.
Examples
Here is an example snippet of an RDF vocabulary document:
@prefix oslc: <http://open-services.net/ns/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
oslc:ServiceProvider a rdfs:Class ;
rdfs:isDefinedBy oslc: ;
rdfs:label "ServiceProvider" ;
rdfs:comment "The Service Provider resource" ;
rdfs:seeAlso <http://open-services.net/bin/view/Main/OslcCoreSpecification#Resource_Service_Provider> .
Links to additional information