next up previous
Next: Distributed descriptions Up: XML syntax Previous: Descriptions

Containers

As mentioned in the previous section, RDF containers are defined as a part of the XML syntax. A container node is described with a special element named rdf:Bag, rdf:Seq or rdf:Alt (those elements can be used instead of rdf:Description elements). Those special descriptions can only have rdf:ID attribute or be anonymous, they can not have rdf:about.

Membership properties are not used as is, but instead the element rdf:li is used; the parser has to replace it by the appropriate numbered property. Figure 4 is an example of it.

Figure 4: An RDF bag
<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Bag ID="mybag">
    <rdf:li resource="http://rama.cpe.fr/index.html"/>
    <rdf:li resource="mailto:champin@cpe.fr"/>
    <rdf:li> literal element </rdf:li>
  </rdf:Bag>
</rdf:RDF>
\includegraphics[width=12cm]{img/xml_bag.ps}



Pierre-Antoine CHAMPIN 2001-04-05