RDF
RDF, taken together with the associated Resource Description Framework Schema (RDFS), creates a languages for representing simple ontologies and knowledge bases on the web, where RDF is used to define the knowledge base, and RDFS is used to define the ontology.
URIs
Uniform Resource Identifiers (URIs) can be used to identify resources. A commonly used URI is a URL, which refers to a network accessible resource. A URI is more general-purpose, and can refer to anything, including humans, everyday objects, and even abstract concepts. Although most URIs appear to be valid URLs, they will not necessarily have a network counterpart, and are only a name for a resource, rather than a way of actually retrieving it. URI element references are often given in the form of a URI and a fragment identifier, separated by the # symbol. For example, the URI reference for the SubClassOf concept is http://www.w3.org/2000/01/rdf-schema#subClassOf
The two most commonly used URIs in RDF are
- http://www.w3.org/2000/01/rdf-schema
- http://www.w3.org/1999/02/22-rdf-syntax-ns
These are the URIs for the RDF and RDFS descriptions.
However, we can see that typing out the URI for every reference is rapidly going to become annoying! To prevent this we use a system of namespacing. In this we specify a unique reference for each URI. This only has to be done once, and then throughout the document we can simply use this reference in place of the URI. XML namespaces (xmlns) can be placed anywhere in the document, but it is standard practice to place them at the beginning, within the rdf tag.
These namespaces have the form xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns", where the rdf after xmlns: refers to the entire URI (the item after the =). Instead of using the full URI each time, we can now simply type rdf: and the element.