Contact.xml 1.0 Specification

Contents

What is Contact.xml? 

Contact.xml is a web view of your contact information. This can be used on a personal website and/or in a corporate intranet environment. The main usage scenario would be having this on your personal site. When a portion of your contact information changes (you move, or get a new cell number), you just update your contact file.

Most elements of Contact.xml are optional, since at the heart of this is your contact information. Give out as little or as much as you want.

Contact.xml is a dialect of XML. All Contact.xml files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website.

At the top level, a Contact.xml document is a <contact> element, with a mandatory attribute called version, that specifies the version of Contact.xml that the document conforms to. If it conforms to this specification, the version attribute must be 1.0.

Subordinate to <contact> are elements which contains information about the person.

Required channel elements 

Here's a list of the required channel elements, each with a brief description, an example, and where available, a pointer to a more complete description.

<name> 

Your name, however you wish to present it to the world.

example: <name>John A. Doe</name>

<lastBuildDate> 

The last time the content of the channel changed. Conforms to RFC 822 format.

example: <lastBuildDate>Sat, 07 Sep 2002 09:42:31 GMT</lastBuildDate>

<website>  

The web address relevant to this contact info.

example: <website>http://your.site.com</website>

<description>  

Phrase or sentence describing the channel.

example: <description>This is my contact information, including website and email addresses.</description>

Optional channel elements 

Here's a list of optional channel elements.

<address> 

An address is composed of the following sub-elements, all of which have no attributes and are strings: <street>, <city>, <stateProvince>, <postalCode>, <country>

Address has one required attribute, type, a string value that describes what kind of address this is. You can have any valid string for this, however it should be something like 'home' or 'work'.

example:
<address type="home">
<street>123 Smith St. S.E.</street>
<city>Anytown</city>
<stateProvince>WA</stateProvince>
<postalCode>98123</postalCode>
<country>US</country>
</address>

<email> 

This element has one optional attribute, type, which refers to the kind of email address it is. This is a string value, and is free-form. Again be sure to label it appropriately, so your audience knows what it is.

example:
<email type="home">foobar@foo.bar.com</email>
<email type="work>foobar@foobar-corporate.com</email>

<publicKey> 

This element is used to put your public-key (gpg/pgp) key. It has one required attribute, type, which refers to the kind of public-key it is.

example:
<publicKey type="gpg">
-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.1 (GNU/Linux) mQGiBENsO6IRBACp14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W V8z0TOLb54KP/ycAAwUH/RmxBB64ccWE0gKTghEdizqaQkfAEftheAdf69C4i6YX a8IEs+snUJu10zqITCXnu6hOS07dzdZuMoQmzdCbK79ibut8zWBP+nJHvlo1Rljo +DxCcljwPnmtxbwid+Im9mCddw+lhqEt290vCRAEGt83LFALwDPMH09fzais11xB 37ZLdv14S6PccMdZtKgmtktVSSKeE+yp4ec2hCKkcW6Ng3exD1MHo4uuwGaFaSmX FHqmcS8weDr42Svn44W6MmSHv2DvXUmNQGLsaBrHVEpfamLi/L0z7j4dAwfl17bl 3w6p2ZsgcmvmWATSrJ71q/mCLVrUEY4N9XCZe0NtAzWITAQYEQIADAUCQ2w8qgUJ CbJ4gAAKCRCqWU8t54gKrLeVAJ93vlUvXQ1by4upwGWTtcb4ZRylugCdHwOEfUh+ tGtfUDlOCL6G3Rb/h90= =KY17
-----END PGP PUBLIC KEY BLOCK-----
</publicKey>

<language> 

The language the channel is written in. A list of allowable values defined by the W3C.

example: <language>en-us</language>

<messaging> 

This element has two optional attributes. type, which is a string value representing the actual instant messaging system, and network which can be used for systems such as IRC. The type values are free-form, and can be whatever you need. Just be sure to describe it easily so that your audience can glean what system you are referring to.

example:
<messaging type="irc" network="irc.freenode.net">foobar</messaging>
<messaging type="aim">foobar</messaging>
<messaging type="msn">foobar@hotmail.com</messaging>
<messaging type="yahoo">foobar@yahoo.com</messaging>
<messaging type="icq">123456</messaging>

<notes> 

Any kind of informative message you would like people to know.

example: <notes>I only check email M-F 8a-5p PST</notes>

<phone> 

This element has one optional attribute, type, which refers to the kind of phone number it is. This is a string value, and is free-form. Again be sure to label it appropriately, so your audience knows what it is.

example: <phone type="home">123-555-1212</phone>
<phone type="work>123-555-1111</phone>

<photo> 

This is a url location of a personal image. The idea here is this could be your 32x32 or 64x64 icon you'd use for your instant messaging clients.

example: <photo>http://foo.com/myphoto.jpg</photo>

Comments 

Contact.xml places restrictions on the first non-whitespace characters of the data in the <website> and <photo> elements. The data in these elements must begin with http:// or https://.

Samples  

Here is a full sample for Contact.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>
<contact version="1.0">
    <name>John A. Doe</name>
    <language>en-us</language>
    <lastBuildDate>Tue, 31 Jan 2006 07:01:01 PST</lastBuildDate>
    <website type="personal">http://johndoe.com</website> 
    <photo>http://johndoe.com/me.jpg</photo> 
    <description>This is John's contact information.</description> 
    <address encoding="us" type="home">
        <street>123 AnyStreet N.E. </street>
        <city>Anytown</city> 
        <state>WA</state>
        <zipCode>12345</zipCode>
    </address>
    <phone type="home">111-111-1111</phone>
    <phone type="mobile">222-222-2222</phone>
    <phone type="work">333-333-3333</phone>
    <email type="primary">jdoe@johndoe.com</email>
    <messaging name="aim" nick="jdoeAIM"/>
    <messaging name="icq" nick="12345"/>
    <messaging name="irc" server="irc.freenode.net" nick="jdoe"/>
    <notes>Please use my alternate email address as I check that more often.</notes>
</contact>

Another, containing a more limited set.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<contact version="1.0">
    <name>John A. Doe</name>
    <lastBuildDate>Tue, 31 Jan 2006 07:01:01 PST</lastBuildDate>
    <website type="personal">http://johndoe.com</website> 
    <photo>http://johndoe.com/me.jpg</photo> 
    <description>This is John's contact information.</description> 
    <email type="primary">jdoe@johndoe.com</email>
    <messaging name="aim" nick="jdoeAIM"/>
</contact>

Roadmap 

Contact.xml is by no means a perfect format. Having a settled spec is something Contact.xml needs. The purpose of this work is to help it become a unchanging thing, and to build support around it.

License and authorship 

Contact.xml 1.0 is offered by under the terms of the Attribution/Share Alike Creative Commons license. The author of this document is Cameron Mallory.