RDF语义 推荐标准-0

TransWiki - an Open Translation Project(OTP)

摘要_文档状态_目录 第0节 第1节 第2节 第3节 第4节 第5节 第6节 第7节 附录_参考文献


Table of contents

0. Introduction 介绍

0.1 Specifying a formal semantics: scope and limitations指定一个形式语义:范围和局限性

RDF is an assertional language intended to be used to express propositions (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossProposition) using precise formal vocabularies, particularly those specified using RDFS [RDF-VOCABULARY (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-rdf-vocabulary)], for access and use over the World Wide Web, and is intended to provide a basic foundation for more advanced assertional languages with a similar purpose. The overall design goals emphasise generality and precision in expressing propositions about any topic, rather than conformity to any particular processing model: see the RDF Concepts document (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/) [RDF-CONCEPTS (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-rdf-concepts)] for more discussion.
Exactly what is considered to be the 'meaning' of an assertion (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossAssertion) in RDF or RDFS in some broad sense may depend on many factors, including social conventions, comments in natural language or links to other content-bearing documents. Much of this meaning will be inaccessible to machine processing and is mentioned here only to emphasize that the formal (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossFormal) semantics (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossSemantic) described in this document is not intended to provide a full analysis of 'meaning' in this broad sense; that would be a large research topic. The semantics given here restricts itself to a formal (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossFormal) notion of meaning which could be characterized as the part that is common to all other accounts of meaning, and can be captured in mechanical inference (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossInference) rules.
This document uses a basic technique called model theory (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossModeltheory) for specifying the semantics of a formal language. Readers unfamiliar with model theory may find the glossary (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#gloss) in appendix B helpful; throughout the text, uses of terms in a technical sense are linked to their glossary definitions. Model theory assumes that the language refers to a 'world (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossWorld)', and describes the minimal conditions that a world must satisfy in order to assign an appropriate meaning for every expression in the language. A particular world (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossWorld) is called an interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossInterpretation), so that model theory (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossModeltheory) might be better called 'interpretation theory'. The idea is to provide an abstract, mathematical account of the properties that any such interpretation must have, making as few assumptions as possible about its actual nature or intrinsic structure, thereby retaining as much generality as possible. The chief utility of a formal semantic theory is not to provide any deep analysis of the nature of the things being described by the language or to suggest any particular processing model, but rather to provide a technical way to determine when inference processes are valid (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossValid), i.e. when they preserve truth. This provides the maximal freedom for implementations while preserving a globally coherent notion of meaning.
Model theory tries to be metaphysically (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossMetaphysical) and ontologically (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossOntological) neutral. It is typically couched in the language of set theory simply because that is the normal language of mathematics - for example, this semantics assumes that names denote things in a set IR called the 'universe (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossUniverse)' - but the use of set-theoretic language here is not supposed to imply that the things in the universe are set-theoretic in nature. Model theory is usually most relevant to implementation via the notion of entailment (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossEntail), described later, which makes it possible to define valid (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossValid) inference (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossInference) rules.
An alternative way to specify a semantics is to give a translation from RDF into a formal logic with a model theory (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossModeltheory) already attached, as it were. This 'axiomatic semantics' approach has been suggested and used previously with various alternative versions of the target logical language [Conen&Klapsing (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-ConKla)] [Marchiori&Saarela (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-MarSaa)] [McGuinness&al (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-daml-axiomat)]. Such a translation for RDF and RDFS is also given in the Lbase specification [LBASE (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-Lbase)]. The axiomatic semantics style has some advantages for machine processing and may be more readable, but in the event that any axiomatic semantics fails to conform to the model-theoretic semantics described in this document, the model theory should be taken as normative.
There are several aspects of meaning in RDF which are ignored by this semantics; in particular, it treats URI references as simple names, ignoring aspects of meaning encoded in particular URI forms [RFC 2396 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-2369)] and does not provide any analysis of time-varying data or of changes to URI references. It does not provide any analysis of indexical (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossIndexical) uses of URI references, for example to mean 'this document'. Some parts of the RDF and RDFS vocabularies are not assigned any formal meaning, and in some cases, notably the reification and container vocabularies, it assigns less meaning than one might expect. These cases are noted in the text and the limitations discussed in more detail. RDF is an assertional logic (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossLogic), in which each triple expresses a simple proposition (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossProposition). This imposes a fairly strict monotonic (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossMonotonic) discipline on the language, so that it cannot express closed-world assumptions, local default preferences, and several other commonly used non-monotonic (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossNonmonotonic) constructs.
Particular uses of RDF, including as a basis for more expressive languages such as DAML+OIL [DAML (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-daml)] and OWL [OWL (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-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. Semantic extensions of RDF are constrained in this recommendation using the keywords MUST , MUST NOT, SHOULD and MAY of [RFC 2119 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-2119)]. Semantic extensions of RDF MUST conform to the semantic conditions for simple interpretations described in sections 1.3 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#interp) and 1.4 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#gddenot) and 1.5 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#unlabel) and those for RDF interpretations described in section 3.1 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#RDFINTERP) of this document. Any name for entailment in a semantic extension SHOULD be indicated by the use of a vocabulary entailment (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#vocabulary_entail) term. The semantic conditions imposed on an RDF semantic extension MUST define a notion of vocabulary entailment (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#vocabulary_entail) which is valid (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossValid) according to the model-theoretic semantics described in the normative parts of this document; except that if the semantic extension is defined on some syntactically restricted subset of RDF graphs (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defgraph), then the semantic conditions need only apply to this subset. Specifications of such syntactically restricted semantic extensions MUST include a specification of their syntactic conditions which are sufficient to enable software to distinguish unambiguously those RDF graphs (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defgraph) to which the extended semantic conditions apply. Applications based on such syntactically restricted semantic extensions MAY treat RDF graphs (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defgraph) which do not conform to the required syntactic restrictions as syntax errors.
An example of a semantic extension of RDF is RDF Schema [RDF-VOCABULARY (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-rdf-vocabulary)], abbreviated as RDFS, the semantics of which are defined in later parts of this document. RDF Schema imposes no extra syntactic restrictions.

0.2 Graph Syntax

Any semantic theory must be attached to a syntax. This semantics is defined as a mapping on the abstract syntax (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-syntax) of RDF described in the RDF concepts and abstract syntax document [RDF-CONCEPTS (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-rdf-concepts)]. This document uses the following terminology defined there: URI reference, literal, plain literal, typed literal, XML literal, XML value, node, blank node, triple and RDF graph. Throughout this document we use the term 'character string' or 'string' to refer to a sequence of Unicode characters, and 'language tag' in the sense of RFC 3066, c.f. section 6.5 (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-Literal) in [RDF-CONCEPTS (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-rdf-concepts)]. Note that strings in an RDF graph SHOULD be in Normal Form C.
This document uses the N-Triples (http://www.w3.org/TR/rdf-testcases/#ntriples) syntax described in the RDF test cases document [RDF-TESTS (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-rdf-tests)] to describe RDF graphs (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defgraph). This notation uses a node identifier (http://www.w3.org/TR/rdf-testcases/#bNode) (nodeID) convention to indicate blank nodes in the triples of a graph. While node identifiers such as '_:xxx' serve to identify blank nodes in the surface syntax, these expressions are not considered to be the label of the graph node they identify; they are not names, and do not occur in the actual graph. In particular, the RDF graphs (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defgraph) described by two N-Triples documents (http://www.w3.org/TR/rdf-testcases/#ntriples) which differ only by re-naming their node identifiers will be understood to be equivalent (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-graph-equality) . This re-naming convention should be understood as applying only to whole documents, since re-naming the node identifiers in part of a document may result in a document describing a different RDF graph (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defgraph).
The N-Triples syntax requires that URI references be given in full, enclosed in angle brackets. In the interests of brevity, the imaginary URI scheme 'ex:' is used to provide illustrative examples. To obtain a more realistic view of the normal appearance of the N-Triples syntax, the reader should imagine this replaced with something like 'http://www.example.org/rdf/mt/artificial-example/'. The QName prefixes rdf:, rdfs: and xsd: are defined as follows:
Prefix rdf: namespace URI: http://www.w3.org/1999/02/22-rdf-syntax-ns#
Prefix rdfs: namespace URI: http://www.w3.org/2000/01/rdf-schema#
Prefix xsd: namespace URI: http://www.w3.org/2001/XMLSchema#
Since QName syntax is not legal N-Triples syntax, and in the interests of brevity and readability, examples use the convention whereby a QName is used without surrounding angle brackets to indicate the corresponding URI reference enclosed in angle brackets, e.g. the triple
<ex:a> rdf:type rdfs:Class .
should be read as an abbreviation for the N-Triples syntax
<ex:a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; <http://www.w3.org/2000/01/rdf-schema#Class&gt; .
In stating general semantic conditions, single characters or character sequences without a colon indicate an arbitrary name, blank node, character string and so on. The exact meaning will be specified in context.

0.3 Graph Definitions 段落

An RDF graph, or simply a graph, is a set of RDF triples.
A subgraph of an RDF graph is a subset of the triples in the graph. A triple is identified with the singleton set containing it, so that each triple in a graph is considered to be a subgraph. A proper subgraph is a proper subset of the triples in the graph.
A ground RDF graph is one with no blank nodes.
A name is a URI reference or a literal. These are the expressions that need to be assigned a meaning by an interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossInterpretation). Note that a typed literal comprises two name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s: itself and its internal type URI reference.
A set of name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s is referred to as a vocabulary. The vocabulary of a graph is the set of names which occur as the subject, predicate or object of any triple in the graph. Note that URI references which occur only inside typed literals are not required to be in the vocabulary of the graph.
Suppose that M is a mapping from a set of blank nodes to some set of literals, blank nodes and URI references; then any graph obtained from a graph G by replacing some or all of the blank nodes N in G by M(N) is an instance of G. Note that any graph is an instance of itself, an instance of an instance of G is an instance of G, and if H is an instance of G then every triple in H is an instance of some triple in G.
An instance with respect to a vocabulary V is an instance (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#definst) in which all the name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s in the instance that were substituted for blank nodes in the original are name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s from V.
A proper instance of a graph is an instance in which a blank node has been replaced by a name, or two blank nodes in the graph have been mapped into the same node in the instance.
Any instance of a graph in which a blank node is mapped to a new blank node not in the original graph is an instance of the original and also has it as an instance, and this process can be iterated so that any 1:1 mapping between blank nodes defines an instance of a graph which has the original graph as an instance. Two such graphs, each an instance of the other but neither a proper instance, which differ only in the identity of their blank nodes, are considered to be equivalent (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-graph-equality). We will treat such equivalent graphs as identical; this allows us to ignore some issues which arise from 're-naming' nodeIDs, and is in conformance with the convention (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#nodeIDnote) that blank nodes have no label. Equivalent graphs are mutual instances with an invertible instance mapping.
An RDF graph is lean if it has no instance which is a proper subgraph of the graph. Non-lean graphs have internal redundancy and express the same content as their lean subgraphs. For example, the graph
<ex:a> <ex:p> _:x .

_:y <ex:p> _:x .
is not lean (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#deflean), but
<ex:a> <ex:p> _:x .

_:x <ex:p> _:x .
is lean (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#deflean).
A merge of a set of RDF graphs is defined as follows. If the graphs in the set have no blank nodes in common, then the union of the graphs is a merge; if they do share blank nodes, then it is the union of a set of graphs that is obtained by replacing the graphs in the set by equivalent graphs that share no blank nodes. This is often described by saying that the blank nodes have been 'standardized apart'. It is easy to see that any two merges are equivalent, so we will refer to the merge, following the convention on equivalent graphs. Using the convention on equivalent graphs and identity, any graph in the original set is considered to be a subgraph of the merge.
One does not, in general, obtain the merge of a set of graphs by concatenating their corresponding N-Triples (http://www.w3.org/TR/rdf-testcases/#ntriples) documents and constructing the graph described by the merged document. If some of the documents use the same node identifiers, the merged document will describe a graph in which some of the blank nodes have been 'accidentally' identified. To merge N-Triples (http://www.w3.org/TR/rdf-testcases/#ntriples) documents it is necessary to check if the same nodeID is used in two or more documents, and to replace it with a distinct nodeID in each of them, before merging the documents. Similar cautions apply to merging graphs described by RDF/XML documents which contain nodeIDs, see RDF/XML Syntax Specification (Revised) (http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/) [RDF-SYNTAX (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-rdf-syntax)].

Other languages
 
 Page execution time: 571.97 ms.
网上报警 苏ICP备05002329号