Difference between revisions of "Address and Phone"

From OpenOrg
Jump to: navigation, search
(Addresses)
Line 4: Line 4:
  
 
The [http://www.w3.org/Submission/vcard-rdf/ 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.
 
The [http://www.w3.org/Submission/vcard-rdf/ 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.
 +
 +
== Namespaces ==
 +
 +
[http://prefix.cc/vcard.rdf vcard]
  
 
== Addresses ==
 
== Addresses ==
 +
 +
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.
 
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.
Line 11: Line 17:
 
An address is composed of the following parts to be reconstructed in the given order:
 
An address is composed of the following parts to be reconstructed in the given order:
  
* v:extended-address (e.g. *The Example Building**)
+
* vcard:extended-address (e.g. *The Example Building**)
* v:street-address (e.g. **Old Kent Road**)
+
* vcard:street-address (e.g. **Old Kent Road**)
* v:locality (e.g. **London**)
+
* vcard:locality (e.g. **London**)
* v:postal-code (e.g. **EX1 1EX**)
+
* vcard:postal-code (e.g. **EX1 1EX**)
* v:country-name (e.g. **United Kingdom**)
+
* vcard:country-name (e.g. **United Kingdom**)
  
 
You can omit unwanted parts as necessary.
 
You can omit unwanted parts as necessary.
  
Adddress have the type v:Address and are related to their subject by the v:adr property:
+
Address have the type vcard:Address and are related to their subject by the v:adr property:
  
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
 
<rdf:RDF …>
 
<rdf:RDF …>
   <aiiso:Department rdf:about="http://id.example.ac.uk/units/physics-department">
+
   <rdf:Description rdf:about="http://id.example.ac.uk/units/physics-department">
 +
    <rdf:type rdf:resource="http://www.w3.org/ns/org#OrganizationalUnit" />
 +
    <rdf:type rdf:resource="http://purl.org/vocab/aiiso/schema#Department" />
 
     <rdfs:label>Physics Department</rdfs:label>
 
     <rdfs:label>Physics Department</rdfs:label>
 +
 +
    <vcard:adr>
 +
      <rdf:Description rdf:about="http://id.example.ac.uk/units/physics-department#adress">
 +
        <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Address" />
 +
        <vcard:extended-address>The Example Building</vcard:extended-address>
 +
        <vcard:street-address>Old Kent Road</vcard:street-address>
 +
        <vcard:locality>London</vcard:locality>
 +
        <vcard:postal-code>EX1 1EX</vcard:postal-code>
 +
        <vcard:country-name>United Kingdom</vcard:country-name>
 +
      </rdf:Description>
 +
    </vcard:adr>
  
    <v:adr>
+
   </rdf:Description>
      <v:Address>
 
        <v:extended-address>The Example Building</v:extended-address>
 
        <v:street-address>Old Kent Road</v:street-address>
 
        <v:locality>London</v:locality>
 
        <v:postal-code>EX1 1EX</v:postal-code>
 
        <v:country-name>United Kingdom</v:country-name>
 
      </v:Address>
 
    </v:adr>
 
   </aiiso:Department>
 
 
</rdf:RDF>
 
</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.

Revision as of 14:43, 11 January 2011

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.

Namespaces

vcard

Addresses

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="http://id.example.ac.uk/units/physics-department">
   <rdf:type rdf:resource="http://www.w3.org/ns/org#OrganizationalUnit" />
   <rdf:type rdf:resource="http://purl.org/vocab/aiiso/schema#Department" />
   <rdfs:label>Physics Department</rdfs:label>

   <vcard:adr>
     <rdf:Description rdf:about="http://id.example.ac.uk/units/physics-department#adress">
       <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Address" />
       <vcard:extended-address>The Example Building</vcard:extended-address>
       <vcard:street-address>Old Kent Road</vcard:street-address>
       <vcard:locality>London</vcard:locality>
       <vcard:postal-code>EX1 1EX</vcard:postal-code>
       <vcard:country-name>United Kingdom</vcard:country-name>
     </rdf:Description>
   </vcard:adr>
 </rdf:Description>

</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.