W3C

Representing vCard Objects in RDF

DRAFT DRAFT DRAFT

W3C Note XX Sept 2009

This version:
http://www.w3.org/TR/2009/NOTE-vcard-rdf-2009XXXX
Latest version:
http://www.w3.org/TR/vcard-rdf
Previous version:
http://www.w3.org/TR/2001/NOTE-vcard-rdf-20010222
Editor:
Renato Iannella, NICTA
Authors:
Harry Halpin, Renato Iannella, Brian Suda, Norman Walsh

Abstract

This note specifies a Resource Description Framework (RDF) encoding of the vCard profile defined by RFC 2426 and to provide equivalent functionality to its standard format. The motivation is to enable the common and consistent description of persons (using the existing semantics of vCard) and to encode these in RDF/XML.

Status of this document

This document is a submission to the World Wide Web Consortium from NICTA (see Submission Request, W3C Staff Comment). For a full list of all acknowledged Submissions, please see Acknowledged Submissions to W3C.

This document is a NOTE made available by the W3C for discussion only. Publication of this Note by W3C indicates no endorsement by W3C or the W3C Team, or any W3C Members. W3C has had no editorial control over the preparation of this Note. This document is a work in progress and may be updated, replaced, or rendered obsolete by other documents at any time.

Comments on this document may be sent to the author or to the publicly archived Semantic Web Interest Group distribution list, semantic-web@w3.org [archive].

A list of current W3C technical documents can be found at the Technical Reports page.

Table of contents

    FIX THIS

1. Introduction

This note specifies a Resource Description Framework (RDF) [RDF] expression that corresponds to the vCard electronic business card profile defined by RFC 2426 [VCARD]. This specification provides equivalent functionality to the standard format defined by [VCARD] Version 3.0. Documents structured in accordance with this RDF/XML encoding may also be known as 'RDF vCard' documents.

This specification is in no way intended to create a separate definition for the vCard schema. The sole purpose for this note is to define an alternative RDF/XML encoding for the format defined by [VCARD].

The RDF vCard does not introduce any capability not expressible in the format defined by [VCARD]. However, an attempt has been made to leverage the capabilities of the RDF model to appropriately articulate the vCard semantics.

2. RDF vCard Namespace

RDF uses the XML Namespace [XMLNS] to uniquely identify the metadata schema and version. For vCard, the following URI [URI] is defined to be vCard Namespace:

http://www.w3.org/2006/vcard/ns#

The explicit use of this XML Namespace in RDF means that there is no need to support the VCARD Profile and Version types.

This namespace name (URI) will only be used to refer to this version of this specification: different URIs will be used for any and all new versions of the specification except as follows.

  1. This namespace name may be reused in any update of the specification which is made for the purpose of clarification or bug fixes. These changes will be minor in that they do not (a) change the meaning or validity of existing documents written using the namespace, or (b) affect the operation of existing software written to process such documents.

Examples used in this note will use "v" as the prefix for the vCard XML Namespace and "rdf" for the RDF XML Namespace. However, any prefix can be utilised as long as it is associated with the correct XML Namespace.

3. RDF vCard Guidelines

3.1 Classes and Properties

There are eight main vCard types that are RDF Classes: VCard, Name, Address, Organisation, Location, Label, Tel, and Email.

All other vCard types are defined as RDF properties. Note, some of the vCard types, for example BEGIN, END, PROFILE, and VERSION, are not required to be expressed as these are implicitly provided by RDF.

With RDF, statements are made about a resource. The resource in question is identified with a URI. This has similar semantics to the vCard UID type. Hence, RDF descriptions may additionally use the vCard UID as the RDF "about" value when the UID is expressed as a machine-resolvable URI.

The majority of the vCard property types have string literals as their values (objects of statements) and are simply represented by their property type name and value as specified in the vCard specification [VCARD].

As an example, the following shows an RDF vCard object:

    <VCard>
      <fn> Corky Crystal </fn>
      <bday> 1980-01-01 </bday>
      <title> Computer Officer Class 3 </title>
      <email rdf:resource="mailto:corky@example.com"/>
    </VCard>      

See Appendix A for the complete list of Classes and Properties.

3.2 Grouping

To have multiple values of a vCard property type, use the rdf:list construct. For example, we can use the rdf:parseType="Collection" shortcut for this purpose:

***NEED TO CHECK THIS! ***

      <vCard:title rdf:parseType="Collection">
            <rdf:li> Principal Scientist </rdf:li>
            <rdf:li> Visiting Professor </rdf:li>
         </rdf:list>
     </vCard:title>

3.3 vCard Type Parameters

A number of vCard properties (ie Address, Label, Email, Tel) include the ability to indicate one or more "type parameters" of a value. For example, to indicate that a Telephone number is a Fax number, or that a particular email address is the preferred value.

To support the vCard mechanisms for "type parameters", a number of subclasses have been defined for this purpose:

