vCard in RDF/FOAF
To include address information in the RDF/FOAF file we need some additional specification from the web consortium. This implies usage of an additional namespace. Together with the namespaces for RDF, RDFS and FOAF the header of a FOAF file then looks like this:
?xml version="1.0" encoding="utf-8"?
rdf:RDF
xmlns = "http://www.w3.org/1999/html"
xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:vcard = "http://www.w3.org/2001/vcard-rdf/3.0#"
xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf = "http://xmlns.com/foaf/0.1/"
For the PersonalProfileDocument record nothing changes. So let's take a look again at the simple record for a person:
foaf:Person rdf:nodeID="me"
foaf:name
Siegfried Gipp/foaf:name
foaf:homepage rdf:resource="http://www.rorkvell.de/" /
foaf:img rdf:resource="http://www.rorkvell.de/sigi04.jpg" /
/foaf:Person
Now it's easy to add the address information like street, ZIP-code and location to the record, using vCard syntax:
foaf:Person rdf:nodeID="me"
foaf:name
Siegfried Gipp/foaf:name
foaf:homepage rdf:resource="http://www.rorkvell.de/" /
foaf:img rdf:resource="http://www.rorkvell.de/sigi04.jpg" /
vcard:ADR rdf:parseType="Resource"
vcard:Street
Grundstraße 66/vcard:Street
vcard:Pcode
64385/vcard:Pcode
vcard:Locality
Reichelsheim/vcard:Locality
vcard:Country xml:lang="en"
Germany/vcard:Country
vcard:Country xml:lang="de"
Deutschland/vcard:Country
/vcard:ADR
/foaf:Person
BTW: As you can see here, datafields may be attributed with a language attribute (xml:lang).