ZVON > Tutorials > RDF Tutorial
>> Example 11 << | Prev | Next | Contents


RDF defines several container elements. The rdf:Bag element groups together relevant resources. The order of resources is not important and it can contain duplicate resources. The individual resources are either individually numbered with rdf:_1, rdf:_2, rdf:_3 ... , or generalized form rdf:li can be used.



     <lib:Author about="RD">

                    <rdf:_1 resource="Matilda"/>
                    <rdf:_2 resource="The BFG"/>
     <rdf:Description about="JC">
          <rdf:type resource="http://www.zvon.org/library/Author"/>

                    <rdf:li resource="Heart of Darkness"/>
                    <rdf:li resource="Lord Jim"/>
                    <rdf:li resource="The Secret Agent"/>
     <lib:Book about="Matilda" lib:pages="240"/>

     <rdf:Description about="The BFG" lib:pages="208">
          <rdf:type resource="http://www.zvon.org/library/Book"/>

     <lib:Book about="Heart of Darkness" lib:pages="110"/>
      <lib:Book about="Lord Jim" lib:pages="314"/>
     <lib:Book about="The Secret Agent" lib:pages="249"/>

Output Top

Roald Dahl :
Matilda [ 240 pages ]
The BFG [ 208 pages ]

Joseph Conrad :
Heart of Darkness [ 110 pages ]
Lord Jim [ 314 pages ]
The Secret Agent [ 249 pages ]