Latest web development tutorials

RDF 規則

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

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


RDF 資源、屬性和屬性值

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

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

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

下面的RDF 文檔可描述資源"http://www.w3big.com/rdf":

<?xml version="1.0"?>

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

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


RDF 陳述

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

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

陳述:"The author of http://www.w3big.com/rdf is David."

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

陳述:"The homepage of http://www.w3big.com/rdf is http://www.w3big.com".

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