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

Description


This example rewrites Example 6 using abbreviated syntax.

Source


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


     <rdf:Description about="Matilda" lib:pages="240">
          <lib:creator>
               <rdf:Description about="RD" lib:firstName="Roald" lib:surname="Dahl"/> 
          </lib:creator>
     </rdf:Description>

     <rdf:Description about="The BFG" lib:pages="208">
          <lib:creator rdf:resource='RD'/>
     </rdf:Description>

     <rdf:Description about="Heart of Darkness" lib:pages="110">
          <lib:creator>
               <rdf:Description about="JC" lib:firstName="Joseph" lib:surname="Conrad"/>
          </lib:creator>
     </rdf:Description>          

     <rdf:Description about="Lord Jim" lib:pages="314">
          <lib:creator rdf:resource='JC'/>
     </rdf:Description>          

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

Output Top

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