By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
XML Developer Tip
(Receive this column in your inbox,
click Edit your Profile to subscribe.)
VCards and contact information in XML
The latest XML.com newsletter includes a winner of a story in its coverage: John Simpson's answer to a reader inquiry about encoding contact information in XML. Entitled "Getting in Touch with XML Contacts," it provides some useful information and makes some nice points about what working with XML should be like; I'll tackle these two observations in order.
The reader who writes Simpson indicates he's interested in building an "address book kind of application" using XML, and asks about a standard DTD (document type definition). Though it's clear that the availability of some kind of document description is needed, it doesn't necessarily have to be a DTD—an XML or Relax NG Schema will do the trick just as well (and in fact does so in one of Simpson's examples).
Simpson goes on to describe three specific attempts to codify this information in XML:
- The Jabber project (an Open Source instant messaging protocol) has an XML version of vCard.
- A version of vCard in the form of an XML/RDF note to the W3C.
- One of possibly many commercial implementations in an application called GoldMine from FrontRange Solutions, who also offered Simpson access to their commercial vCard schema.
All of these applications are interesting and potentially useful, yet all differ somewhat from one another (and all apparently omit some of vCard's capabilities, such as the comments/additional data field that accommodates both text and binary data).
Simpson's conclusion to his piece is a great reminder of the real power of XML. There's nothing to stop other implementers from building DTDs or Schemas that capture ALL known forms of data in existing implementations—and indeed, to add other forms of data from standards documents that aren't covered in any of them. He also recommends some strategies whereby XSLT could be used to map a more comprehensive document description to specific implementations mentioned. All I can do to extend my appreciation for his work is to note that the inherently extensible nature of XML means that such a document description could be extended as needed should new kinds of information (instant messaging account names, to give just one example) need to be captured as new data items within such records.
Ed Tittel is a VP of Content Development & Delivery at CapStar LLC, an e-learning company based in Princeton, NJ. Ed runs a small team of content developers and project managers in Austin, TX, and writes regularly on XML and related vocabularies and applications. E-mail Ed at email@example.com.