RDF 集合用于描述僅包含指定成員的組。
RDF 集合
rdf:parseType="Collection" 屬性
正如在前面的章節(jié)所看到的,我們無(wú)法關(guān)閉一個(gè)容器。容器規(guī)定了所包含的資源為成員 - 它沒(méi)有規(guī)定其他的成員是不被允許的。
RDF 集合用于描述僅包含指定成員的組。
集合是通過(guò)屬性 rdf:parseType="Collection" 來(lái)描述的。
實(shí)例
<?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>