1. RDF schema is quite different from XML Schema
XML Schema constrains the structure of XML documents, whereas RDF Schema defines the vocabulary used in RDF data models.
3.2 RDF: Basic Ideas1. Concepts
Resource
Property
Statement
2. reification(具体化) mechanism
3. typed literal
RDF里用到的很多数据类型是在XML Schema里定义的,比如Boolean, integer等
3.3 RDF: XML-Based syntax1. XML和RDF中Namespace的区别
XML中的namespace是用来保证元素的唯一性.
RDF中的external namespace指向一个RDF文件,这个文件里定义了一些resource,被导入到了当前RDF中.
2. 引用namespace的一种写法
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XLMSchema#"
xmlns:uni="http://www.mydomain.org/uni-ns#">
……
<rdf:Description rdf:about="CIT1111">
<rdf:type rdf:resource="&uni;course"/>
// 应该相当于<rdf:type rdf:resource=”http://www.mydomain.org/uni-ns#course”>, 即&uni用来指代xmlns:uni的值
<uni:courseName>Discrete Mathematics</uni:courseName>
<uni:isTaughtBy rdf:resource="949318"/>
</rdf:Description>
3.4 RDF Schema: Basic Idea1. RDF Schema is a primitive ontology language.
2. In RDFS, properties are defined globally.
3. In RDFS, properties also have class hierarchy.
4. RDFS ingredients: subClassOf, Class, Property, subPropertyOf, Resource, etc.
3.5 RDF Schema: The Language1. Core Class
rdfs:Resource
rdfs:Class
rdfs:Literal
rdf:Property
rdf:Statement
2. Core Property for defining relationship
rdfs:domain
指定可以做这个property的subjet
rdfs:range
指定可以做这个property的object
3. Useful Properties for Reification
rdf:subject
rdf:predicate
rdf:object
4. Container Class
rdf:Bag
rdf:Alt
rdf:Seq
5. Utillity Properties
rdfs:seealso
rdfs:comment
3.6 RDF and RDF Schema in RDF Schema3.7 An Axiomatic Semantics for RDF and RDF Schema// 没看
逻辑推理
3.8 A Direct Inference System for RDF and RDFS// 没看
3.9 Querying in RQL1. Why not use XML query language?
(1) 相同的内容可以用不同的形式来表示,无法用统一的XPath语句来查询
如以下3段都表示了相同的意思:
<rdf:Description rdf:about="949318">
<rdf:type rdf:resource="&uni;lecturer"/>
<uni:name>David Billington</uni:name>
<uni:title>Associate Professor</uni:title>
</rdf:Description>
rdf query: /rdf:Description[rdf:type="http://www.mydomain.org/uni-ns#lecturer"]/uni:title
或
<uni:lecturer rdf:about="949318">
<uni:name>David Billington</uni:name>
<uni:title>Associate Professor</uni:title>
</uni:lecturer>
rdf query: //uni:lecturer/uni:title
或
<uni:lecturer rdf:about="949318"
uni:name="David Billington"
uni:title="Associate Professor"/>
rdf query: //uni:lecturer/@uni:title
(2) XML 查询语言(如XPath) 不支持semantic(如无法”理解”继承关系)
2 RQL的基本语法
见教材
3.10 SummarySuggested ReadingAn extensive list of tools and other resources is maintained at:
• <http://www.ilrt.bris.ac.uk/discovery/rdf/resources/>.
•<http://www.w3.org/RDF>