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


RDF defines several container elements. The rdf:Seq element groups together resources order of which is significant. The individual resources are either individually numbered with rdf:_1, rdf:_2, rdf:_3 ... , or generalized form rdf:li can be used. In our case the library have several copies of the book Matilda. For some reason, e.g. to keep one of the copies(M126) in the best possible state, it preffers to lend the first specified book (M124) as often as possible. Compare with Example 12 in which the order was insignificant ant rdf:Alt was 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:li resource="M124"/>
                    <rdf:li resource="M125"/>
                    <rdf:li resource="M126"/>

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

     <lib:Book about="Heart of Darkness" lib:pages="110">
          <lib:copy rdf:resource="H16"/>
      <lib:Book about="Lord Jim" lib:pages="314">
          <lib:copy rdf:resource="L187"/>
     <lib:Book about="The Secret Agent" lib:pages="249">
          <lib:copy rdf:resource="T360"/>

Output Top

Roald Dahl :
Matilda [ M124 M125 M126 ]
The BFG [ T458 ]

Joseph Conrad :
Heart of Darkness [ H16 ]
Lord Jim [ L187 ]
The Secret Agent [ T360 ]