中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

RDF 主要元素


RDF 的主要元素是 <RDF> 以及可表示某個(gè)資源的 <Description> 元素。


<rdf:RDF> 元素

<rdf:RDF> 是 RDF 文檔的根元素。它把 XML 文檔定義為一個(gè) RDF 文檔。它也包含了對(duì) RDF 命名空間的引用:

<?xml version="1.0"?>

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

<rdf:Description> 元素

<rdf:Description> 元素可通過 about 屬性標(biāo)識(shí)一個(gè)資源。

<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>

artist、country、company、price 以及 year 這些元素被定義在命名空間 http://www.recshop.fake/cd# 中。此命名空間在 RDF 之外(并非 RDF 的組成部分)。RDF 僅僅定義了這個(gè)框架。而 artist、country、company、price 以及 year 這些元素必須被其他人(公司、組織或個(gè)人等)進(jìn)行定義。


屬性(property)來定義屬性(attribute)

屬性元素(property elements)也可作為屬性(attributes)來被定義(取代元素):

<?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>

屬性(property)來定義屬性(attribute)

屬性元素(property elements)也可作為屬性(attributes)來被定義(取代元素):

<?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>

上面的例子中,屬性 artist 沒有值,但是卻引用了一個(gè)對(duì)包含有關(guān)藝術(shù)家的信息的資源。