RDF语义 推荐标准-4

TransWiki - an Open Translation Project(OTP)

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


Table of contents

4. Interpreting the RDFS Vocabulary

4.1 RDFS Interpretations

RDF Schema [RDF-VOCABULARY (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-rdf-vocabulary)] extends RDF to include a larger vocabulary rdfsV with more complex semantic constraints:









RDFS vocabulary

rdfs:domain rdfs:range rdfs:Resource rdfs:Literal rdfs:Datatype rdfs:Class rdfs:subClassOf rdfs:subPropertyOf rdfs:member rdfs:Container rdfs:ContainerMembershipProperty rdfs:comment rdfs:seeAlso rdfs:isDefinedBy rdfs:label

(rdfs:comment, rdfs:seeAlso, rdfs:isDefinedBy and rdfs:label are included here because some constraints which apply to their use can be stated using rdfs:domain, rdfs:range and rdfs:subPropertyOf. Other than this, the formal semantics does not assign them any particular meanings.)
Although not strictly necessary, it is convenient to state the RDFS semantics in terms of a new semantic construct, a 'class (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossClass)', i.e. a resource which represents a set of things in the universe which all have that class as the value of their rdf:type property. Classes are defined to be things of type rdfs:Class, and the set of all classes in an interpretation will be called IC. The semantic conditions are stated in terms of a mapping ICEXT (for the Class Extension in I) from IC to the set of subsets of IR. The meanings of ICEXT and IC in a rdf-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfinterpdef) of the RDFS vocabulary are completely defined by the first two conditions in the table of RDFS semantic conditions, below. Notice that a class may have an empty class extension; that (as noted (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#technote) earlier) two different class entities could have the same class extension; and that the class extension of rdfs:Class contains the class rdfs:Class.
An rdfs-interpretation of V is an rdf-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfinterpdef) I of (V union rdfV (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defRDFV) union rdfsV) (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defRDFSV) which satisfies the following semantic conditions and all the triples in the subsequent table, called the RDFS axiomatic triples.
RDFS semantic conditions.

































x is in ICEXT(y) if and only if <x,y> is in IEXT(I(rdf:type))
IC = ICEXT(I(rdfs:Class))
IR = ICEXT(I(rdfs:Resource))
LV = ICEXT(I(rdfs:Literal))


If <x,y> is in IEXT(I(rdfs:domain)) and <u,v> is in IEXT(x) then u is in ICEXT(y)


If <x,y> is in IEXT(I(rdfs:range)) and <u,v> is in IEXT(x) then v is in ICEXT(y)


IEXT(I(rdfs:subPropertyOf)) is transitive and reflexive on IP


If <x,y> is in IEXT(I(rdfs:subPropertyOf)) then x and y are in IP and IEXT(x) is a subset of IEXT(y)


If x is in IC then <x, I(rdfs:Resource)> is in IEXT(I(rdfs:subClassOf))


If <x,y> is in IEXT(I(rdfs:subClassOf)) then x and y are in IC and ICEXT(x) is a subset of ICEXT(y)


IEXT(I(rdfs:subClassOf)) is transitive and reflexive on IC


If x is in ICEXT(I(rdfs:ContainerMembershipProperty)) then:

< x, I(rdfs:member)> is in IEXT(I(rdfs:subPropertyOf))


If x is in ICEXT(I(rdfs:Datatype)) then <x, I(rdfs:Literal)> is in IEXT(I(rdfs:subClassOf))


RDFS axiomatic triples.






rdf:type rdfs:domain rdfs:Resource .

rdfs:domain rdfs:domain rdf:Property .

rdfs:range rdfs:domain rdf:Property .

rdfs:subPropertyOf rdfs:domain rdf:Property .

rdfs:subClassOf rdfs:domain rdfs:Class .

rdf:subject rdfs:domain rdf:Statement .

rdf:predicate rdfs:domain rdf:Statement .

rdf:object rdfs:domain rdf:Statement .

rdfs:member rdfs:domain rdfs:Resource .

rdf:first rdfs:domain rdf:List .

rdf:rest rdfs:domain rdf:List .

rdfs:seeAlso rdfs:domain rdfs:Resource .

rdfs:isDefinedBy rdfs:domain rdfs:Resource .

rdfs:comment rdfs:domain rdfs:Resource .

rdfs:label rdfs:domain rdfs:Resource .

rdf:value rdfs:domain rdfs:Resource .



rdf:type rdfs:range rdfs:Class .

rdfs:domain rdfs:range rdfs:Class .

rdfs:range rdfs:range rdfs:Class .

rdfs:subPropertyOf rdfs:range rdf:Property .

rdfs:subClassOf rdfs:range rdfs:Class .

rdf:subject rdfs:range rdfs:Resource .

rdf:predicate rdfs:range rdfs:Resource .

rdf:object rdfs:range rdfs:Resource .

rdfs:member rdfs:range rdfs:Resource .

rdf:first rdfs:range rdfs:Resource .

rdf:rest rdfs:range rdf:List .

rdfs:seeAlso rdfs:range rdfs:Resource .

rdfs:isDefinedBy rdfs:range rdfs:Resource .

rdfs:comment rdfs:range rdfs:Literal .

rdfs:label rdfs:range rdfs:Literal .

rdf:value rdfs:range rdfs:Resource .



rdf:Alt rdfs:subClassOf rdfs:Container .

rdf:Bag rdfs:subClassOf rdfs:Container .

rdf:Seq rdfs:subClassOf rdfs:Container .

rdfs:ContainerMembershipProperty rdfs:subClassOf rdf:Property .



rdfs:isDefinedBy rdfs:subPropertyOf rdfs:seeAlso .



rdf:XMLLiteral rdf:type rdfs:Datatype .

rdf:XMLLiteral rdfs:subClassOf rdfs:Literal .

rdfs:Datatype rdfs:subClassOf rdfs:Class .



rdf:_1 rdf:type rdfs:ContainerMembershipProperty .

rdf:_1 rdfs:domain rdfs:Resource .

rdf:_1 rdfs:range rdfs:Resource .

rdf:_2 rdf:type rdfs:ContainerMembershipProperty .

rdf:_2 rdfs:domain rdfs:Resource .

rdf:_2 rdfs:range rdfs:Resource .

...

Since I is an rdf-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfinterpdef), the first condition implies that IP = ICEXT(I(rdf:Property)).
These axioms and conditions have some redundancy: for example, all but one of the RDF axiomatic triples can be derived from the RDFS axiomatic triples and the semantic conditions on ICEXT, rdfs:domain and rdfs:range. Other triples which must be true in all rdfs-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfsinterpdef)s include the following:
Some triples which are rdfs-valid.






rdfs:Resource rdf:type rdfs:Class .

rdfs:Class rdf:type rdfs:Class .

rdfs:Literal rdf:type rdfs:Class .

rdf:XMLLiteral rdf:type rdfs:Class .

rdfs:Datatype rdf:type rdfs:Class .

rdf:Seq rdf:type rdfs:Class .

rdf:Bag rdf:type rdfs:Class .

rdf:Alt rdf:type rdfs:Class .

rdfs:Container rdf:type rdfs:Class .

rdf:List rdf:type rdfs:Class .

rdfs:ContainerMembershipProperty rdf:type rdfs:Class .

rdf:Property rdf:type rdfs:Class .

rdf:Statement rdf:type rdfs:Class .



rdfs:domain rdf:type rdf:Property .

rdfs:range rdf:type rdf:Property .

rdfs:subPropertyOf rdf:type rdf:Property .

rdfs:subClassOf rdf:type rdf:Property .

rdfs:member rdf:type rdf:Property .

rdfs:seeAlso rdf:type rdf:Property .

rdfs:isDefinedBy rdf:type rdf:Property .

rdfs:comment rdf:type rdf:Property .

rdfs:label rdf:type rdf:Property .




Note that datatype (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defDatatype)s are allowed to have class extensions, i.e. are considered to be classes, in RDFS. As illustrated by the semantic condition on the class extension of rdf:XMLLiteral, the members of a datatype class are the values of the datatype (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defDatatype). This is explained in more detail in section 5 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#dtype_interp) below. The class rdfs:Literal contains all literal values; however, typed literals whose strings do not conform to the lexical requirements of their datatype (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defDatatype) are required to have meanings not in this class. The semantic conditions on rdf-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfinterpdef)s imply that ICEXT(I(rdf:XMLLiteral)) contains all XML values of well-typed XML literals.
The conditions on rdf:XMLLiteral and rdfs:range taken together make it possible to write a contradictory statement in RDFS, by asserting that a property value must be in the class rdf:XMLLiteral but applying this property with a value which is an ill-formed XML literal, and therefore required to not be in that class: for example
<ex:a> <ex:p> "<notLegalXML"^^rdf:XMLLiteral .

<ex:p> rdfs:range rdf:XMLLiteral .
cannot be true in any rdfs-interpretation; it is rdfs-inconsistent (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossInconsistent).

4.2 Extensional Semantic Conditions (Informative)

The semantics given above is deliberately chosen to be the weakest 'reasonable' interpretation of the RDFS vocabulary. Semantic extensions MAY strengthen the range, domain, subclass and subproperty semantic conditions to the following 'extensional (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossExtensional)' versions:
Extensional alternatives for some RDFS semantic conditions.















<x,y> is in IEXT(I(rdfs:subClassOf)) if and only if x and y are in IC and ICEXT(x) is a subset of ICEXT(y)


<x,y> is in IEXT(I(rdfs:subPropertyOf)) if and only if x and y are in IP and IEXT(x) is a subset of IEXT(y)


<x,y> is in IEXT(I(rdfs:range)) if and only if (if <u,v> is in IEXT(x) then v is in ICEXT(y))


<x,y> is in IEXT(I(rdfs:domain)) if and only if (if <u,v> is in IEXT(x) then u is in ICEXT(y))


which would guarantee that the subproperty and subclass properties were transitive and reflexive, but would also have further consequences.
These stronger conditions would be trivially satisfied when properties are identified with property extensions, classes with class extensions, and rdfs:SubClassOf understood to mean subset, and hence would be satisfied by an extensional (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossExtensional) semantics for RDFS. In some ways the extensional versions provide a simpler semantics, but they require more complex inference rules. The 'intensional' semantics described in the main text provides for most common uses of subclass and subproperty assertions, and allows for simpler implementations of a complete (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossComplete) set of RDFS entailment rules, described in section 7.3 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#RDFSRules).

4.3 A Note on rdfs:Literal

Although the semantic conditions on rdfs-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfsinterpdef)s include the intuitively sensible condition that ICEXT(I(rdfs:Literal)) must be the set LV, there is no way to impose this condition by any RDF assertion or inference rule. This limitation is due to the fact that RDF does not allow literals to occur in the subject position of a triple, so there are severe restrictions on what can be said about literals in RDF. Similarly, while properties may be asserted of the class rdfs:Literal, none of these can be validly transferred to literals themselves.
For example, a triple of the form
<ex:a> rdf:type rdfs:Literal .
is consistent even though 'ex:a' is a URI reference rather than a literal. What it says is that I(ex:a) is a literal value, ie that the URI reference 'ex:a' denotes a literal value. It does not specify exactly which literal value it denotes.
The semantic conditions guarantee that any triple containing a plain literal object entails a similar triple with a blank node as object:
<ex:a> <ex:b> "10" .
entails
<ex:a> <ex:b> _:xxx .
This means that the literal denotes an entity, which could therefore also be named, at least in principle, by a URI reference.

4.4 RDFS Entailment

S rdfs-entails E when every rdfs-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfsinterpdef) which satisfies every member of S also satisfies E. This follows the wording of the definition of simple entailment (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defentail) in Section 2 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#entail), but refers only to rdfs-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfsinterpdef)s instead of all simple interpretations. Rdfs-entailment is an example of vocabulary entailment (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#vocabulary_entail).
Since every rdfs-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfsinterpdef) is an rdf-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfinterpdef), if S rdfs-entails E then it rdf-entails E; but rdfs-entailment is stronger than rdf-entailment. Even the empty graph has a large number of rdfs-entailments which are not rdf-entailments, for example all triples of the form
xxx rdf:type rdfs:Resource .
are true in all rdfs-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfsinterpdef)s of any vocabulary containing the URI reference xxx.
An rdfs-inconsistent graph rdfs-entails any graph, by the definition of entailment; such 'trivial entailments' by an inconsistent set are not usually considered useful inferences to draw in practice, however.

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