Another Spin on RDF with Contexts
OK, describing the RDFC idea as finding a compromise between global and local views of IRI meanings, and as a revision of RDF itself, has raised some hackles and concerns. So this Wiki page is a different way to spin essentially the same idea, making it sound a lot less threatening (I hope).
We dont say we are redefining RDF, and we don't talk about RDFC. We don't use the term 'local' or talk about changing the meanings of IRIs. Instead, we talk about extending RDF with an option that allows users to describe and name their own semantic extensions, so that they and others can use them to express more things in RDF. Its a kind of do-it-yourself RDF-extending kit.
The idea of semantic extension is already introduced and sketchily defined in the 2004 specs, the relevant text being "Particular uses of RDF, including as a basis for more expressive languages such as DAML+OIL [DAML] and OWL [OWL], may impose further semantic conditions in addition to those described here, and such extra semantic conditions can also be imposed on the meanings of terms in particular RDF vocabularies. Extensions or dialects of RDF which are obtained by imposing such extra semantic conditions may be referred to as semantic extensions of RDF. " So the proposal is now to take this idea and run a little further with it.
Although the terminology has changed, the formal machinery and its intended uses are exactly as in the earlier proposal, so I have kept the same IRI names for comparison. However, if this way of describing it is preferred, then we might want to change rdf:inherits to something like rdf:inExtension.
Semantic Extensions to RDF
A semantic extension, or simply an extension, to RDF represents a named public agreement to use a particular vocabulary of IRIs, called the reserved vocabulary of the extension, with a particular meaning defined by the extension. Semantic extensions must not violate the basic semantics of RDF, but they can extend it by imposing special meanings on IRIs. The OWL and RDFS standards are semantic extensions to RDF defined by their W3C specifications documents. (In these cases the reserved vocabulary constitutes a namespace, but this is not required.) Users may invent their own extensions and indicate them by an IRI. Then, including a triple
<> rdf:inherits C .
in an RDF graph, where C indicates the semantic extension, means that C-reserved IRIs which occur in the rest of the graph are to be interpreted using the semantic constraints of that extension. Several such triples may be included in a graph, in which case all the indicated extensions apply, each to its own reserved vocabulary.
(***This presumes that there is a clear notion of a graph boundary, which is not true in current (2004) RDF, but is widely presumed. This is something we need to fix.***)
(It is possible that two extensions might impose inconsistent conditions on the same reserved vocabulary, so that inheriting both of them makes it impossible to satisfy a graph. In this case the graph is considered to be RDF-inconsistent, and this situation may be flagged as an error when detected.)
Note, we use the term 'indicates' because the indicating URI might denote something else. In general, any IRI may be used to indicate a semantic extension, but it does not therefore denote or refer to or identify that extension. Semantic extensions are not things in the universe of discourse of RDF. The recommended practice is to have the IRI which is used to indicate an extension identify a document which defines the vocabulary and semantic conditions of the extension; but any IRI, for example one which identifies a human person or an OWL class, may be used to indicate an extension.
A description of a semantic extension must define the restricted vocabulary of the extension, so that there is an algorithm which will determine, for any IRI, whether or not it is in the vocabulary; and should describe the intended meanings of these IRIs in a form which defines a set of RDF interpretations on the vocabulary as being those which satisfy the semantic conditions of the extension. A semantic extension may specify certain RDF graphs or combinations of RDF triples as required, or as illegal; in which case an algorithm must be defined which can determine, for any RDF graph, whether or not it satisfies these syntactic constraints of the extension.
A (recommended) way to define the vocabulary is to include an RDF graph in the documentation which uses all the IRIs in the reserved vocabulary. This context graph may also represent some of the semantic conditions on the vocabulary. However, semantic conditions may be defined in any way, for example by stating conditions on interpretations directly, by providing axioms or rules, or in natural-language text. They may be omitted altogether, but of course the less information that is provided about the semantic conditions, the less useful the extension may be. We leave this situation under-defined deliberately, in anticipation of a scenario where a relatively under-defined extension gradually becomes clearer as it gets used by a community.
The context graph, if provided, must be true under the semantic conditions of the extension. If the context graph of an extension A includes an inheritance triple of the form <> rdf:inherits B . , then the extension A is called an extension of B, and includes all of the semantic constraints of B, plus (presumably) some others of its own. The reserved vocabulary of A may overlap with that of B, which indicates that A imposes further conditions on this part of the vocabulary. An extension of an extension B must not contradict any of the conditions imposed by B, but it may add further conditions. (For example, if A extends B and B specifies that the IRI x:Person is the class of human beings, then A may specify that this IRI is the class of American citizens, but it may not claim that it is the class of insects.)
An extension may be completely specified by a context graph, in which case the semantic constraint is simply that the graph be true. In this case, called a graph extension, rdf:inherits has exactly the same meaning as owl:imports. This is understood to be the case when the extension is indicated by an IRI identifying an RDF graph, or a document which parses to a graph in some accepted RDF notation.
A special case
A graph may be asserted in itself; that is, in the extension defined by treating it as the context graph of that extension. This has the effect of 'isolating' the IRIs in the graph from any meaning they might have in other graphs, allowing them to be interpreted locally in that particular graph as a unique context of meaning. This technique may be found useful when sorting RDF content found "in the wild" into coherent groups, without being obliged to treat IRIs in separate groups as necessarily identical in meaning. This can be done using graph naming in a SPARQL dataset as follows: