正如在前面的章节所看到的,我们无法关闭一个容器。容器规定了所包含的资源为成员 - 它没有规定其他的成员是不被允许的。
RDF 集合用于描述仅包含指定成员的组。
集合是通过属性 rdf:parseType="Collection" 来描述的。
<?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> |