RDF Containers

RDF also enables you to group properties together by defining property containers. Three containers exist:

ContainerDescription
BagA group of properties without any particular order.
SeqA sequence of properties in a specific order.
AltA list of properties giving alternate choices. Only one of all these choices is actually chosen.

These containers are supported with the <rdf:Bag>, <rdf:Seq>, and <rdf:Alt> elements, which have ID and aboutEach attributes. (The W3C RDF syntax specification mistakenly defines these elements with only an ID attribute, but then uses both attributes in the text). I'll use both those attributes in this chapter.

Using the Bag Container

You use a Bag container to indicate that a property has multiple, although ...

Get Inside XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.