RDF教程 [转]

RDF教程

资源描述框架Resource Description Framework (RDF)用于描述网页资源,例如一个网页的标题、作者以及有关日期、内容和版权信息的修改。它是W3C的推荐标准。

内容目录

RDF 介绍
This chapter explains what RDF is and what it can be used for.
什么是RDF,它能做什么用?

RDF 规则
This chapter explains the syntax and terms used in RDF.
一些用于RDF的语法和术语

RDF 实例
This chapter explains an RDF example.
有关RDF的一些举例

RDF Main 元素
This chapter explains the main elements of RDF: <RDF> and <Description>.
有关RDF的主要元素:<RDF> 和 <Description>.

RDF Container 元素
RDF containers are used to describe group of things. This chapter explains the container elements of RDF: <Bag>, <Seq>, and <Alt>.
下列RDF元素是用于描述这些标签组的:<Bag>, <Seq>,和<Alt>.

RDF 集合
RDF collections are used to describe groups that contains ONLY the specified members. This chapter explains how to describe a collection.
RDF的集合只用来描述容器里的指定成员。这个章节将介绍如何去描述一个集合

RDF Schema (RDFS)
This chapter explains the RDF Schema extension to RDF.
这章介绍了RDF的扩展对象RDF Schema

RDF Dublin Core Metadata Initiative (DCMI)
This chapter is about the Dublin Core Metadata Initiative (DCMI) that provides properties for describing network objects.
这章介绍了DCMI,它提供了描述网络对象的属性

RDF 参考
This chapter contains a complete RDF reference.
这章罗列了完整的RDF参数

RDF / OWL
This chapter describes the OWL language built on top of RDF.
这章描述了用于在RDF顶端创建的OWL语言

RDF 介绍
w3pop.com / 2006-09-21

RDF 规则

The Resource Description Framework (RDF) is a W3C standard for describing Web resources, such as the title, author, modification date, content, and copyright information of a Web page.
资源描述框架Resource Description Framework (RDF)用于描述网页资源,例如一个网页的标题、作者以及有关日期、内容和版权信息的修改。它是W3C的推荐标准。


What You Should Already Know
你应该已经了解的

Before you continue you should have a basic understanding of the following:
继续下面的学习之前你该对以下内容有基本的了解:

  • HTML
    超文本链接表示语言
  • XHTML
    可扩展超文本链接表示语言
  • XML
    可扩展标记语言
  • XML Namespaces
    XML名称空间

If you want to study these subjects first, find the tutorials on our Home page.
如果你学这些内容,请寻找我们主页上的教程


What is RDF?
什么是RDF?

  • RDF stands for Resource Description Framework
    RDF 代表Resource Description Framework
  • RDF is a framework for describing resources on the web
    • RDF用于描述网页上的资源
  • RDF provides a model for data, and a syntax so that independent parties can exchange and use it
    • RDF为数据提供了模式和语法,使得独立部分可以交换和使用数据
  • RDF is designed to be read and understood by computers
    • RDF能被计算机读懂和理解
  • RDF is not designed for being displayed to people
    • RDF并不展示给人看
  • RDF is written in XML
    • RDF以XML形式书写
  • RDF is a part of the W3C's Semantic Web Activity
    • RDF是W3C语义网页活动(Semantic Web Activity)的一部分
  • RDF is a W3C Recommendation
    • RDF是W3C的参考标准

RDF - Examples of Use
RDF 案例

  • Describing properties for shopping items, such as price and availability
    • 描述出售货物的性质,如价格和用途
  • Describing time schedules for web events
    • 描述网页事件的时间表
  • Describing information about web pages, such as content, author, created and modified date
    • 描述关于网页的信息,如内容、作者、创建和修改后的日期
  • Describing content and rating for web pictures
    • 描述网页图片的内容和排列
  • Describing content for search engines
    • 描述搜索引擎的内容
  • Describing electronic libraries
    • 描述电子库

RDF is Designed to be Read by Computers
RDF可被计算机读取

RDF was designed to provide a common way to describe information so it can be read and understood by computer applications.
RDF用于提供可被计算机应用软件读和理解的方式来描述数据的。

RDF descriptions are not designed to be displayed on the web.
RDF描述是不会在网页上显示的。


