Address and Phone

From OpenOrg
Revision as of 14:43, 11 January 2011 by WikiSysop (talk | contribs) (Addresses)
Jump to: navigation, search

Addresses, phone numbers and so forth

TODO: Does this need changing in light of this public-lod thread?

The vCard namespace (usually shortened to the prefix 'v:') provides a general way to describe contact details, which can be applied to both organisations and places.




You should use v:adr to associate a

Note that an organisation's address is where to direct post, whereas that of a place refers to its physical location. Thus, a unit and its primary site may quite legitimately have different addresses.

An address is composed of the following parts to be reconstructed in the given order:

  • vcard:extended-address (e.g. *The Example Building**)
  • vcard:street-address (e.g. **Old Kent Road**)
  • vcard:locality (e.g. **London**)
  • vcard:postal-code (e.g. **EX1 1EX**)
  • vcard:country-name (e.g. **United Kingdom**)

You can omit unwanted parts as necessary.

Address have the type vcard:Address and are related to their subject by the v:adr property:

<syntaxhighlight lang="xml"> <rdf:RDF …>

 <rdf:Description rdf:about="">
   <rdf:type rdf:resource="" />
   <rdf:type rdf:resource="" />
   <rdfs:label>Physics Department</rdfs:label>

     <rdf:Description rdf:about="">
       <rdf:type rdf:resource="" />
       <vcard:extended-address>The Example Building</vcard:extended-address>
       <vcard:street-address>Old Kent Road</vcard:street-address>
       <vcard:postal-code>EX1 1EX</vcard:postal-code>
       <vcard:country-name>United Kingdom</vcard:country-name>

</rdf:RDF> </syntaxhighlight>

(the above example has embedded the address inside the org description to make it easier to read. You could omit the rdf:about which ends with "#address" but in general it's tidy to give everything an identifier, and for people, places and organisations adding "#address" to the end of their URI is a reasonable way to create a URI for their address.