FAQDOCSDOWNLOADSGALLERYJA-SIG LogoSourceForge.net Logo
Overview
Getting Started
Using the Content Manager
Authoring Content
Developing Sites
Project Definition Files
Filesystems
Path patterns
Content Types
XML Content
RDF: Extensible Metadata
Dublin Core Metadata
VCard Metadata
XML Includes
XSL Transformations
Filters
Non-XML Content
Editors
Ignored Directories
Permissions
Navigation and Site Maps
Optimizations
Glossary
Bibliography

Contact Information: HyperContent, VCard and LDAP


As early versions of HyperContent grew to host a number of large web sites, the most common type of structured information required across all the sites turned out to be contact information, used in constructing biographical pages for faculty and students, as well as departmental directories. The first sites stored this information in XML, but a common request was for a more user friendly way to enter contact information, with the ability to retrieve as much information as possible from LDAP.

The most pervasive Internet standard related to contact information is VCard, a standard published in 1998 by the Internet Society and widely supported by email and Personal Information Management software. VCard 3.0 supports not only basic contact information (name, phone numbers, email address, postal addresses, etc), but provides support for binary data such as a photograph.

By storing VCard information as metadata, HyperContent makes it possible to associate this standard contact information with any type of file, for example an XML file containing a biography of the person. The W3C has posted a note regarding the representation of VCard data in RDF, but as the responses on the W3C site point out, the proposal is fundamentally flawed in ways that have not been addressed. The effort has therefore not produced a usable standard for the representation of VCard in RDF, so HyperContent implements a workable VCard RDF grammar in its own namespace. This is not of concern for interoperability, as HyperContent can take its RDF-encoded VCard data and publish it in the standard plain text VCard format described in the original specification, and also allows content authors to import standard VCard files from their email or PIM software directly into the VCard editor. Round trips between standard VCard encoding and HyperContent's RDF VCard encoding are lossless, even with custom X-object and X-parameters or other standard VCard elements not displayed in the VCard editor.

LDAP integration allows a user to populate standard VCard fields in the VCard editor with the results of an LDAP query, saving time and reducing the chance of errors. The configuration file LDAPtoVCARD.xml allows you to specify LDAP connection information, and has a VCard RDF template in XML which can be used to associate LDAP fields with particular VCard properties. Fields from the LDAP result are referenced by name in curly braces (e.g. {givenname}), and other values can be hardcoded (e.g. institution name).

It is important to understand the structure of HyperContent's RDF representation of VCard in order to access VCard data in XSL transformations. For information about the values and use of specific properties, refer to the VCard RFC.

HyperContent VCard 3.0 Namespace

vcard="http://www.ais.columbia.edu/sws/xmlns/vcard3.0#"

vcard:VCARD

The value of the vcard:VCARD property is the resource to which all other vcard properties are applied. In XPath, it will always appear between the fs:File element and the desired VCard attribute: e.g. 'rdf:RDF/fs:File/vcard:VCARD/vcard:FN/vcard:text'.
All of the capitalized properties listed below have values which are resources, which may all have common VCard properties assigned to them (listed at the end), and unless otherwise specified have a property vcard:text which contains the actual string data.

vcard:FN

vcard:ADR
The value of the vcard:ADR property is a resource which may have the following properties applied to it (the values of these properties are strings containing the relevant data):

vcard:poBox
vcard:extendedAddress
vcard:streetAddress
vcard:locality
vcard:region
vcard:postalCode
vcard:countryName

vcard:N
The value of the vcard:N property is a resource which may have the following properties applied to it (the values of these properties are strings containing the relevant data):

vcard:familyName
vcard:givenName
vcard:additionalName
vcard:honorificPrefix
vcard:honorificSuffix

vcard:NICKNAME
Nickname is a multivalued attribute; the values are kept in an rdf:Bag. The nodelist of nicknames can be retrieved in XPath as 'rdf:RDF/fs:File/vcard:VCARD/vcard:NICKNAME/rdf:Bag/rdf:li'.
vcard:BDAY
vcard:BDAY may have either a vcard:text property or a vcard:Date and optional vcard:Time property - see below for more details.
vcard:PHOTO
A photo resource may either have a vcard:uri property whose value is the network location of the graphic, or a vcard:binary property whose value is the base64 encoded image data. Note that the actual base64 data is not passed through to XSL transformations for the sake of efficiency, but testing for the presence of 'rdf:RDF/fs:File/vcard:VCARD/vcard:PHOTO/vcard:binary' will properly reflect whether there is binary image data in the source file. Also note that the common vcard property vcard:type has the corresponding mime image subtype as a value (HyperContent uses jpeg by default).
vcard:LABEL

vcard:TEL
The string data for vcard:TEL is the value of the vcard:phoneNumber property.
vcard:EMAIL

vcard:MAILER

vcard:TZ
The data for vcard:TZ is specified with either the vcard:text or vcard:utcOffset property as appropriate.
vcard:GEO
vcard:GEO has two properties which express the relevant coordinates: vcard:longitude and vcard:latitude.
vcard:TITLE
vcard:ROLE
vcard:LOGO
Same possible structure as vcard:PHOTO, see above.
vcard:AGENT
vcard:Agent has one of three properties, vcard:uri pointing to a reference on the network, vcard:text for a plain text value, or vcard:VCARD referencing a resource which contains VCard properties for the agent.
vcard:ORG
vcard:ORG supports a vector of values, used to express a hierarchy. The value is an rdf:Seq resource, whose rdf:li properties express the levels of the hierarchy from the top down.
vcard:CATEGORIES
Categories is a multivalued attribute; the values are kept in an rdf:Bag.
vcard:NOTE

vcard:PRODID

vcard:REV
vcard:REV may have either a vcard:text property or a vcard:Date and optional vcard:Time property - see below for more information.
vcard:SORT-STRING

vcard:SOUND
vcard:SOUND has the same possible structure as vcard:PHOTO (see above), except the vcard:type property is used to indicate the corresponding MIME audio subtype.
vcard:UID

vcard:URL

The address of a vcard:URL is the value of the vcard:uri property.
vcard:CLASS

vcard:KEY
vcard:KEY has either a vcard:text property or a vcard:binary property (with base64 encoded binary data).
vcard:X-OBJECT
Two properties apply to vcard:X-OBJECT; vcard:xname indicates the object's name and vcard:text indicates the object's value.

Date and Time

There are two special resources which model Date and Time, that may be applied as properties to either vcard:BDAY or vcard:REV

vcard:Date
vcard:Date has three properties:

vcard:year
vcard:month
vcard:day

vcard:Time
vcard:Time has three properties:

vcard:hour
vcard:minute
vcard:second


Common VCard properties

The following properties may apply to any of the top level (all-caps) VCard Resources:

vcard:type
vcard:type is used in different ways depending on the resource it is applied to: for resources with binary values, type may indicate the corresponding MIME subtype. For email, phone and address values, type provides information about the information such as whether it is preferred, whether it represents a fax or mobile phone,. etc. See the spec for full details.
vcard:value
vcard:value may be used to indicate the format of the resource data (possible values include 'uri','text','phoneNumber', etc.) See RFC 2425.
vcard:language
See RFC 2425.
vcard:encoding
See RFC 2425.
vcard:X-parameter
Two properties apply to vcard:X-parameter; vcard:xname indicates the parameter's name and vcard:text indicates its value.