RDF is Written in XML
RDF是以XML形式书写的

RDF documents are written in XML. The XML language used by RDF is called RDF/XML.
RDF文档是以XML形式书写的。RDF用的XML语言称为RDF/XML。

By using XML, RDF information can easily be exchanged between different types of computers using different types of operating systems and application languages.
通过使用XML语言,RDF信息可以非常容易地在使用不同类型操作系统和应用软件语言的计算机上进行交换。


RDF and "The Semantic Web"
RDF和“语义网页”

The RDF language is a part of the W3C's Semantic Web Activity. W3C's "Semantic Web Vision" is a future where:
RDF是W3C语义网页活动(Semantic Web Activity)的一部分。W3C的“语义网页景象”将会是这样的:

  • Web information has exact meaning
    • 网页信息有确切的意思
  • Web information can be understood and processed by computers
    • 网页信息能被计算机理解和处理
  • Computers can integrate information from the web
    • 计算机能从网页上整合信息

RDF is a W3C Recommandation
RDF是W3C的参考标准

RDF became a W3C Recommendation in February 2004.
RDF在2004年2月成为W3C的参考标准

A W3C Recommendation is understood by the industry and the web community as a web standard. A W3C Recommendation is a stable specification developed by a W3C Working Group and reviewed by the W3C Membership.
WC3参考标准是整个产业和网页团体所认同的网页标准。一份W 3C参考标准是由W3C工作团体开发的并由W3C成员检验的的稳定的规范说明。

The official W3C recommendation can be found at this link:

http://www.w3.org/RDF/
官方的W3C推荐标准可以在这个链接找到http://www.w3.org/RDF/

RDF 规则
w3pop.com / 2006-09-21

RDF 介绍 RDF 实例

RDF uses Web identifiers (URIs) to identify resources.
RDF用网页识别器(URIs)识别资源。

RDF describes resources with properties and property values.
RDF用属性和属性值来描述资源。


RDF Resource, Property, and Property Value
RDF资源,属性,属性值

RDF identifies things using Web identifiers (URIs), and describes resources with properties and property values.
RDF用网页识别器(URIs)识别资源,用属性和属性值来描述资源。

Explanation of Resource, Property, and Property value:
对资源,属性,属性值的解释:

  • A Resource is anything that can have a URI, such as http://www.w3pop.com/tech/school/rdf
    • 资源是可以有URI的任何东西,例如“http://www.w3pop.com/tech/school/rdf
  • A Property is a Resource that has a name, such as "author" or "homepage"
    “属性”是有名称的资源,例如"author"(作者) 或 "homepage"(主页)
  • A Property value is the value of a Property, such as "Jan Egil Refsnes" or "http://www.w3pop.com" (note that a property value can be another resource)
    • 属性值是属性的值,例如"Jan Egil Refsnes" 或“http://www.w3pop.com” (注意一个属性值可以是另外的资源)

The following RDF document could describe the resource http://www.w3pop.com/tech/school/rdf:
下面的RDF文档可以描述资源"http://www.w3pop.com/tech/school/rdf":

<?xml version="1.0"?>
<RDF>
<Description about="http://www.w3pop.com/tech/school/rdf">

<author>Jan Egil Refsnes</author>
<homepage>http://www.w3pop.com</homepage>
</Description>
</RDF>

 The example above is simplified. Namespaces are omitted.
上面的例子是简化了的。名称空间已省略了。


RDF Statements
RDF称述

The combination of a Resource, a Property, and a Property value forms a Statement (known as the subject, predicate and object of a Statement).
一个资源,一个属性,和一个属性值的结合形成了一段称述(一般被认为是称述的主语,谓语,宾语)

Let's look at some example statements to get a better understanding:
让我们看些称述示例来有更好的理解:

Statement: "The author of http://www.w3pop.com/tech/school/rdf is Jan Egil Refsnes".
称述:: "The author of http://www.w3pop.com/tech/school/rdf is Jan Egil Refsnes".

  • The subject of the statement above is: http://www.w3pop.com/tech/school/rdf
    • 上述称述的主语是http://www.w3pop.com/tech/school/rdf
  • The predicate is: author
    谓语是:author
  • The object is: Jan Egil Refsnes
    宾语是:Jan Egil Refsnes

