Title: Representing vCard v3.0 in RDF
Author: Renato Iannella
From: http://www.dstc.edu.au/RDU/RDF/draft-iannella-vcard-rdf-00.txt
Date: 1999-01-19
---------------------------------------------------------------------------
Title: Representing vCard v3.0 in RDF
Creator: Renato Iannella
Date: 1999-01-14
1. Introduction
This memo specifies a Resource Description Format (RDF) [RDF] encoding
that corresponds to the vCard electronic business card profile defined by
RFC 2425 [VCARD]. This specification provides equivalent functionality to
the standard format defined by [VCARD]. RDF is an application of the
eXtensible Markup Language [XML]. Documents structured in accordance with
this RDF 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 memo is to define an
alternative RDF 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 XML and RDF syntax to better articulate
the original intent of the vCard authors. This memo attempts to be
consistent with other XML-based vCard formats, such as the XML DTD [VCDTD].
2. RDF vCard Namespace
RDF uses the XML Namespace [NAMESPACE] to uniquely identify the
metadata schema and version. For vCard, the following URI [URI] is
defined to be vCard Namespace:
http://imc.org/vCard/3.0#
The explicit use of this XML Namespace in RDF means that there is no
need to support the VCARD Profile and VERSION type.
Examples used in this memo will use "vCard" as the XML Namespace
prefix.
3. RDF vCard Specifications
3.1 Basic Properties
The RDF vCard equally promotes all vCard types into RDF property
types. 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 should 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 strings as their values
(objects of statements) and are simply represented by their
property type name and value as specified in the vCard specification
[VCARD]. These include:
FN
NICKNAME
BDAY
MAILER
GEO
TITLE
ROLE
CATEGORIES
NAME
SOURCE
NOTE
PRODID
REV
SORT-STRING
CLASS
For example, the following shows sample RDF vCard encodings:
Corky Crystal 1980-01-01 Computer Officer Class 3 Programmer
There are special cases to be noted for the SOURCE and NAME property
types. SOURCE maps to the RDF "about" URI and should be used to
indicate the unique identifier for the person object. NAME is a
human-displayable text about the vCard record itself (not the person).
If NAME is required, then it should be represented as a Statement about
Statements (see Section 4 of the RDF specification [RDF].)
3.2 Grouping and Ordering
To have multiple values of a vCard property type, RDF provides three
mechanisms; Bags, Sequences, and Alternatives.
An RDF Bag is used when there are more than one value and the order
is not important. For example:

Programmer

Fire Warden

If order is important, then an RDF Sequence can be used. For example:

Principal Research Scientist

Visiting Professor

An RDF Alternative is used when there is a choice of values available
for a property, with each value being valid but dependent on some other
externally defined factor. The first value is the default. For example,
a vCard resource may have a number of aliases for their email address.
In essence, these are all different representations of the same email
addresses. This would be encoded as:

corky@qqq.com

info@qqq.com

corky@hotmail.com

The vCard also allows properties to be arbitrarily grouped. For RDF
to support this, we need to define a new vCard property to capture
this. We call this new vCard property "GROUP".
For example, to group two NICKNAME and NOTE properties:

Corky Porky Only used by close friends

Princess Corky Only used by my Mother

Note: The "rdf:parseType=Resource" indicates that the