To represent this in RDF, we utilise the <rdf:type> property which allows us to specify the type of a resource by indicating a subclass that represents this type. For example:

   <vCard:tel rdf:parseType="Resource">
    <rdf:value> +61 7 555 5555 </rdf:value>
    <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Work"/>
    <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Cell"/>
    <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Pref"/>
   </vCard:tel>

Note: The "rdf:parseType=Resource" simply indicates properties within the two <vCard:tel> tags, should be considered as the entire value for the <vCard:tel> property.

NOTE on backwards compatibility: Some previous vCard/RDF documents have used a different method for specifying vCard's type parameters. These used additional properties, such as fax, mobileTel, workAdr, as a solution. This NOTE recognises that this approach has been deployed previously and considers these as "short-cut" properties to the more formal approach adopted here. Please see Appendix B for the list of "short-cut" properties. However, this NOTE recommends the approach described in this section for vCard typed parameters.

3.4 Structured Properties

A number of vCard properties define sub-structure. For example, the "n" property has Family Name, Given Names, and Honorific. It is important to preserve and express this structure and it is fully-supported in the RDF model. For example:

     <vCard:n rdf:parseType="Resource">
        <vCard:family-name> Crystal </vCard:family-name>
        <vCard:given-name>  Corky </vCard:given-name>
        <vCard:additional-name>  Jacky </vCard:additional-name>
        <vCard:honorific-prefix> Dr </vCard:honorific-prefix>
        <vCard:honorific-suffix> III </vCard:honorific-suffix>
     </vCard:n>

3.5 Binary Values

A number of vCard properties allow for inline binary values (encoded in BASE64) or external references via a URI. These include:

In the case of inline binary values, we can represent the property as:

     <vCard:photo>
          MSJD9s99DS(S@W99329(#9....
     </vCard:photo>

In the case of an external reference, RDF provides a convenient encoding with the "rdf:resource" construct. For example:

     <vCard:photo rdf:resource="http://example.com/me.gif"/>

3.6 Agent Property

The Agent property allows the specification or identification of another vCard resource. RDF allows for the Agent vCard resource to be inline with an existing vCard resource. For example:

      <vCard:fn> Corky Crystal </vCard:fn>
      <vCard:title> Research Director </vCard:title>
      <vCard:agent rdf:parseType="Resource">
         <vCard:fn> Billie Kaur </vCard:fn>
         <vCard:title> Personal Assistant </vCard:title>
         <vCard:email> billie@example.com </vCard:email>
      </vCard:agent>
 

To refer to an external identifiers (via a URI) of the Agent resource, RDF supports encoding with the "rdf:resource" construct. For example:

      <vCard:fn> Corky Crystal </vCard:fn>
      <vCard:agent rdf:resource="http://example.com/staff/billie/"/>

3.7 Geo Property

The vCard Geo Property typically takes a "long,lat" as a literal value. We recommend the use of the W3C Basic Geo (WGS84 lat/long) Vocabulary to specify the longitude and latitude values. See Section 4 for an example.

4. RDF vCard Example

The following is a complete example of an RDF encoded vCard including Geo location.

  <?xml version="1.0"?>
  <rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           xmlns:v = "http://www.w3.org/2006/vcard/ns#"
           xmlns:g="http://www.w3.org/2003/01/geo/wgs84_pos#>
           
    <rdf:Description rdf:about = "http://example.com/staff/corky" >
      <v:fn> Corky Crystal </v:fn>
      <v:bday> 1980-01-01 </v:bday>
      <v:title> Computer Officer Class 3 </v:title>
      <v:role> Programmer </v:rle>
      <v:tel rdf:parseType="Resource">
        <rdf:value> +61 7 555 5555 </rdf:value>
        <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Work"/>
        <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Voice"/>
      </v:tel>
      <v:email rdf:resource="mailto:corky@example.com">
      <v:adr rdf:parseType="Resource">
        <v:street-address> 111 Lake Drive </v:street-address>
        <v:locality> WonderCity </v:locality>
        <v:postal-code> 5555 </v:p-code>
        <v:country-name> Australia </v:country-name>
      </v:adr>
      <v:geo rdf:parseType="Resource">
        <g:lat> 43.33 </g:lat>
        <g:long> 55.45 </g:long>
      </v:geo>     
    </rdf:Description>
  </rdf:RDF>

Appendix A - vCard RDF Ontology Reference

INSERT THE HTML-IZED VERSION OF THE RDF SCHEMA HERE

Appendix B - vCard RDF "Short-Cut" Properties

The following properties - used in some current implementations - are considered as "short-cut" properties. Although supported,the approach described in Section 3.3 is recommended.

The following properties - used in some current implementations - are considered as "short-cut" properties. Although supported,the approach described in Section 3.7 is recommended.

Acknowledgments

References

[VCARD]
vCard MIME Directory Profile, F. Dawson and T. Howes, Internet RFC 2426, September 1998. <ftp://ftp.isi.edu/in-notes/rfc2426.txt>