Statement: "The homepage of http://www.w3pop.com/tech/school/rdf is http://www.w3pop.com".
陈述:: "The homepage of http://www.w3pop.com/tech/school/rdf is http://www.w3pop.com".

RDF 实例
w3pop.com / 2006-09-21

RDF 规则 RDF 元素

RDF Example
RDF例子

This is a few lines from a CD-list:
下面是一份CD名单的几行内容:

Title Artist Country Company Price Year
Empire Burlesque Bob Dylan USA Columbia 10.90 1985
Hide your heart Bonnie Tyler UK CBS Records 9.90 1988
...          

This is a few lines of an RDF document:
这是一份RDF文档的几行内容:

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
rdf:about="http://www.recshop.fake/cd/Empire Burlesque">

<cd:artist>Bob Dylan</cd:artist>
<cd:country>USA</cd:country>
<cd:company>Columbia</cd:company>
<cd:price>10.90</cd:price>

<cd:year>1985</cd:year>
</rdf:Description>
<rdf:Description
rdf:about="http://www.recshop.fake/cd/Hide your heart">
<cd:artist>Bonnie Tyler</cd:artist>
<cd:country>UK</cd:country>

<cd:company>CBS Records</cd:company>
<cd:price>9.90</cd:price>
<cd:year>1988</cd:year>
</rdf:Description>

.
.
.
</rdf:RDF>

The first line of the RDF document is the XML declaration. The XML declaration is followed by the root element of RDF documents: <rdf:RDF>.
<rdf:RDF>.RDF文档的第一行是XML声明。XML声明后跟着的是RDF文档的根元素:

The xmlns:rdf namespace, specifies that elements with the rdf prefix are from the namespace http://www.w3.org/1999/02/22-rdf-syntax-ns#.
名称空间xmlns:rdf,指定了前缀为“rdf”的元素来自名称空间"http://www.w3.org/1999/02/22-rdf-syntax-ns#".

The xmlns:cd namespace, specifies that elements with the cd prefix are from the namespace http://www.recshop.fake/cd#.
名称空间xmlns:cd,指定了前缀为“cd”的元素来自名称空间"http://www.recshop.fake/cd#".

The <rdf:Description> element contains the description of the resource identified by the rdf:about attribute.
<rdf:Description>元素包含着被rdf:about属性确认的资源的描述

The elements: <cd:artist>, <cd:country>, <cd:company>, etc. are properties of the resource.
<cd:artist>, <cd:country>, <cd:company>等等元素是资源的属性


RDF Online Validator
RDF在线检验器

W3C's RDF Validation Service is useful when learning RDF. Here you can experiment with RDF files.
W3C's RDF Validation Service(W3C的RDF检验器服务)对你学习RDF是非常有帮助的。这里你可以体验一下RDF文件

The online RDF Validator parses your RDF document, checks your syntax, and generates tabular and graphical views of your RDF document.
在线RDF有效性解析器的作用是解析你的RDF文档,检查语法,使你的RDF文档视图表格化和图形化。