content
should be treated as if it were the content of an
element.
Some of these grouping and ordering features are unique to RDF,
so it is important to realise that the conversion from RDF to
native vCard format may result in some lose of information.
However, it should not be a critical lose of semantics.
3.3 Properties with Attributes
A number of vCard properties 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 represent this in RDF, we utilise the property which
allows us to specify the type of a resource by indicating a URI that
represents this type. The URI will be:
http://imc.org/vCard/3.0#
where will be one of the officially defined vCard type parameters.
Also, the property value must now be given by using the
property. For example:
+61 7 555 5555
Note: The "rdf:parseType=Resource" simply indicates properties within
the two tags, should be considered as the entire value for
the property.
The vCard properties that have a type parameter are listed here with
their possible values:
vCard Property Type Parameter Values
-------------- -----------------------------------------------
TEL home, msg, work, pref, voice, fax, cell, video,
pager, bbs, modem, car, isdn, pcs
EMAIL internet, x400, pref
ADR dom, intl, postal, parcel, home, work, pref
LABEL dom, intl, postal, parcel, home, work, pref
TZ text
In cases where the type parameter has been defined by an external
body (ie: not defined by the vCard specification), we must use
a "vCard:TYPE" attribute in the property since we have no control
over the potential size of this list.
For example, to indicate that the value for the UID property is
of type "United States Social Security Number":
555-555-555-555
The vCard properties that have uncontrolled type parameters are
listed here:
vCard Property Type Parameter Values
-------------- -----------------------------------------------
UID Any IANA registered or non-standard identifier formats
LOGO Any IANA registered or non-standard image formats
PHOTO Any IANA registered or non-standard image formats
SOUND Any IANA registered or non-standard sound formats
There are two special cases to be noted.
1 - The URL property can only have a valid URI as its value. RDF
provides a short-hand mechanism to encode this with the
"rdf:resource" attribute. For example:
2 - The LABEL property has a value that is formatted text which
may include XML statements. To indicate that the value should
not be interpreted, we use the "rdf:parseType" attribute set
to "Literal". For example:
Corky CrystalQQQ.COM Pty Ltd
PO Box 555
Coolville, AUSTRALIA
3.4 Structured Properties
A number of vCard properties defines 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:
Crystal Corky Jacky Dr III
The properties that have defined sub-structure are listed here
with the names of the property types.
vCard Property Substructure Name Property Type Name
-------------- -------------------- ------------------
N Family Name Family
Given Name Given
Additional Names Other
Honorific Prefixes Prefix
Honorific Suffixes Suffix
ADR Post Office Box Pobox
Extended Address Extadd
Street Address Street
Locality Locality
Region Region
Postal Code Pcode
Country Country
ORG Organisation Name Orgname
Organisation Unit Orgunit
There are two special cases to be noted.
1 - Even though the LABEL property has the same substructure
defined by N and ADR, we do not use them in specifying its
value. This is because the value of LABEL is formatted text
that is not intended to be interpreted.
2 - There is an implied ordering for Organisational Units
(higher to lower). This can be supported by using the
mechanism. An example is given in Section 5.
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:
PHOTO
LOGO
SOUND
KEY
In the case of binary values, we can represent the property with
a "vCard:ENCODING" attribute indicating the content value ("b").
For example:
MSJD9s99DS(S@W99329(#9....
In the case of an external reference, RDF provides a convenient
encoding with the "rdf:resource" construct. For example:
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:
Corky Crystal Research Director John Mutton Personal Assistant john@qqq.com
To refer to an external identification (via a URI) of the
Agent resource, RDF supports encoding with the "rdf:resource" construct.
For example:
Corky Crystal Research Director
4. vCard Language
To express the language encoding of vCard property values, XML
provides a convenient "xml:lang" attribute. The values are defined
in RFC 1766. For example:
Corky Crystal Computer Officer Class 3 Programmer
In cases where a single vCard property is expressed with multiple
language values, the RDF Alternative construct should be used.
For example:

Programmer

Programmeur

Programmatore

5. Complete Examples
It is important to note that since XML is case-sensitive, the
property and attribute names used in this specification and the
below examples, should be taken literally.
The following is a complete example of an RDF encoded vCard:
xml version="1.0" ?>
Corky Crystal Crystal Corky Jacky Dr 1980-01-01 Computer Officer Class 3 Programmer +61 7 555 5555 corky@qqq.com 111 Lake Drive
WonderCity
5555
Australia
The following is an example of an RDF vCard that includes a photo element
as inline binary content.
xml version="1.0" ?>
Corky Crystal Crystal Corky corky@qqq.com
MIICajCCAdOgAwIBAgICBEUwDQEEBQAwdzELMAkGA1UEBhMCVVMxLDA
qBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25z.....W992WW329
This example shows how an RDF vCard objects can be integrated with
other metadata standards and encoded with RDF. In this example, the
Dublin Core [DC] metadata standard is used.
xml version="1.0" ?>
Annual Report 1998/1999 Corky Crystal Crystal Corky corky@qqq.com 1998-01-01 Company Report, Outcomes, Objectives QQQ.COM Pty Ltd Copyright 1999
The following is an example of an RDF vCard that includes structured
Organisation information:
xml version="1.0" ?>
Corky Crystal Crystal Corky corky@qqq.com QQQ.COM Pty Ltd