RDF Containers

RDF also allows you to group properties together by defining property containers. There are three containers:

  • Bag— A group of properties without any particular order.

  • Seq— A sequence of properties in a specific order.

  • Alt— A 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.

Get Real World 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.