Copy and paste the example below into W3C's RDF validator:
把下面的例子复制粘贴到W3C的RDF的有效性解析器(W3C's RDF validator)上:

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:si="http://www.recshop.fake/siteinfo#">
<rdf:Description rdf:about="http://www.w3schools.com/RDF">

<si:author>Jan Egil Refsnes</si:author>
<si:homepage>http://www.w3schools.com</si:homepage>
</rdf:Description>
</rdf:RDF>

When you parse the example above, the result will look something like this.
解析上述例子,结果会像这样

RDF 元素
w3pop.com / 2006-09-21

RDF 实例 RDF 容器

The main elements of RDF are the root element, <RDF>, and the <Description> element, which identifies a resource.
RDF的主要元素是根元素、<RDF>、以及可识别资源的<Description>元素。


The <rdf:RDF> Element
<rdf:RDF>元素

<rdf:RDF> is the root element of an RDF document. It defines the XML document to be an RDF document. It also contains a reference to the RDF namespace:
<rdf:RDF>是RDF文档的根元素。它定义了一份XML文档将成为一份RDF文档。它也提及了RDF名称空间(namespace):

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
.
. Description goes here
.
</rdf:RDF>


The <rdf:Description> Element
<rdf:Description>元素

The <rdf:Description> element identifies a resource with the about attribute.
<rdf:Description>元素通过about属性识别资源。

The <rdf:Description> element contains elements that describe the resource:
<rdf:Description>元素含有描述资源的元素。

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
rdf:about="http://www.recshop.fake/cd/Empire Burlesque">
<cd:artist>Bob Dylan</cd:artist>
<cd:country>USA</cd:country>
<cd:company>Columbia</cd:company>

<cd:price>10.90</cd:price>
<cd:year>1985</cd:year>
</rdf:Description>
</rdf:RDF>

The elements, artist, country, company, price, and year, are defined in the http://www.recshop.fake/cd# namespace. This namespace is outside RDF (and not a part of RDF). RDF defines only the framework. The elements, artist, country, company, price, and year, must be defined by someone else (company, organization, person, etc).
artist, country, company, price, 和 year这些元素,都在http://www.recshop.fake/cd#名称空间里被定义。这个名称空间在RDF之外(不是RDF的一部分)。RDF只定义了框架。artist, country, company, price和year元素必须定义在别的地方(company, organization, person, 等等元素里)


Properties as Attributes
特征属性

The property elements can also be defined as attributes (instead of elements):
属性元素也可以定义为属性(而不是元素):

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
rdf:about="http://www.recshop.fake/cd/Empire Burlesque"

cd:artist="Bob Dylan" cd:country="USA"
cd:company="Columbia" cd:price="10.90"
cd:year="1985" />
</rdf:RDF>


Properties as Resources
资源属性

The property elements can also be defined as resources:
属性元素可以被定义为资源:

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
rdf:about="http://www.recshop.fake/cd/Empire Burlesque">
<cd:artist rdf:resource="http://www.recshop.fake/cd/dylan" />
.
.
.
.
</rdf:Description>
</rdf:RDF>

In the example above, the property artist does not have a value, but a reference to a resource containing information about the artist.
在上述例子里,性质“artist”并不含有值,但是却包含与artist信息相关的资源的参考。

RDF 容器
w3pop.com / 2006-09-21

RDF 元素 RDF 集合

RDF containers are used to describe group of things. For example, to list the authors of a book or to list the members in a band.
RDF容器用于描述组信息。举个例子,列出一本书的所有作者或列出一个乐队的子句。

The following RDF elements are used to describe such groups: <Bag>, <Seq>, and <Alt>.
下列RDF元素是用于描述这些标签组的:<Bag>, <Seq>,和<Alt>.


The <rdf:Bag> Element
<rdf:Bag>元素

The <rdf:Bag> element is used to describe a list of values that is intended to be unordered.
<rdf:Bag>元素用于描述一系列特定的无序的值

The <rdf:Bag> element may contain duplicate values.
<rdf:Bag>元素可以含有多个值(duplicate values)

Example
例子

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
rdf:about="http://www.recshop.fake/cd/Beatles">
<cd:artist>
<rdf:Bag>
<rdf:li>John</rdf:li>
<rdf:li>Paul</rdf:li>

<rdf:li>George</rdf:li>
<rdf:li>Ringo</rdf:li>
</rdf:Bag>
</cd:artist>
</rdf:Description>
</rdf:RDF>


The <rdf:Seq> Element
<rdf:Seq>元素

The <rdf:Seq> element is used to describe a list of values that is intended to be ordered (For example, in alphabetical order).
<rdf:Seq>元素用于描述一系列特定的有序的值(比如依照字母顺序)

The <rdf:Seq> element may contain duplicate values.
<rdf:Seq>元素也许含有多个值(duplicate values)

Example
例子

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
rdf:about="http://www.recshop.fake/cd/Beatles">
<cd:artist>
<rdf:Seq>

<rdf:li>George</rdf:li>
<rdf:li>John</rdf:li>
<rdf:li>Paul</rdf:li>
<rdf:li>Ringo</rdf:li>

</rdf:Seq>
</cd:artist>
</rdf:Description>
</rdf:RDF>


The <rdf:Alt> Element
<rdf:Alt>元素

The <rdf:Alt> element is used to describe a list of alternative values (the user can select only one of the values).
<rdf:Alt>元素用于描述一系列选择的值(使用者只能选择这些值中的一个)

Example
例子

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
rdf:about="http://www.recshop.fake/cd/Beatles">

<cd:format>
<rdf:Alt>
<rdf:li>CD</rdf:li>
<rdf:li>Record</rdf:li>
<rdf:li>Tape</rdf:li>

</rdf:Alt>
</cd:format>
</rdf:Description>
</rdf:RDF>


RDF Terms
RDF短语

In the examples above we have talked about "list of values" when describing the container elements. In RDF these "list of values" are called members.
在上述的例子中,当描述容器元素时我们谈到了“系列值”。在RDF里这些“系列值”称作子句

So, we have the following:
所以我们有以下的称呼:

  • A container is a resource that contains things
    一个容器是包含内容的资源库
  • The contained things are called members (not list of values)
    • 包含在内的东西叫做子句(不是值的列表)

RDF 集合
w3pop.com / 2006-09-21

RDF 容器 RDF Schema

RDF collections are used to describe groups that contains ONLY the specified members.
RDF集合用于描述只含有指定子句(member)的组(group)。


The rdf:parseType="Collection" Attribute
rdf:parseType="Collection"属性

As seen in the previous chapter: You cannot close a container. A container says that the containing resources are members - it does not say that other members are not allowed.
正如前几章所见:你不能关闭容器。容器说明了所含的资源是子句——它不意味着其他子句是不允许的

RDF collections are used to describe group that contains ONLY the specified members.
RDF集合用于描述只含有指定子句的组

A collection is described by the attribute rdf:parseType="Collection".
一个集合由属性rdf:parseType="Collection".描述。

Example
例子

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://recshop.fake/cd#">
<rdf:Description
rdf:about="http://recshop.fake/cd/Beatles">
<cd:artist rdf:parseType="Collection">
<rdf:Description rdf:about="http://recshop.fake/cd/Beatles/George"/>
<rdf:Description rdf:about="http://recshop.fake/cd/Beatles/John"/>
<rdf:Description rdf:about="http://recshop.fake/cd/Beatles/Paul"/>

<rdf:Description rdf:about="http://recshop.fake/cd/Beatles/Ringo"/>
</cd:artist>
</rdf:Description>
</rdf:RDF>

RDF Schema
w3pop.com / 2006-09-21

RDF 集合 RDF Dublin 核心

RDF Schema (RDFS) is an extension to RDF.
RDF格式(Schema)(RDFS)是对RDF的扩展。


RDF Schema and Application Classes
RDF格式(Schema)和应用程序类

RDF describes resources with classes, properties, and values.
RDF用类,属性和值描述资源。

In addition, RDF also need a way to define application-specific classes and properties. Application-specific classes and properties must be defined using extensions to RDF
此外,RDF也需要一种方式来定义应用程序细节的类和属性,应用程序细节的类和属性必须在定义时使用RDFD的扩展。

One such extension is RDF Schema.
这样的扩展就是RDF格式(Schema)


RDF Schema (RDFS)
RDF格式(Schema)(RDFS)

RDF Schema does not provide actual application-specific classes and properties.
RDF格式(Schema)并不提供真正面向应用程序(application-specific)的类和属性。

Instead RDF Schema provides the framework to describe application-specific classes and properties
RDF格式(Schema)只是提供描述面向应用程序(application-specific)的类和属性的框架。

Classes in RDF Schema is much like classes in object oriented programming languages. This allows resources to be defined as instances of classes, and subclasses of classes.
RDF格式(Schema)的类与对象导向设计语言里的类很相象(object oriented programming languages)。这使资源可以定义为类的实例,和类的子集(instances of classes, and subclasses of classes)。


RDFS Example
RDFS例子

The following example demonstrates some of the RDFS facilities:
下面的例子示范了一些RDFS功能:

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base= "http://www.animals.fake/animals#">
<rdf:Description rdf:ID="animal">
<rdf:type
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>

</rdf:Description>
<rdf:Description rdf:ID="horse">
<rdf:type
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
<rdfs:subClassOf rdf:resource="#animal"/>
</rdf:Description>
</rdf:RDF>

In the example above, the resource "horse" is a subclass of the class "animal".
上述例子里,资源"horse"是类"animal"的一个子类。


Example Abbreviated
简化的例子

Since an RDFS class is an RDF resource we can abbreviate the example above by using rdfs:Class instead of rdf:Description, and drop the rdf:type information:
因为一个RDFS类是一个RDF资源,所以我们可以用rdfs:Class代替rdf:Description,通过删除rdf:type信息,来简化上面的例子。

<?xml version="1.0"?>
<rdf:RDF 
xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base= "http://www.animals.fake/animals#">
<rdfs:Class rdf:ID="animal" />
<rdfs:Class rdf:ID="horse">

<rdfs:subClassOf rdf:resource="#animal"/>
</rdfs:Class>
</rdf:RDF>

That's it!
这就是它!

RDF Dublin 核心
w3pop.com / 2006-09-21

RDF Schema RDF 参考

The Dublin Core Metadata Initiative (DCMI) has created some predefined properties for describing documents.
都柏林核心元数据研究行动(DCMI)已经为描述文档创建了一些预定义属性。


The Dublin Core
“都柏林核心”

RDF is metadata (data about data). RDF is used to describe information resources.
RDF是元数据(数据的数据)。RDF用于描述被告知的(inform)RDF行为资源(action resourses)。

The Dublin Core is a set of predefined properties for describing documents.
“都柏林核心”是一组用于描述文档的预定义属性。

The first Dublin Core properties were defined at the Metadata Workshop in Dublin, Ohio in 1995 and is currently maintained by the Dublin Core Metadata Initiative.
最早的都柏林核心属性(Dublin Core properties)于1995年在都柏林,俄亥俄州的元数据工作室定义,目前是由都柏林核心数据研究行动(Dublin Core Metadata Initiative)继续的。

Property
属性
Definition
定义
Contributor
提供者
An entity responsible for making contributions to the content of the resource
资源的提供者
Coverage
覆盖
The extent or scope of the content of the resource
资源的覆盖范围
Creator
创建者
An entity primarily responsible for making the content of the resource
资源的创建者
Format
格式
The physical or digital manifestation of the resource
资源的物理或数据格式
Date
日期
A date of an event in the lifecycle of the resource
资源事件的一个时间
Description
描述
An account of the content of the resource
对资源内容的描述
Identifier
标识符
An unambiguous reference to the resource within a given context
上下文中给出的对资源的明确参考
Language
语言
A language of the intellectual content of the resource
资源内容的智能语言
Publisher
发行者
An entity responsible for making the resource available
使资源可利用
Relation
关联
A reference to a related resource
相关的资源参考
Rights
专利
Information about rights held in and over the resource
资源的专利信息
Source
出处
A Reference to a resource from which the present resource is derived
资源出处的参考
Subject
主题
A topic of the content of the resource
资源的主题
Title
标题
A name given to the resource
资源的名称
Type
类别
The nature or genre of the content of the resource
资源的性质或类型

A quick look at the table above indicates that RDF is ideal for representing Dublin Core information.
从上表中我们可以看出RDF是“都柏林核心数据”的最适当表示。


RDF Example
RDF实例

The following example demonstrates the use of some of the Dublin Core properties in an RDF document:
下面的例子演示了如何在RDF文档中使用部分“都柏林核心数据”的属性:

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc= "http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://www.w3schools.com">
<dc:title>D-Lib Program</dc:title>
<dc:description>W3Schools - Free tutorials</dc:description>

<dc:publisher>Refsnes Data as</dc:publisher>
<dc:date>1999-09-01</dc:date>
<dc:type>Web Development</dc:type>
<dc:format>text/html</dc:format>

<dc:language>en</dc:language>
</rdf:Description>
</rdf:RDF>

RDF 参考
w3pop.com / 2006-09-21

RDF Dublin 核心 RDF OWL

The RDF Namespaces
RDF名称空间

The RDF namespace (xmlns:rdf) is:
RDF名称空间(namespace)(xmlns:rdf)是:

http://www.w3.org/1999/02/22-rdf-syntax-ns#

The RDFS namespace (xmlns:rdfs ) is:
RDFS名称空间(xmlns:rdfs)是:

http://www.w3.org/2000/01/rdf-schema#


The RDF Extension and Mime Type
RDF扩展名和Mime类型

The recommended extension for RDF files is *.rdf. However, the extension *.xml is often used to provide compatibility with older xml parsers.
RDF文件的推荐扩展名是“*.rdf.”。但是,用扩展名“*.xml”常可以使文件和老版本的XML解析器兼容

The registered mime type should be "application/rdf+xml".
已注册的mime类型应该是"application/rdf+xml".


RDFS / RDF Classes
RDFS / RDF类

Element元素 Class of类 Subclass of子类
rdfs:Class All classes所有类  
     
rdfs:Datatype Data types数据类型 Class类
rdfs:Resource All resources所有资 Class类
     
rdfs:Container Containers容器 Resource资源
rdfs:Literal Literal values (text and numbers)文字值(文本和数字值) Resource资源
     
rdf:List Lists列表 Resource资源
rdf:Property Properties性质 Resource资源
rdf:Statement Statements称述 Resource资源
     
rdf:Alt Containers of alternatives选择值的容器 Container容器
rdf:Bag Unordered containers无序容器 Container容器
rdf:Seq Ordered containers有序容器 Container容器
     
rdfs:ContainerMembershipProperty Container membership properties容器“子句”
”性质
Property性质
rdf:XMLLiteral XML literal values       XML文字值 Literal文字的


RDFS / RDF Properties
RDFS / RDF性质

Element元素 Domain领域 Range幅度范围 Description描述
rdfs:domain Property性质 Class类 The domain of the resource资源的领域范围
rdfs:range Property性质 Class类 The range of the resource资源的范围
rdfs:subPropertyOf Property性质 Property性质 The property is a sub property of a property一种属性的子属性
       
rdfs:subClassOf Class类 Class类 The resource is a subclass of a class资源是一个类的子类
rdfs:comment Resource资源 Literal文字的 The human readable description of the resource可供人阅读的资源描述
rdfs:label Resource资源 Literal文字的 The human readable label (name)  of the resource可供人阅读的资源标签(名称)
rdfs:isDefinedBy Resource资源 Resource资源 The definition of the resource资源的定义
rdfs:seeAlso Resource资源 Resource资源 The additional information about the resource有关资源的额外信息
rdfs:member Resource资源 Resource资源 The member of the resource资源的组成
       
rdf:first List列表 Resource资源  
rdf:rest List列表 List列表  
rdf:subject Statement称述 Resource资源 The subject of the resource in an RDF Statement一段RDF称述中资源的主语
rdf:predicate Statement称述 Resource资源 The predicate of the resource in an RDF Statement一段RDF称述中资源的谓语
rdf:object Statement 称述 Resource资源 The object of the resource in an RDF Statement一段RDF称述中资源的宾语
rdf:value Resource资源 Resource资源 The property used for values用于值的性质
rdf:type Resource资源 Class类 The resource is an instance of a class资源实例是一个类


RDF Attributes
RDF属性

Element元素 Domain领域 Range范围幅度 Description描述
       
rdf:about     Defines the resource being described定义了要被描述的资源
rdf:Description     Container for the description of a resource资源描述的容器
rdf:resource     Defines a resource to identify a property定义了识别性质的资源
rdf:datatype     Defines the data type of an element定义了一个元素的数据类型
rdf:ID     Defines the ID of an element定义了一个元素的ID
rdf:li     Defines a list定义了一个列表
rdf:_n     Defines a node定义了一个节点
rdf:nodeID     Defines the ID of an element node定义了一个元素节点的ID
rdf:parseType     Defines how an element should be parsed定义了一个元素怎样被解析
rdf:RDF     The root of an RDF document一份RDF文档的根目录
xml:base     Defines the XML base定义了XML基础
xml:lang     Defines the language of the element content定义了元素内容的语言
       
rdf:aboutEach     (removed)(已删除)
rdf:aboutEachPrefix     (removed)(已删除)
rdf:bagID     (removed)(已删除)

Elements described as (removed) are removed from the latest RDF standard.
描述为“(已删除)”的元素已经从最近的RDF标准里删除了。

RDF OWL
w3pop.com / 2006-09-21

RDF 参考

OWL is a language for processing web information.
OWL是用于处理网页信息的语言


What You Should Already Know
你所应该已经知道的知识

Before you study OWL you should have a basic understanding of XML, XML Namespaces and RDF.
在学习 OWL之前你应该对XML,XML名称空间和RDF有基本的了解。

If you want to study these subjects first, please visit:

XML Tutorial and RDF Tutorial.
如果你想先学这些内容,请访问XML教程 和 RDF 教程。


What is OWL?
什么是OWL?

  • OWL stands for Web Ontology Language
     OWL代表Web Ontology Language (网页本体语言)
  • OWL is built on top of RDF
     OWL是建在RDF的“顶端”之上的
  • OWL is for processing information on the web
     是用于处理网页上的信息的
  • OWL was designed to be interpreted by computers
     OWL是由计算机解析的
  • OWL was not designed for being read by people
     OWL并不用于被人读的。
  • OWL is written in XML
     OWL以XML语言编写成
  • OWL has three sublanguages
     OWL有三种次语言
  • OWL is a web standard
     OWL是网页标准

What is Ontology?
什么是“本体(Ontology)”?

Ontology is about the exact description of things and their relationships.
本体是关于事物本身和事物间关系的确切描述

For the web, ontology is about the exact description of web information and relationships between web information.
对网页而言,“本体”是指关于网页信息和网页信息之间联系的确切描述。


Why OWL?
为什么要有OWL?

OWL is a part of the "Semantic Web Vision" - a future where:
OWL是“语义网页景象”的一部分,在未来的“语义网页景象”:

  • Web information has exact meaning
     网页信息会有确切的意思
  • Web information can be processed by computers
     网页信息可以被计算机处理
  • Computers can integrate information from the web
     计算机可以整合网页的信息

OWL was Designed for Processing Information
OWL用于处理信息

OWL was designed to provide a common way to process the content of web information (instead of displaying it).
OWL用于提供一种处理网页信息内容的普通方式(而不是显示信息)

OWL was designed to be read by computer applications (instead of humans).
OWL是通过计算机应用软件解读的(而不是人读)


OWL is Different from RDF
OWL与RDF不同

OWL and RDF are much of the same thing, but OWL is a stronger language with greater machine interpretability than RDF.
OWL 和 RDF大体上是相同的东西,但是OWL是比RDF更易于被机器解读的更强大的语言。

OWL comes with a larger vocabulary and stronger syntax than RDF.
OWL比RDF有更大的词汇量和更完善的语法。


OWL Sublanguages
OWL次语言

OWL has three sublanguages:
OWL有三种次语言;

  • OWL Lite
  • OWL DL (includes OWL Lite)
    OWL DL(包括OWL Lite)
  • OWL Full (includes OWL DL)
    OWL Full(包括OWL DL)

OWL is Written in XML
OWL是用XML形式写成的

By using XML, OWL information can easily be exchanged between different types of computers using different types of operating system and application languages.
XML语言使OWL信息在不同的计算机上、不同的操作系统和应用程序之间交换起来更简单。


OWL Example (Airport)
OWL 例子(机场)

OWL Resource: http://www.daml.org/2001/10/html/airport-ont
OWL资源:http://www.daml.org/2001/10/html/airport-ont

Class: Airport
分类:Airport

Properties:
性质

Produced using dumpont2.java
使用dumpont2.java 制作


OWL is a Web Standard
OWL是网页标准

OWL became a W3C (World Wide Web Consortium) Recommendation in February 2004.
OWL在2004年2月成为W3C(万维网联盟World Wide Web Consortium)的参考标准

A W3C Recommendation is understood by the industry and the web community as a web standard. A W3C Recommendation is a stable specification developed by a W3C Working Group and reviewed by the W3C Membership.
WC3参考标准是整个产业和网页团体所认同的网页标准。一份W 3C参考标准是由W3C工作团体开发的并由W3C成员检验的相对稳定的规范说明

posted @ 2006-11-18 10:52  疯一样的自由  阅读(1739)  评论(0编辑  收藏  举报