资源描述框架(RDF):概念与抽象语法 推荐标准

TransWiki - W3CHINA.ORG开放翻译计划(OTP)


w3c_home.png (http://www.w3.org/)

目录

1.1 W3C推荐标准 2004年2月10日
1.2 Abstract
1.3 摘要
1.4 Status of this Document
1.5 文档状态
1.6 Table of Contents
1.7 目录
1.8 1. Introduction
1.9 1. 引言

1.10 2. Motivations and Goals
1.11 2. 动机和目标

1.12 3. RDF Concepts
1.13 3. RDF 概念

1.14 4. RDF Vocabulary URI and Namespace (Normative)
1.15 4. RDF词汇集URI和名字空间(标准)
1.16 5. Datatypes (Normative)
1.17 5. 数据类型 (标准)

1.18 6. Abstract Syntax (Normative)
1.19 6. 抽象语法 (标准)

1.20 7. Fragment Identifiers
1.21 7. 片断标识符
1.22 8. Acknowledgments
1.23 8. 致谢
1.24 9. 参考文献

资源描述框架(RDF):概念与抽象语法

W3C推荐标准 2004年2月10日

This version:
http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/)
Latest version:
http://www.w3.org/TR/rdf-concepts/ (http://www.w3.org/TR/rdf-concepts/)
Previous version:
http://www.w3.org/TR/2003/PR-rdf-concepts-20031215/ (http://www.w3.org/TR/2003/PR-rdf-concepts-20031215/)
Editors:
Graham Klyne (http://www.ninebynine.org/) (Nine by Nine), <gk@ninebynine.org (mailto:GK@NineByNine.org)>
Jeremy J. Carroll (http://www-uk.hpl.hp.com/people/jjc/) (Hewlett Packard Labs), <jjc@hpl.hp.com (mailto:jjc@hpl.hp.com)>
Series editor:
Brian McBride (http://www-uk.hpl.hp.com/people/bwm/) (Hewlett Packard Labs) <bwm@hplb.hpl.hp.com (mailto:bwm@hplb.hpl.hp.com)>
Please refer to the errata for this document, which may include some normative corrections.
See also translations (http://www.w3.org/2001/sw/RDFCore/translation/rdf-concepts).
Copyright (http://www.w3.org/Consortium/Legal/ipr-notice#Copyright) ? 2004 W3C? (MIT, ERCIM, Keio (http://www.keio.ac.jp/)), All Rights Reserved. W3C liability (http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer), trademark (http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks), document use (http://www.w3.org/Consortium/Legal/copyright-documents) and software licensing (http://www.w3.org/Consortium/Legal/copyright-software) rules apply.

当前版本:
http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/)
最新版本:
http://www.w3.org/TR/rdf-concepts/ (http://www.w3.org/TR/rdf-concepts/)
上一版本:
http://www.w3.org/TR/2003/PR-rdf-concepts-20031215/ (http://www.w3.org/TR/2003/PR-rdf-concepts-20031215/)
编者:
Graham Klyne (http://www.ninebynine.org/) (Nine by Nine), <gk@ninebynine.org (mailto:GK@NineByNine.org)>
Jeremy J. Carroll (http://www-uk.hpl.hp.com/people/jjc/) (Hewlett Packard Labs), <jjc@hpl.hp.com (mailto:jjc@hpl.hp.com)>
系列文档编者:
Brian McBride (http://www-uk.hpl.hp.com/people/bwm/) (Hewlett Packard Labs) <bwm@hplb.hpl.hp.com (mailto:bwm@hplb.hpl.hp.com)>
阅读时请参照本文档的勘误表,其中可能会包含一些规范性的修正。
同时参见 译文 (http://www.w3.org/2001/sw/RDFCore/translation/rdf-concepts)
Copyright (http://www.w3.org/Consortium/Legal/ipr-notice#Copyright) ? 2004 W3C? (MIT, ERCIM, Keio (http://www.keio.ac.jp/)), All Rights Reserved. W3C liability (http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer), trademark (http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks), document use (http://www.w3.org/Consortium/Legal/copyright-documents) and software licensing (http://www.w3.org/Consortium/Legal/copyright-software) rules apply.



Abstract

The Resource Description Framework (RDF) is a framework for representing information in the Web.
RDF Concepts and Abstract Syntax defines an abstract syntax on which RDF is based, and which serves to link its concrete syntax to its formal semantics. It also includes discussion of design goals, key concepts, datatyping, character normalization and handling of URI references.

摘要

资源描述框架(Resource Description Framework,RDF)是一个用于表示Web上信息的框架。
文档"RDF概念和抽象语法"定义了RDF所基于的抽象语法,以及它作为具体语法和形式语义的桥梁作用。本文档还包含了关于设计目标,关键概念,数据类型,字符范式化和对URI引用的处理等内容。

Status of this Document

This document has been reviewed by W3C Members and other interested parties, and it has been endorsed by the Director as a W3C Recommendation (http://www.w3.org/2003/06/Process-20030618/tr.html#RecsW3C). W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.
This is one document in a set of six (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Introduction) (Primer (http://www.w3.org/TR/2004/REC-rdf-primer-20040210/), Concepts (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/), Syntax (http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/), Semantics (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/), Vocabulary (http://www.w3.org/TR/2004/REC-rdf-schema-20040210/), and Test Cases (http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/)) intended to jointly replace the original Resource Description Framework specifications, RDF Model and Syntax (1999 Recommendation) (http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/) and RDF Schema (2000 Candidate Recommendation) (http://www.w3.org/TR/2000/CR-rdf-schema-20000327/). It has been developed by the RDF Core Working Group (http://www.w3.org/2001/sw/RDFCore/) as part of the W3C Semantic Web Activity (http://www.w3.org/2001/sw/) (Activity Statement (http://www.w3.org/2001/sw/Activity), Group Charter (http://www.w3.org/2002/11/swv2/charters/RDFCoreWGCharter)) for publication on 10 February 2004.
Changes to this document since the Proposed Recommendation Working Draft are detailed in the change log.
The public is invited to send comments to www-rdf-comments@w3.org (mailto:www-rdf-comments@w3.org) (archive (http://lists.w3.org/Archives/Public/www-rdf-comments/)) and to participate in general discussion of related technology on www-rdf-interest@w3.org (archive).
A list of implementations (http://www.w3.org/2001/sw/RDFCore/impls) is available.
The W3C maintains a list of any patent disclosures related to this work.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index (http://www.w3.org/TR/) at http://www.w3.org/TR/.


文档状态

本文档已被W3C成员及其他相关方面审阅,并已被W3C理事(W3C Director)批准为 W3C推荐标准 (http://www.w3.org/2003/06/Process-20030618/tr.html#RecsW3C)。 W3C制定推荐标准的任务是使之受到关注,并促使其被广泛应用。这将增强Web的功能性与互操作性。
本文是 RDF系列 (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Introduction) (共六份,分别是:入门 (http://www.w3.org/TR/2004/REC-rdf-primer-20040210/)概念 (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/)语法 (http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/)语义 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/)词汇集 (http://www.w3.org/TR/2004/REC-rdf-schema-20040210/), 和测试用例 (http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/))之中的一份。该系列将替换原有的资源描述框架说明书, RDF模型和语法(1999年推荐标准) (http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/)RDF Schema (2000年候选推荐标准) (http://www.w3.org/TR/2000/CR-rdf-schema-20000327/)。它由RDF核心工作小组 (http://www.w3.org/2001/sw/RDFCore/)作为 W3C语义Web活动 (http://www.w3.org/2001/sw/) (活动声明 (http://www.w3.org/2001/sw/Activity)小组章程 (http://www.w3.org/2002/11/swv2/charters/RDFCoreWGCharter))的一部分而编写,并于2004年2月10号正式颁布。自提议的推荐工作草案公布之日起,该文献的所有变动在更改日志之中都有详细记录。
欢迎大家将意见(存档文件 (http://lists.w3.org/Archives/Public/www-rdf-comments/))发送到 www-rdf-comments@w3.org (mailto:www-rdf-comments@w3.org) 并且积极参与www-rdf-interest@w3.org上对于相关技术的全面讨论(存档文件 (http://lists.w3.org/Archives/Public/www-rdf-comments/))。
可以访问到有关实现 (http://www.w3.org/2001/sw/RDFCore/impls)的一个列表。
W3C维护着一个与这些工作相关的专利声明的目录。
这节描述了本文档在发布时的状态。其他文档可能替代这文档。一份当前W3C的最新出版物的目录和这个技术报告的最新版本可以在 W3C技术报告索引 (http://www.w3.org/TR/)http://www.w3.org/TR/ 上找到。



Table of Contents



目录




1. Introduction

The Resource Description Framework (RDF) is a framework for representing information in the Web.
This document defines an abstract syntax on which RDF is based, and which serves to link its concrete syntax to its formal semantics. This abstract syntax is quite distinct from XML's tree-based infoset [XML-INFOSET (http://www.w3.org/TR/rdf-concepts/#ref-xml-infoset)]. It also includes discussion of design goals, key concepts, datatyping, character normalization and handling of URI references.
Normative documentation of RDF falls into the following areas:

  • XML serialization syntax [RDF-SYNTAX (http://www.w3.org/TR/rdf-concepts/#ref-rdf-syntax)],
  • formal semantics [RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)], and
  • this document, (sections 4, 5 and 6).

Within this document, normative sections are explicitly labelled as such. Explicit notes are informative.
The framework is designed so that vocabularies can be layered. The RDF and RDF vocabulary definition (RDF schema) languages [RDF-VOCABULARY (http://www.w3.org/TR/rdf-concepts/#ref-rdf-vocabulary)] are the first such vocabularies. Others (cf. OWL [OWL (http://www.w3.org/TR/rdf-concepts/#ref-owl)] and the applications mentioned in the primer [RDF-PRIMER (http://www.w3.org/TR/rdf-concepts/#ref-rdf-primer)]) are in development.

1. 引言

资源描述框架 (RDF)是一种用于表示Web上信息的框架。 本文档定义了RDF所基于的抽象语法,以及它作为具体语法和形式语义的桥梁作用。该抽象语法大不同于XML的基于树的信息集[XML-INFOSET (http://www.w3.org/TR/rdf-concepts/#ref-xml-infoset)]。本文档也包括了设计目标的讨论,关键概念,数据类型,字符范式化和URI引用的处理。RDF的标准化文档有以下部分:

  • XML 序列化语法[RDF-SYNTAX (http://www.w3.org/TR/rdf-concepts/#ref-rdf-syntax)],
  • 形式语义[RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)],和
  • 本文档(4,5和6节)。

在本文档中,标准化部分像这样显式标注,一些显式的注释是参考性的。
这个框架旨在便于词汇的分层。RDF和RDF词汇定义(RDF Schema)语言[RDF-VOCABULARY (http://www.w3.org/TR/rdf-concepts/#ref-rdf-vocabulary)]首先位于其中。其他的部分(cf. OWL [OWL (http://www.w3.org/TR/rdf-concepts/#ref-owl)] 和在RDF入门文档中[RDF-PRIMER (http://www.w3.org/TR/rdf-concepts/#ref-rdf-primer)])提到的应用正在开发中。

1.1 Structure of this Document

In section 2 (http://www.w3.org/TR/rdf-concepts/#section-Overview), the background rationale and design goals are introduced. Key concepts follow in section 3 (http://www.w3.org/TR/rdf-concepts/#section-Concepts). Section 4 (http://www.w3.org/TR/rdf-concepts/#section-URIspaces) discusses URI references reserved for use by RDF.
Section 5 (http://www.w3.org/TR/rdf-concepts/#section-Datatypes) discusses datatypes. XML content of literals is described in section 5.1 (http://www.w3.org/TR/rdf-concepts/#section-XMLLiteral), and the abstract syntax is defined in section 6 (http://www.w3.org/TR/rdf-concepts/#section-Graph-syntax) of this document.
Section 7 (http://www.w3.org/TR/rdf-concepts/#section-fragID) discusses the role of fragment identifiers in URI references used with RDF.

1.1 文档结构

第2节 (http://www.w3.org/TR/rdf-concepts/#section-Overview)中,介绍了基本原理和设计目标。关键概念则在第3节 (http://www.w3.org/TR/rdf-concepts/#section-Concepts)中。第4节 (http://www.w3.org/TR/rdf-concepts/#section-URIspaces)讨论RDF预留使用的URIrefs。第5节 (http://www.w3.org/TR/rdf-concepts/#section-Datatypes)讨论数据类型,作为XML内容的文字在5.1节 (http://www.w3.org/TR/rdf-concepts/#section-XMLLiteral)讨论。抽象语法定义在本文档的第6节 (http://www.w3.org/TR/rdf-concepts/#section-Graph-syntax)第7节 (http://www.w3.org/TR/rdf-concepts/#section-fragID) 讨论标识片断在RDF使用的URI引用中的作用。

2. Motivations and Goals

RDF has an abstract syntax that reflects a simple graph-based data model, and formal semantics with a rigorously defined notion of entailment providing a basis for well founded deductions in RDF data.

2. 动机和目标

RDF有一个抽象语法体现了一个简单的基于图的数据模型,还有一个具有一个严格定义的蕴涵概念的形式语义,为RDF数据中的演绎推理提供了一个基础。

2.1 Motivation

The development of RDF has been motivated by the following uses, among others:

  • Web metadata: providing information about Web resources and the systems that use them (e.g. content rating, capability descriptions, privacy preferences, etc.)
  • Applications that require open rather than constrained information models (e.g. scheduling activities, describing organizational processes, annotation of Web resources, etc.)
  • To do for machine processable information (application data) what the World Wide Web has done for hypertext: to allow data to be processed outside the particular environment in which it was created, in a fashion that can work at Internet scale.
  • Interworking among applications: combining data from several applications to arrive at new information.
  • Automated processing of Web information by software agents: the Web is moving from having just human-readable information to being a world-wide network of cooperating processes. RDF provides a world-wide lingua franca for these processes.

RDF is designed to represent information in a minimally constraining, flexible way. It can be used in isolated applications, where individually designed formats might be more direct and easily understood, but RDF's generality offers greater value from sharing. The value of information thus increases as it becomes accessible to more applications across the entire Internet.

2.1 动机

RDF的发展被如下的一些应用所驱动,包括:

  • Web元数据:提供了关于Web资源和使用Web资源的系统的信息(例如:内容分级,性能描述,个人偏好,等等)。
  • 需要开放而非封闭的信息模型的应用(例如:活动安排,描述组织流程,Web资源的标注,等等)。
  • 正如万维网为超文本做的那样,为机器可处理的信息(应用程序数据)做同样的事:允许数据在创建它的特定环境以外被处理,且以一种能扩展到互联网的方式被处理。
  • 应用之间的互操作:合并来自单个应用的数据构成新的信息。
  • 软件Agent对Web信息的自动化处理:Web由仅有易于人类阅读的信息转变为一个世界范围的协同程序的网络。RDF为这些程序提供了一种世界范围的标准语言。

RDF的设计目的是能以最低限度度的约束,灵活地描述信息。它可以用于独立的应用,其中单独设计的数据格式可能更为直接和易于理解,但RDF的通用性使得数据的共享能提供更大的价值。.当信息被整个Internet中越来越多的应用程序接接受时,信息也在不断的增值。

2.2 Design Goals

The design of RDF is intended to meet the following goals:

  • having a simple data model
  • having formal semantics and provable inference
  • using an extensible URI-based vocabulary
  • using an XML-based syntax
  • supporting use of XML schema datatypes
  • allowing anyone to make statements about any resource

2.2 设计目标

RDF的设计试图达到如下几个目标:

  • 有一个简单的数据模型
  • 有形式化的语义和可证明的推论
  • 使用一个基于URI的可扩展词汇集
  • 使用一种基于XML的语法
  • 支持XML Schema数据类型的使用
  • 允许任何人发表关于任何资源的陈述。

2.2.1 A Simple Data Model

RDF has a simple data model that is easy for applications to process and manipulate. The data model is independent of any specific serialization syntax.
Note: the term "model" used here in "data model" has a completely different sense to its use in the term "model theory". See [RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)] for more information about "model theory" as used in the literature of mathematics and logic.

2.2.1 一个简单的数据模型

RDF有一种便于应用程序处理和操作的简单数据模型。这个数据模型独立任何特定的序列化语法。
备注:在"数据模型"中使用的术语"模型"和在术语"模型论"中使用的"模型"含义完全不同。关于用在数学和逻辑学文献中的"模型论"的更多信息,参考[RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)]。

2.2.2 Formal Semantics and Inference

RDF has a formal semantics which provides a dependable basis for reasoning about the meaning of an RDF expression. In particular, it supports rigorously defined notions of entailment which provide a basis for defining reliable rules of inference in RDF data.

2.2.2 形式语义和推论

RDF有一个形式化的语义,它为对关于RDF表达式的含义的推理提供了一个可靠的基础。特别地,它提供了一个严格定义的蕴涵概念,从而为在RDF数据中定义可靠的推理规则奠定了基础。

2.2.3 Extensible URI-based Vocabulary

The vocabulary is fully extensible, being based on URIs with optional fragment identifiers (URI references, or URIrefs). URI references are used for naming all kinds of things in RDF.
The other kind of value that appears in RDF data is a literal.

2.2.3 基于URI的可扩展词汇集

基于具有可选的片段标识符(URI 引用,或URIrefs)的URIs,词汇集是完全可扩展的。URI引用在RDF中被用来命名所有类别的事物。
在RDF数据中出现的另一种值是文字。

2.2.4 XML-based Syntax

RDF has a recommended XML serialization form [RDF-SYNTAX (http://www.w3.org/TR/rdf-concepts/#ref-rdf-syntax)], which can be used to encode the data model for exchange of information among applications.

2.2.4 基于XML的语法

RDF有一个XML序列化格式的推荐标准[RDF-SYNTAX (http://www.w3.org/TR/rdf-concepts/#ref-rdf-syntax)],它可用来编码应用中信息交换所用的数据模型。

2.2.5 Use XML Schema Datatypes

RDF can use values represented according to XML schema datatypes [XML-SCHEMA2 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema2)], thus assisting the exchange of information between RDF and other XML applications.

2.2.5 使用XML Schema数据类型

RDF可以使用根据XML Schema数据类型[XML-SCHEMA2 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema2)]表示的数值,因此有助于在RDF和其他XML应用程序中信息的交换。

2.2.6 Anyone Can Make Statements About Any Resource

To facilitate operation at Internet scale, RDF is an open-world framework that allows anyone to make statements about any resource.
In general, it is not assumed that complete information about any resource is available. RDF does not prevent anyone from making assertions that are nonsensical or inconsistent with other statements, or the world as people see it. Designers of applications that use RDF should be aware of this and may design their applications to tolerate incomplete or inconsistent sources of information.

2.2.6 任何人都能发表关于任何资源的陈述

为了推动在互联网层次上的操作,RDF是一种允许任何人发表关于任何资源陈述的开放的框架。
一般说来,不假设关于任何资源的所有信息都是可用到的。RDF并不阻止任何人发表那些毫无意义或者有悖于其他陈述,或有悖于人们看到的世界的声明。那些使用了RDF的应用程序的设计者应该了解这一点,并使设计的应用程序能够容忍不完全或是不协调的信息。

3. RDF Concepts

RDF uses the following key concepts:

  • Graph data model
  • URI-based vocabulary
  • Datatypes
  • Literals
  • XML serialization syntax
  • Expression of simple facts
  • Entailment

3. RDF 概念

RDF使用如下的关键概念:

  • 基于图的数据模型
  • 基于URI的词汇识
  • 数据类型
  • 文字
  • XML序列化语法
  • 简单事实的RDF表达法
  • 蕴涵

3.1 Graph Data Model

3.1 基于图的数据模型

The underlying structure of any expression in RDF is a collection of triples, each consisting of a subject, a predicate and an object. A set of such triples is called an RDF graph (defined more formally in section 6 (http://www.w3.org/TR/rdf-concepts/#section-Graph-syntax)). This can be illustrated by a node and directed-arc diagram, in which each triple is represented as a node-arc-node link (hence the term "graph").
Graph-ex.gif
Each triple represents a statement of a relationship between the things denoted by the nodes that it links. Each triple has three parts:

  • a subject (http://www.w3.org/TR/rdf-concepts/#dfn-subject),
  • an object (http://www.w3.org/TR/rdf-concepts/#dfn-object), and
  • a predicate (http://www.w3.org/TR/rdf-concepts/#dfn-predicate) (also called a property (http://www.w3.org/TR/rdf-concepts/#dfn-property)) that denotes a relationship.

The direction of the arc is significant: it always points toward the object.

在RDF中任何表达式的基本结构是一个三元组的集合,每个三元组由一个主体、一个谓词和一个客体组成。一 系列这样的三元组被称为RDF图(更正式的定义在第6节 (http://www.w3.org/TR/rdf-concepts/#section-Graph-syntax)),这可以用具有一个 节点和有向边的图来表示,在图中每个三元组用一个节点-边-节点的连接表示(故称之“图“)。 每个三元组表示由节点连接表示的事务之间的关系一个陈述。每个三元组有三部分:

  • 一个主体 (http://www.w3.org/TR/rdf-concepts/#dfn-subject)
  • 一个客体 (http://www.w3.org/TR/rdf-concepts/#dfn-object),和
  • 一个谓词 (http://www.w3.org/TR/rdf-concepts/#dfn-predicate)(也称为属性 (http://www.w3.org/TR/rdf-concepts/#dfn-property)),它表示一个关系。

边的方向很重要:它总是指向客体。

The nodes (http://www.w3.org/TR/rdf-concepts/#section-Graph-Node) of an RDF graph are its subjects and objects.
The assertion of an RDF triple says that some relationship, indicated by the predicate, holds between the things denoted by subject and object of the triple. The assertion of an RDF graph amounts to asserting all the triples in it, so the meaning of an RDF graph is the conjunction (logical AND) of the statements corresponding to all the triples it contains. A formal account of the meaning of RDF graphs is given in [RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)].

RDF图的节点 (http://www.w3.org/TR/rdf-concepts/#section-Graph-Node)是它的主体和客体。
RDF三元组的断言说明一些关系,这是由谓词表示的,在三元组的主体和客体表示的事物之间的关系。RDF三元组的断言的总和就是断言图中所有的三元组,因此RDF图的含义就是对应所有图中三元组包含的陈述的关联(逻辑合取)。RDF图的形式语义由[RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)]给出。

3.2 URI-based Vocabulary and Node Identification

3.2 基于URI的词汇和节点标识

A node may be a URI with optional fragment identifier (URI reference (http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference), or URIref), a literal, or blank (having no separate form of identification). Properties are URI references. (See [URI (http://www.w3.org/TR/rdf-concepts/#ref-uris)], section 4, for a description of URI reference forms, noting that relative URIs are not used in an RDF graph. See also section 6.4 (http://www.w3.org/TR/rdf-concepts/#section-Graph-URIref).)
A URI reference or literal used as a node identifies what that node represents. A URI reference used as a predicate identifies a relationship between the things represented by the nodes it connects. A predicate URI reference may also be a node in the graph.
A blank node (http://www.w3.org/TR/rdf-concepts/#dfn-blank-node) is a node that is not a URI reference or a literal. In the RDF abstract syntax, a blank node is just a unique node that can be used in one or more RDF statements, but has no intrinsic name.

一个节点可以是一个URI跟随一个可选片断标识(URI reference (http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference),或 "URIref"),文字,或是空节点(无单独的标识形式)。属性是“URI引用"。(查看[URI (http://www.w3.org/TR/rdf-concepts/#ref-uris)],第4节中对URIref形式的描述,注意:相对URIs不在RDF图中使用。也可以参看 6.4节 (http://www.w3.org/TR/rdf-concepts/#section-GrapURIref))。
作为节点的一个URI应用或文字标识了这个节点表示的事物。作为谓词的一个URIref标识了由它连接的节点表示的事物之间的关系。一个谓词URIref在图中也可能作为一个节点。一个空节点 (http://www.w3.org/TR/rdf-concepts/#dfn-blank-node)既不是一个URI引用也不是文字。在RDF抽象语法中,一个空节点只是一个独特的节点,可以用在一个或多个RDF陈述中,但是没有内在的名字。

A convention used by some linear representations of an RDF graph to allow several statements to reference the same unidentified resource is to use a blank node identifier, which is a local identifier that can be distinguished from all URIs and literals. When graphs are merged, their blank nodes must be kept distinct if meaning is to be preserved; this may call for re-allocation of blank node identifiers. Note that such blank node identifiers are not part of the RDF abstract syntax, and the representation of triples containing blank nodes is entirely dependent on the particular concrete syntax used.

有一个惯例用于RDF图的一些线性表达方式中:即通过空节点标识符,允许多个陈述引用同一个未标识的资源,它是一个和所有URIs和文字不同的本地标识符。当合并图的时候,为了保留空节点的含义,那么不同图中的空节点必须保持不同,这可能会导致重新分配空节点标识符。注意,这些空节点标识符并不是RDF抽象语法的一部分,而且包含空节点的三元组的表示完全依赖于特定的所用具体语法。

3.3 Datatypes

3.3 数据类型

Datatypes are used by RDF in the representation of values such as integers, floating point numbers and dates.
A datatype consists of a lexical space, a value space and a lexical-to-value mapping, see section 5 (http://www.w3.org/TR/rdf-concepts/#section-Datatypes).
For example, the lexical-to-value mapping for the XML Schema datatype xsd:boolean, where each member of the value space (represented here as 'T' and 'F') has two lexical representations, is as follows:
Value Space{T, F}
Lexical Space{"0", "1", "true", "false"}
Lexical-to-Value Mapping{<"true", T>, <"1", T>, <"0", F>, <"false", F>}
RDF predefines just one datatype rdf:XMLLiteral (http://www.w3.org/TR/rdf-concepts/#dfn-rdf-XMLLiteral), used for embedding XML in RDF (see section 5.1 (http://www.w3.org/TR/rdf-concepts/#section-XMLLiteral)).

There is no built-in concept of numbers or dates or other common values. Rather, RDF defers to datatypes that are defined separately, and identified with URI references. The predefined XML Schema datatypes [XML-SCHEMA2 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema2)] are expected to be widely used for this purpose.

RDF provides no mechanism for defining new datatypes. XML Schema Datatypes [XML-SCHEMA2 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema2)] provides an extensibility framework suitable for defining new datatypes for use in RDF.

数据类型被RDF用来表示数值,如整数、浮点数数字和日期。
一个数据类型由一个词法空间,一个值空间和一个词法-到-值的映射组成,查看第5节 (http://www.w3.org/TR/rdf-concepts/#section-Datatypes)
例如,对XML Schema的数据类型xsd:boolean的词法-到-值映射,其中值空间的每个成员(这里由'T'和'F'和表示)具有两个词法表达,如下所示: 值空间:{T, F}
词法空间:{"0", "1", "true", "false"}
词法-到-值映射:{<"true", T>, <"1", T>, <"0", F>, <"false", F>}
RDF仅预定义一个数据类型rdf:XMLLiteral (http://www.w3.org/TR/rdf-concepts/#dfn-rdf-XMLLiteral),用来把XML嵌入到RDF中(参考5.1节 (http://www.w3.org/TR/rdf-concepts/#section-XMLLiteral))。

在RDF中没有内建的数字概念,或是日期,或者其他普通数值,相反,RDF允许独立的定义数据类型,且应用URI来标识。预定义的XML Schema数据类型[XML-SCHEMA2 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema2)] 就是为了这个目的,且希望能广泛的应用。

RDF没有提供定义新数据类型的机制,XML Schema数据类型 [XML-SCHEMA2 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema2)] 提供了可扩展的框架,适合定义用在RDF中的新数据类型。

3.4 Literals

Literals are used to identify values such as numbers and dates by means of a lexical representation. Anything represented by a literal could also be represented by a URI, but it is often more convenient or intuitive to use literals.
A literal may be the object of an RDF statement, but not the subject or the predicate.
Literals may be plain or typed :

  • A plain literal (http://www.w3.org/TR/rdf-concepts/#dfn-plain-literal) is a string combined with an optional language tag. This may be used for plain text in a natural language. As recommended in the RDF formal semantics [RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)], these plain literals are self-denoting.
  • A typed literal (http://www.w3.org/TR/rdf-concepts/#dfn-typed-literal) is a string combined with a datatype URI. It denotes the member of the identified datatype's value space obtained by applying the lexical-to-value mapping to the literal string.

Continuing the example from section 3.3 (http://www.w3.org/TR/rdf-concepts/#section-Datatypes-intro), the typed literals that can be defined using the XML Schema datatype xsd:boolean are:
Typed LiteralLexical-to-Value MappingValue
<xsd:boolean, "true"><"true", T>T
<xsd:boolean, "1"><"1", T>T
<xsd:boolean, "false"><"false", F>F
<xsd:boolean, "0"><"0", F>F

For text that may contain markup, use typed literals with type rdf:XMLLiteral (http://www.w3.org/TR/rdf-concepts/#section-XMLLiteral). If language annotation is required, it must be explicitly included as markup, usually by means of an xml:lang attribute. [XHTML (http://www.w3.org/TR/rdf-concepts/#ref-xhtml)] may be included within RDF in this way. Sometimes, in this latter case, an additional span or div element is needed to carry an xml:lang or lang attribute.
The string in both plain and typed literals is recommended to be in Unicode Normal Form C [NFC (http://www.w3.org/TR/rdf-concepts/#ref-nfc)]. This is motivated by [CHARMOD (http://www.w3.org/TR/rdf-concepts/#ref-charmod)] particularly section 4 Early Uniform Normalization (http://www.w3.org/TR/2003/WD-charmod-20030822/#sec-Normalization).

3.4 文字

文字用以通过一种词法表示的形式表示一些值,例如数字和日期。任何可以用文字表示的事物都可以用URI来表示,但使用文字往往更方便和直观。
一个文字可能是一个RDF陈述的客体,但不是主体或者谓词。
文字可以是平凡的也可以是类型的:

  • 一个平凡文字 (http://www.w3.org/TR/rdf-concepts/#dfn-plain-literal)是结合一个可选的语言标签的字符串。这可能用在自然语言中的纯文本。正如RDF形式化语义[RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)]中推荐的,这些平凡文字是自我表达的。
  • 一个类型文字 (http://www.w3.org/TR/rdf-concepts/#dfn-typed-literal)是由一个字符串和一个数据类型URI组合起来的。它表示了确定的数据类型的值空间的一部分,其中这个值空间是通过对文字字符串应用词法到值的映射得来的。

继续3.3节 (http://www.w3.org/TR/rdf-concepts/#section-Datatypes-intro)的例子,可以通过使用XML Schema数据类型xsd:boolean定义的类型文字是:

类型文字 词汇<-->值映射 值 <xsd:boolean, "true"><"true", T>T
<xsd:boolean, "1"><"1", T>T
<xsd:boolean, "false"><"false", F>F
<xsd:boolean, "0"><"0", F>F

对于可能包含标记的文本,用类型文字带类型rdf:XMLLiteral (http://www.w3.org/TR/rdf-concepts/#section-XMLLiteral)。如果需要语言注解,必须显式的作为标记,一般通过 xml:lang属性。[XHTML (http://www.w3.org/TR/rdf-concepts/#ref-xhtml)]也可能通过这种方式包含在RDF中。在后面这种情况(XHTML),需要额外的span或者div元素有xml:lang或者lang属性。

平凡文字和类型文字的字符串推荐为Unicode Normal Form C[NFC (http://www.w3.org/TR/rdf-concepts/#ref-nfc)]。这是根据[CHARMOD (http://www.w3.org/TR/rdf-concepts/#ref-charmod)],准确的是第4节 Early Uniform Normalization (http://www.w3.org/TR/2003/WD-charmod-20030822/#sec-Normalization)

3.5 RDF Expression of Simple Facts

Some simple facts indicate a relationship between two things. Such a fact may be represented as an RDF triple in which the predicate names the relationship, and the subject and object denote the two things. A familiar representation of such a fact might be as a row in a table in a relational database. The table has two columns, corresponding to the subject and the object of the RDF triple. The name of the table corresponds to the predicate of the RDF triple. A further familiar representation may be as a two place predicate in first order logic. Relational databases permit a table to have an arbitrary number of columns, a row of which expresses information corresponding to a predicate in first order logic with an arbitrary number of places. Such a row, or predicate, has to be decomposed for representation as RDF triples. A simple form of decomposition introduces a new blank node, corresponding to the row, and a new triple is introduced for each cell in the row. The subject of each triple is the new blank node, the predicate corresponds to the column name, and object corresponds to the value in the cell. The new blank node may also have an rdf:type property whose value corresponds to the table name. As an example, consider Figure 6 from the [RDF-PRIMER (http://www.w3.org/TR/rdf-concepts/#ref-rdf-primer)]: http://www.w3.org/TR/rdf-concepts/fig6may19

RDF Primer Figure 6: Using a Blank Node This information might correspond to a row in a table "STAFFADDRESSES", with a primary key STAFFID, and additional columns STREET, STATE, CITY and POSTALCODE. Thus, a more complex fact is expressed in RDF using a conjunction (logical-AND) of simple binary relationships. RDF does not provide means to express negation (NOT) or disjunction (OR). Through its use of extensible URI-based vocabularies, RDF provides for expression of facts about arbitrary subjects; i.e. assertions of named properties about specific named things. A URI can be constructed for any thing that can be named, so RDF facts can be about any such things.

3.5 简单事实的RDF表达法

一些简单事实表达了两个事物之间的关系。这样的事实可以用一个RDF三元组表示,其中用谓词命名事物的关系,主体和客体指代两个事物。类似的事实表达可能在关系数据库中用表中的一行表示。该表具有两列,相对应着RDF三元组中的主体和客体。表名对应于RDF三元组中的谓词。更多的类似表示可能是一阶逻辑中的一个二元谓词。

关系数据库允许一个表有任意多个列,表中表示信息的一行对应于一阶逻辑中的有任意元的谓词。这样的行,或者谓词,为了便于表达必须分解为RDF三元组。一个简单分解的形式引入一个新的对应于行的空节点,而且为行中的每个单元引入一个新三元组。每个三元组的主体是一个新的空节点,谓词相当于列名,客体对应于单元中的值。新的空节点也可以有一个rdf:type类型的属性,它的值对应于表名。 考虑图6,来自于[RDF-PRIMER (http://www.w3.org/TR/rdf-concepts/#ref-rdf-primer)]:

fig6may19.png

RDF Primer 图6:使用空节点

该信息可能对应于表“STAFFADDRESSES”中的一行,STAFFID是表的主键,STREET, STATE, CITY和POSTALCODE是其他的列。因而,用RDF表示更复杂的事实,需要用简单的二元关系中的“合取”(逻辑AND)。RDF不支持“取非”(NOT)或“析取”(OR)的表示。RDF通过使用可扩展的基于URI的词汇集,它提供了表达任意主体的事实的能力:如对特定的具名事物的具名属性的断言。一个URI可以为任意可以命名的事物而构造,所以RDF事实可以是关于任何事物的。

3.6 Entailment

The ideas on meaning and inference in RDF are underpinned by the formal concept of entailment, as discussed in the RDF semantics document [RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)]. In brief, an RDF expression A is said to entail another RDF expression B if every possible arrangement of things in the world that makes A true also makes B true. On this basis, if the truth of A is presumed or demonstrated then the truth of B can be inferred .

3.6 蕴涵

像在RDF语义文档中[RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)]讨论的,RDF中关于含义和推理的概念的基础是形式化的"蕴涵”概念。简单的说,一个RDF表达式A蕴涵另一个RDF表达式B,如果在世界上任何一个可能的使A为真的事物安排也使B为真。在这个基础上,如果假定或者证明A为真,则可以推断出B为真。

4. RDF Vocabulary URI and Namespace (Normative)

RDF uses URI references to identify resources and properties. Certain URI references are given specific meaning by RDF. Specifically, URI references with the following leading substring are defined by the RDF specifications:

Used with the RDF/XML serialization, this URI prefix string corresponds to XML namespace names [XML-NS (http://www.w3.org/TR/rdf-concepts/#ref-namespaces)] associated with the RDF vocabulary terms.
Note: this namespace name is the same as that used in the earlier RDF recommendation [RDF-MS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-ms)].
Vocabulary terms in the rdf: namespace are listed in section 5.1 (http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-Namespace) of the RDF syntax specification [RDF-SYNTAX (http://www.w3.org/TR/rdf-concepts/#ref-rdf-syntax)]. Some of these terms are defined by the RDF specifications to denote specific concepts. Others have syntactic purpose (e.g. rdf:ID is part of the RDF/XML syntax).

4. RDF词汇集URI和名字空间(标准)

RDF用URI引用来表示资源和属性。有几个URI引用在RDF中有特定的含义。明确说来,由以下字符串起始的URIref是由RDF规范定义的:

用于RDF/XML 序列化时,这个URI前缀对应着关联到RDF词汇集术语的XML名字空间的名字[XML-NS (http://www.w3.org/TR/rdf-concepts/#ref-namespaces)]。
备注: 这个命名空间的名字和用于以前的RDF推荐标准 [RDF-MS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-ms)]的名字一样。

rdf: 命名空间下的术语在RDF语法规范[RDF-SYNTAX (http://www.w3.org/TR/rdf-concepts/#ref-rdf-syntax)]. 的5.1节 (http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-Namespace)中列出。y一些RDF规范定义的术语是用以表示一些特定概念,其他用于语法上(如RDF/XML中的rdf:ID)。

5. Datatypes (Normative)

The datatype abstraction used in RDF is compatible with the abstraction used in XML Schema Part 2: Datatypes [XML-SCHEMA2 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema2)].
A datatype consists of a lexical space, a value space and a lexical-to-value mapping.
The lexical space of a datatype is a set of Unicode [UNICODE (http://www.w3.org/TR/rdf-concepts/#ref-unicode)] strings.
The lexical-to-value mapping of a datatype is a set of pairs whose first element belongs to the lexical space of the datatype, and the second element belongs to the value space of the datatype:

  • Each member of the lexical space is paired with (maps to) exactly one member of the value space.
  • Each member of the value space may be paired with any number (including zero) of members of the lexical space (lexical representations for that value).

A datatype is identified by one or more URI references.
RDF may be used with any datatype definition that conforms to this abstraction, even if not defined in terms of XML Schema.
Certain XML Schema built-in datatypes are not suitable for use within RDF. For example, the QName (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#QName) datatype requires a namespace declaration to be in scope during the mapping, and is not recommended for use in RDF. [RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)] contains a more detailed discussion (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#dtype_interp) of specific XML Schema built-in datatypes.
Note: When the datatype is defined using XML Schema:

  • All values correspond to some lexical form, either using the lexical-to-value mapping of the datatype or if it is a union datatype with a lexical mapping associated with one of the member datatypes.
  • XML Schema facets remain part of the datatype and are used by the XML Schema mechanisms that control the lexical space and the value space; however, RDF does not define a standard mechanism to access these facets.
  • In [XML-SCHEMA1 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema1)], white space normalization (http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#section-White-Space-Normalization-during-Validation) occurs during validation (http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-vn) according to the value of the whiteSpace facet (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#rf-whiteSpace). The lexical-to-value mapping used in RDF datatyping occurs after this, so that the whiteSpace facet has no effect in RDF datatyping.

5. 数据类型 (标准)

RDF中所用的数据类型抽象定义同XML Schema 第二部分:“数据类型”[XML-SCHEMA2 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema2)]所用的抽象定义相同。
数据类型由一个词法空间,一个值空间和一个“词法-到-值”的映射组成。
数据类型的“词法空间”是一个Unicode[UNICODE (http://www.w3.org/TR/rdf-concepts/#ref-unicode)]的字符串集合。
数据类型的“词法-到-值”的映射是一个序偶对集合,序偶对的首元素属于“词法空间”,序偶对的第二个元素属于“值空间”:

  • 词法空间的每个成员都确切地配对(映射)到一个值空间的成员。
  • 值空间的每个成员都可以配对到词法空间(那个值的词法表示)的任意数量的成员(包括0个成员)。

一个数据类型由一个或者多个URI引用标识。
即使没有用XML Schema的术语定义,RDF可以使用任何数据类型的定义,只要这个定义遵从这个抽象定义。
某些XML Schema中的内置数据类型不适合在RDF中采用。例如,QName (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#QName)数据类型在映射过程中,需要一个领域内命名空间的声明,因此不推荐在RDF中使用。[RDF-SEMANTICS (http://www.w3.org/TR/rdf-concepts/#ref-rdf-semantics)]文档中有关于XML Schema内置数据类型的更详细讨论 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#dtype_interp)
备注:当一个数据类型用XML Schema定义:

  • 所有值都对应一些词法形式,要么是使用数据类型的词法-到-值映射,要么它便是一种使用关联到一种数据类型元素的联合数据类型。
  • XML Schema保留了数据类型的刻面(facet),被XML Schema机制用来控制词空间和值空间;但是,RDF没有定义一个标准的机制来访问这些刻面(facet)。
  • 在[XML-SCHEMA1 (http://www.w3.org/TR/rdf-concepts/#ref-xml-schema1)]中,