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

Description


In this example the syntaxes of Example 8 and Example 9 are combined.

Source


<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:lib="http://www.zvon.org/library">

     <lib:Author about="RD">
          <lib:firstName>Roald</lib:firstName>
          <lib:surname>Dahl</lib:surname> 
     </lib:Author>
          
     <rdf:Description about="JC">
          <rdf:type resource="http://www.zvon.org/library/Author"/>
          <lib:firstName>Joseph</lib:firstName>
          <lib:surname>Conrad</lib:surname> 
     </rdf:Description>
          
     <lib:Book about="Matilda">
          <lib:creator rdf:resource='RD'/>
          <lib:pages>240</lib:pages>
     </lib:Book>

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

     <lib:Book about="Heart of Darkness">
          <lib:creator rdf:resource='JC'/>
          <lib:pages>110</lib:pages>
     </lib:Book>          

     <rdf:Description about="Lord Jim">
          <rdf:type resource="http://www.zvon.org/library/Book"/>
          <lib:creator rdf:resource='JC'/>
          <lib:pages>314</lib:pages>
     </rdf:Description>          

     <lib:Book about="The Secret Agent">
          <lib:creator rdf:resource='JC'/>
          <lib:pages>249</lib:pages>
     </lib:Book>          
</rdf:RDF>

Output Top

Author Title Pages
Dahl, Roald Matilda 240
Dahl, Roald The BFG 208
Joseph Conrad Heart of Darkness 110
Joseph Conrad Lord Jim 314
Joseph Conrad The Secret Agent 249