Saturday, 26 March 2016

Lab 3

no 1 Resource  http: //www.haneena.com/~haneena/homepage is a homepage and it is owned by Haneena. 

ANSWER :


 <?xml version="1.0"?>
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"       
      xmlns:dc="http://purl.org/dc/elements/1.1/">
   <rdf:Description rdf:about="http://www.haneena.com/~haneena/homepage">
   <dc:title>haneena</dc:title>
   </rdf:Description>
   </rdf:RDF>





*********************************************************************************************




no 2 Resource  http: //www.haneena.com/haneena-ns/#T-999”> is a course named C-programming and is lectured by Adib Razi at room BT1.


ANSWER :


<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/">
  <rdf:Description rdf:about="http://www.haneena.com/~haneena/homepage">
    <dc:lecturer>Adib Razi</dc:lecturer>
    <dc:room>BT1</dc:room>
    <dc:subject>C prog</dc:subject>
  </rdf:Description>
</rdf:RDF>



*********************************************************************************************



no 3  By using container elemn rdf:Bag,  give an RDF description that states the following: Faizah and Din own the car ABZ-88


ANSWER :

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://www.haneena.com/~haneena/homepage">
    <dc:owner>
     <rdf:Bag>
         <rdf:li>Faizah</rdf:li>
         <rdf:li>Din</rdf:li>
       </rdf:Bag>
     </dc:owner>
     <dc:room>Adib Razi</dc:room>
     <dc:subject>C prog</dc:subject>
  </rdf:Description>
 </rdf:RDF>




*********************************************************************************************



no 4  By using the ”collection” value of the rdf : parseType attribute give an RDF description that states the following: Faizah and Din own the car ABZ-88.



ANSWER :

<?xml version="1.0"?>
 <rdf:RDF
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:car="http://www/mydomain.org/my-rdf-ns">
  <rdf:Description rdf:about="http://www.haneena.com/haneena-ns/#T-999">
   <car:name>ABZ-88</car:name>
     <car:owner rdf:parseType="Collection">
 <rdf:Description rdf:about="http://www.haneena.com/haneena-ns/#T-999/Faizah"/>
 <rdf:Description rdf:about="http://www.haneena.com/haneena-ns/#T-999/Din"/>
     </car:owner>
  </rdf:Description>
 </rdf:RDF>