You are on page 1of 2

A.

RDF/XML

<rdf:RDF
<!–- inisiasi namespace/prefix -->
xmlns:people=http://webcontoh.net/people#”
xmlns:foaf=“http://xmlns.com/foaf/0.1/
xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#”
xmlns:ext=http://webcontoh.net/vocab#
xmlns:univ=http://academia.net/university/

<!–- statements -->


<rdf:Description rdf:about=“http://webcontoh.net/people#Hendrik”>
<ext:teaches
rdf:resource=“http://webcontoh.net/course#semanticWeb” />
<foaf:knows
rdf:resource=“http://webcontoh.net/people#Beni” />
</rdf:Description>

<foaf:Person rdf:ID=“#Beni” />


<rdf:Description rdf:about=“#Beni”>
<rdf:type rdf:resource=“http://xmlns.com/foaf/0.1/Person” />
<foaf:familyName xml:lang=“id”
rdf:datatype=“http://www.w3.org/2001/XMLSchema#string”>Suranto</foaf:familyNam
e>
<foaf:organization
rdf:resource=“http://academia.net/univeristy/Islamic_University_of_Indonesia” />
</rdf:Description>

<rdf:Description
rdf:about=“http://academia.net/university/Islamic_University_of_Indonesia”>
<foaf:homepage> http://uii.ac.id </foaf:homepage>
</rdf:Description>
<!–- akhir dokumen XML -->
</rdf:RDF>
B. Turtle

#Inisiasi prefix
@prefix people: <http://webcontoh.net/people#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ext: <http://webcontoh.net/vocab#> .
@prefix univ: <http://academia.net/university/> .
@prefix course: <http://webcontoh.net/course#> .

#Statements
people:Hendrik ext:teaches course:semanticWeb .
people:Hendrik foaf:knows people:Beni.
People:Beni
a foaf:Person;
foaf:familyName
“Suranto”@id^^<“http://www.w3.org/2001/XMLSchema#string”>;
foaf:organization univ:Islamic_University_of_Indonesia.
univ:Islamic_University_of_Indonesia foaf:homepage .

# statement tambahan untuk menunjukkan contoh penggunaan tanda koma(,)


people:Hendrik foaf:knows people:Beni, people:Lizda, people:Ridho .

C. N-Triples

<http://webcontoh.net/people#Hendrik> <http://xmlns.com/foaf/0.1/knows>
<http://webcontoh.net/people#Beni>.
<http://webcontoh.net/people#Beni> <http://xmlns.com/foaf/0.1/familyName>
“Suranto”.

You might also like