XML/RDF Example, is it correct?

wxdqz

New Member
I'm writing a report on the semantic web for part of a college asignment, and I'm using the following to show how RDF is used... but i'm not sure if its correct, Im finding it hard to get my head round the whole RDF thing!

An address written as HTML


<p>123 The Street<br>
Worthing<br>
West Sussex<br>
BN16 1AB</p>


The same address written as XML


<address>
<street>123 The Street</street>
<town>Worthing</town>
<county>West Sussex</county>
<postCode>BN16 1AB</postCode>
</address>


The same address written as XML/RDF with a custom namespace 'addr'


<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<address xmlns:addr="http://example.com/addr">
<addr:street>123 The Street</addr:street>
<addr:town>Worthing</addr:town>
<addr:county>West Sussex</addr:county>
<addr:postCode>BN16 1AB</addr:postCode>
</address>
</rdf:RDF>


Is that correct, and are there any better ways of doing it?

Thanks

- Chris
 
Back
Top