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

Description


The same information as in Example 1 could be given in this way, if default namespace syntax is used for RDF element.

Source


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

     <Description about="Matilda">
          <lib:creator>Roald Dahl</lib:creator>
          <lib:pages>240</lib:pages>
     </Description>

     <Description about="The BFG">
          <lib:creator>Roald Dahl</lib:creator>
          <lib:pages>208</lib:pages>
     </Description>

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

     <Description about="Lord Jim">
          <lib:creator>Joseph Conrad</lib:creator>
          <lib:pages>314</lib:pages>
     </Description>          

     <Description about="The Secret Agent">
          <lib:creator>Joseph Conrad</lib:creator>
          <lib:pages>249</lib:pages>
     </Description>          
</RDF>

Output Top

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