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

Description


The attribute aboutEachPrefix used in rdf:Description element creates a bag of all resources URI of which starts with given string.

Source


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

     <rdf:Description aboutEachPrefix="The">
          <lib:firstWord>The</lib:firstWord>
     </rdf:Description>
          
     <lib:Author about="RD">
          <lib:firstName>Roald</lib:firstName>
          <lib:surname>Dahl</lib:surname> 
     </lib:Author>

     <lib:Author about="JC">
          <lib:firstName>Joseph</lib:firstName>
          <lib:surname>Conrad</lib:surname> 
     </lib:Author>

     <lib:Book about="Matilda">
          <lib:creator rdf:resource='RD'/>
          <lib:pages>240</lib:pages>
     </lib:Book>

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

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

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

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

Output Top

The names of following books start with The:
The BFG
The Secret Agent