Tuesday 5 May 2015

Lab Tutorial 3


Laboratory 3

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

    <?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>

   Result



2.  





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.   




     Code

     <?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-ns/#T-999”>">
     <dc:course>C-programming</dc:course>
    <dc:lecturer>Adib Razi</dc:lecturer>
    <dc:room>BT1</dc:room>
    </rdf:Description>
    </rdf:RDF>

    Result


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

      Code

     <?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:Bag="http://www.haneena.com/haneena-ns/#T-999”>">
     <dc:owner>Faizah, Din</dc:owner>
     <dc:owner>Din</dc:owner>
    <dc:car>ABZ-88</dc:car>
    </rdf:Description>
    </rdf:RDF>

     Result



 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.

      Code

     <?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/"
         xmlns:ex="http://example.org/stuff/1.0/">
     <rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar" dc:title="RDF/XML              Syntax Specification (Revised)">
    <ex:editor rdf:parseType="Resource">
      <ex:owner>Faizah, Din</ex:owner>
     <ex:owner>Din</ex:owner>
     <ex:car>ABZ-88</ex:car>
     <ex:homePage rdf:resource="http://purl.org/net/dajobe/"/>
    </ex:editor>
    </rdf:Description>
    </rdf:RDF>

    Result


No comments:

Post a Comment