RDF Container Elements
RDF containers are used to describe a group of things. For example, listing the authors of a book together.
The following RDF elements are used to describe these groups:
rdf:Bag Element
rdf:Bag element is used to describe a list of values specified as unordered.
rdf:Bag element may contain duplicate values.
Example
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cd="http://www.recshop.fake/cd#"> rdf:about="http://www.recshop.fake/cd/Beatles"> rdf:liJohn rdf:liPaul rdf:liGeorge rdf:liRingo
rdf:Seq Element
rdf:Seq element is used to describe a list of values specified as ordered (such as an alphabetical sort).
rdf:Bag element may contain duplicate values.
Example
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cd="http://www.recshop.fake/cd#"> rdf:about="http://www.recshop.fake/cd/Beatles"> rdf:liGeorge rdf:liJohn rdf:liPaul rdf:liRingo
rdf:Alt Element
rdf:Alt element is used for a list of alternative values (the user can choose only one of these values).
Example
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cd="http://www.recshop.fake/cd#"> rdf:about="http://www.recshop.fake/cd/Beatles"> rdf:liCD rdf:liRecord rdf:liTape
RDF Terminology
In the example above, we discussed "lists of values" when describing container elements. In RDF, these "lists of values" are called members.
Therefore, we can say:
- A container is a resource that contains things
- The contained things are called members (not "lists of values").