Network Working Group Frank Dawson, Lotus Internet Draft Paul Hoffman, IMC <draft-dawson-vcard-xml-dtd-01.txt> Expires six months after October 15, 1998 The vCard v3.0 XML DTD Status of this Memo This document is an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months. Internet-Drafts may be updated, replaced, or made obsolete by other documents at any time. It is not appropriate to use Internet- Drafts as reference material or to cite them other than as a "working draft" or "work in progress". To view the entire list of current Internet-Drafts, please check the "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net (Northern Europe), ftp.nis.garr.it (Southern Europe), munnari.oz.au (Pacific Rim), ftp.ietf.org (US East Coast), or ftp.isi.edu (US West Coast). Distribution of this document is unlimited. Copyright (C) The Internet Society 1998. All Rights Reserved. Abstract This memo defines a [XML] Document Type Definition (DTD) that corresponds to the vCard, electronic business card format defined by [VCARD]. This DTD provides equivalent functionality to the standard format defined by [VCARD]. Documents structured in accordance with this DTD may also be know as 'XML vCard' documents. The mailing list for discussion of this memo is 'ietf-vcard- xml@imc.org'. Send an email to 'ietf-vcard-xml-request@imc.org' with the message 'SUBSCRIBE' to add your email address to this mailing list. Send an email to 'ietf-vcard-xml-request@imc.org' with the message 'UNSUBSCRIBE' to remove your email address from this mailing list. The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY' and 'OPTIONAL' in this document are to be interpreted as described in [RFC 2119]. 1. Introduction The Extended Markup Language (XML) as defined in [XML] is gaining widespread attention as a "web friendly" syntax for encoding and exchanging documents and data on the Internet. This interest includes requests for and discussion of possible document type definitions Dawson, Hoffman 1 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 (DTD) for IETF standards such at the vCard, electronic business card format defined by [VCARD]. This XML DTD 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 XML encoding for the format defined by [VCARD]. The vCard DTD 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 syntax to better articulate the original intent of the vCard authors. The vCard DTD promotes a number of vCard properties into attributes on the "vCard" element. This has been done to express these properties as "global attributes" for the vCard object, as a whole. For example, the VERSION, REV, PRODID, UID, CLASS properties have been "mapped" into attributes on the vCard object. Binary content in the PHOTO, LOGO, SOUND and KEY properties may either be specified through an external entity reference to the non- XML image or sound content or may be included in the content after first encoding the binary information using the BASE64 encoding of [RFC 2146]. The [VCARD] specification defines a strongly typed object format. This level of data typing is difficult to express in the XML content model since it only supports the parsable character data (i.e., PCDATA") content information. The DTD attempts to convey the vCard's strong data typing with a "value" attribute on each property element. It is the responsibility of the XML application supporting this DTD to make sure that the content information is consistent with the value type declared in the "value" attribute. It is expected that the DTD described in this memo will not normally be included with vCards that are distributed. Instead, this DTD will be externally referenced. This means that such Cards will be well- formed but not valid, as defined in [XML]. 2. vCard XML Document Type Definition The following DTD conforms to XML version 1.0, as specified by [XML]. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE vCard [ <!-- -------------------------------------------- --> <!-- Entity definitions and references --> <!-- -------------------------------------------- --> <!ENTITY % attr.lang " lang CDATA #IMPLIED "> <!-- lang value is a valid RFC 1766 language string --> Dawson, Hoffman 2 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 <!ENTITY % attr.del " del.type NMTOKENS "INTL POSTAL PARCEL WORK" "> <!-- Valid name tokens are "INTL", "DOM", "POSTAL", "PARCEL" "WORK", "HOME" --> <!ENTITY % attr.tel " tel.type NMTOKENS "VOICE" "> <!-- Valid name tokens are "HOME", "WORK", "MSG", "PREF" "VOICE", "FAX", "CELL", "VIDEO", "PAGER", "BBS", "MODEM" "CAR", "ISDN", "PCS" --> <!ENTITY % attr.email " email.type NMTOKENS "INTERNET" "> <!-- Valid name tokens are "INTERNET", "X.400", "PREF" --> <!ENTITY % attr.img " img.type CDATA #REQUIRED "> <!-- img.type value is an IANA registered image type --> <!ENTITY % attr.aud " aud.type CDATA #REQUIRED "> <!-- aud.type value is an IANA registered audio type --> <!-- The mandatory properties in any vCard --> <!ENTITY % prop.man " (fn, n) "> <!-- The optional properties in a vCard --> <!ENTITY % prop.opt " %prop.id; | %prop.del; | %prop.tel; | %prop.geo; | %prop.org; | %prop.exp; | %prop.sec; "> <!-- Identification properties --> <!ENTITY % prop.id " (nickname | photo | bday) "> <!-- Delivery addressing properties --> <!ENTITY % prop.del " (adr | label) "> <!-- Telecommunications addressing properties --> <!ENTITY % prop.tel " (tel | email | mailer) "> Dawson, Hoffman 3 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 <!-- Geographical properties --> <!ENTITY % prop.geo " (tz | geo) "> <!-- Organizational properties --> <!ENTITY % prop.org " (title | role | logo | agent | org) "> <!-- Explanatory propeties --> <!ENTITY % prop.exp " (categories | note | sort | sound | url) "> <!-- Security properties --> <!ENTITY % prop.sec " (key) "> <!-- -------------------------------------------- --> <!-- vCard element and attribute definitions --> <!-- -------------------------------------------- --> <!ELEMENT vCardSet (vCard*)> <!ELEMENT vCard (%prop.man;, (%prop.opt;)*)> <!ATTLIST vCard %attr.lang; version CDATA #REQUIRED rev CDATA #IMPLIED uid CDATA #IMPLIED prodid CDATA #IMPLIED class (PUBLIC | PRIVATE | CONFIDENTIAL) "PUBLIC"> <!-- version - Must be "3.0" if document conforms to this spec --> <!-- rev - ISO 8601 formatted date or date/time string --> <!-- uid - UID associated with the object described by the vCard --> <!-- prodid - ISO 9070 FPI for product that generated vCard --> <!-- class - Security classification for vCard information --> <!-- Identification properties --> <!-- Element and attribute definitions --> <!ELEMENT fn (#PCDATA)> <!ATTLIST fn %attr.lang; value CDATA #FIXED "TEXT"> <!ELEMENT n (family*, given*, other*, prefix*, suffix*)> <!ATTLIST n %attr.lang; value CDATA #FIXED "TEXT"> <!ELEMENT family (#PCDATA)> Dawson, Hoffman 4 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 <!ATTLIST family %attr.lang;> <!ELEMENT given (#PCDATA)> <!ATTLIST given %attr.lang;> <!ELEMENT other (#PCDATA)> <!ATTLIST other %attr.lang;> <!ELEMENT prefix (#PCDATA)> <!ATTLIST prefix %attr.lang;> <!ELEMENT suffix (#PCDATA)> <!ATTLIST suffix %attr.lang;> <!ELEMENT nickname (#PCDATA)> <!ATTLIST nickname %attr.lang;> <!ELEMENT photo (extref | b64bin)> <!ATTLIST photo %attr.img; <!-- extref holds a reference to an external entity that --> <!-- has the photo. b64bin holds the inline BASE64 encoded --> <!-- binary data for the photo as defined in RFC 2045. --> <!ELEMENT extref EMPTY> <!ATTLIST extref uri ENTITY #REQUIRED value #FIXED "URI"> <!ELEMENT b64bin (#PCDATA)> <!ATTLIST b64bin value #FIXED "BINARY"> <!ELEMENT bday (#PCDATA)> <!ATTLIST bday value (DATE | DATETIME)> <!-- bday holds a ISO 8601 formatted date or date/time string --> <!-- value MUST be "DATE" for a date string and "DATETIME" for --> <!-- date/time string. --> <!-- Delivery addressing properties --> <!-- Element and attribute definitions --> <!ELEMENT adr (pobox*, extadd*, street*, locality*, region*, pcode*, country*)> <!ATTLIST adr %attr.del; %attr.lang; Dawson, Hoffman 5 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 value #FIXED "TEXT"> <!ELEMENT pobox (#PCDATA)> <!ELEMENT extadd (#PCDATA)> <!ELEMENT street (#PCDATA)> <!ELEMENT locality (#PCDATA)> <!ELEMENT region (#PCDATA)> <!ELEMENT pcode (#PCDATA)> <!ELEMENT country (#PCDATA)> <!ELEMENT label (#PCDATA | br)*> <!ATTLIST label %attr.del; %attr.lang; value #FIXED "TEXT"> <!ELEMENT br EMPTY> <!-- Signifies a new line in the content information --> <!-- Telecommunications addressing properties --> <!-- Element and attribute definitions --> <!ELEMENT tel (#PCDATA)> <!-- A valid ITU standard telephone numbers string. --> <!ATTLIST tel %attr.tel; value #FIXED "PHONE-NUMBER"> <!ELEMENT email (#PCDATA)> <!ATTLIST email %attr.email; value #FIXED "TEXT"> <!ELEMENT mailer (#PCDATA)> <!ATTLIST mailer value #FIXED "TEXT"> <!-- Geographical properties --> <!-- Element and attribute definitions --> <!ELEMENT tz (#PCDATA)> <!ATTLIST tz value #FIXED "UTC-OFFSET"> <!-- tz holds an ISO 8601 formatted time zone offset. <!ELEMENT geo (lat, lon)> <!ATTLIST geo value #FIXED "FLOAT"> <!ELEMENT lat (#PCDATA)> <!-- A decimal degree float number to 6 decimal places --> <!ELEMENT lon (#PCDATA)> <!-- A decimal degree float number to 6 decimal places --> <!-- Organizational properties --> <!-- Element and attribute definitions --> Dawson, Hoffman 6 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 <!ELEMENT title (#PCDATA)> <!ATTLIST title %attr.lang; value #FIXED "TEXT"> <!ELEMENT role (#PCDATA)> <!ATTLIST role %attr.lang; value #FIXED "TEXT"> <!ELEMENT logo (extref | b64bin)> <!ATTLIST logo %attr.img;> <!-- extref holds a reference to an external entity that --> <!-- has the logo. b64bin holds the inline BASE64 encoded --> <!-- binary data for the logo as defined in RFC 2045. --> <!ELEMENT agent (vCard | extref) <!ATTLIST agent value (VCARD | URI)> <!-- value MUST be "VCARD" for a "vCard" content model and --> <!-- "URI" for a "extref" content model. --> <!ELEMENT org (orgnam, orgunit*)> <!ATTLIST org %attr.lang; value #FIXED "TEXT"> <!ELEMENT orgnam (#PCDATA)> <!ELEMENT orgunit (#PCDATA)> <!-- Explanatory properties --> <!-- Element and attribute definitions --> <!ELEMENT categories (item)*> <!ATTLIST categories %attr.lang; value #FIXED "TEXT"> <!ELEMENT item (#PCDATA)> <!ATTLIST item %attr.lang;> <!ELEMENT note (#PCDATA | br)+> <!ATTLIST note %attr.lang; value #FIXED "TEXT"> <!ELEMENT sort (#PCDATA)> <!ATTLIST sort %attr.lang; Dawson, Hoffman 7 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 value #FIXED "TEXT"> <!ELEMENT sound (extref | b64bin)> <!ATTLIST sound %attr.aud;> <!-- extref holds a reference to an external entity that --> <!-- has the sound. b64bin holds the inline BASE64 encoded --> <!-- binary data for the sound as defined in RFC 2045. --> <!ELEMENT url (#PCDATA)> <!ATTLIST url value "URL"> <!-- url holds a RFC 1738 formatted Uniform Resource Locator --> <!-- Security properties --> <!-- Element and attribute definitions --> <!ELEMENT key (extref | b64bin)> <!-- extref holds a reference to an external entity that --> <!-- has the key or cert. base64-data has the actual data for --> <!-- the key or cert, encoded with Base64 as defined in the --> <!-- MIME spec. --> ]> 3. vCard v3.0 Notation The formal public identifier (FPI) for the DTD described in this specification is "-//IETF//DTD vCard v3.0//EN". A XML document can reference an external non-XML entity containing a vCard v3.0 object, as specified by [VCARD]. The vCard v3.0 object, while encoded in the standard, non-XML format can be referenced in an external entity reference that identifies the [VCARD] format in a notation declaration. The [VCARD] format is identified by the formal public identifier "-//IETF//NONSGML vCard version 3.0//EN", as defined in [FPI]. 4. Example Usage 4.1 Simple vCard The following is a simple example of a XML document using this DTD. <?XML VERSION="1.0" ENCODING="UTF-8"?> <!DOCTYPE vCard PUBLIC "-//IETF//DTD vCard v3.0//EN"> <vCard VERSION="3.0"> <fn>Frank Dawson</fn> <n><family>Dawson</family> <given>Frank</given></n> <tel tel.type="WORK MSG PREF">+1-617-693-8728</tel> Dawson, Hoffman 8 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 <tel tel.type="WORK MSG">+1-919-676-9515</tel> <adr del.type="POSTAL PARCEL WORK"> <street>6544 Battleford Drive</street> <locality>Raleigh</locality> <region>NC</region> <pcode>27613-3502</pcode> <country>US</country></adr> <label del.type="POSTAL PARCEL WORK">6544 Battleford Drive<br/>Raleigh,NC 27613-3502<br/>US</label> <email email.type="INTERNET">Frank_Dawson@Lotus.com</email> </vCard> 4.2 vCard with non-standard extension The following is an example of vCard that also includes a non- standard extension. <?XML VERSION="1.0" ENCODING="UTF-8"?> <!DOCTYPE vCard PUBLIC "-//IETF//DTD vCard v3.0//EN" [ <!ELEMENT vCard (%prop.man;, (%prop.opt; | x-lotus-blood-type)+)> <!ELEMENT x-lotus-blood-type (#PCDATA)> ]> <vCard VERSION="3.0" PRODID="-//HandGen//NONSGML vGen v1.0//EN"> <fn>Frank Dawson</fn> <n> <family>Dawson</family> <given>Frank</given></n> <tel tel.type="WORK MSG">+1-617-693-8728</tel> <x-lotus-blood-type>O+</x-lotus-blood-type> </vCard> 4.3 vCard with photo element The following is an example of a vCard that also includes an external reference to a photo. Similar structure would be used to represent a vCard with an external reference to a logo, sound or public key/certificate. <?XML VERSION="1.0" ENCODING="UTF-8"?> <!DOCTYPE vCard PUBLIC "-//IETF//DTD vCard v3.0//EN" [ <!ENTITY photo1 SYSTEM "http://host.com/pub/photos/frd-photo.jpeg" NDATA jpeg> <!NOTATION jpeg SYSTEM "imgviewer.exe"> ]> <vCard version="3.0" prodid="-//HandGen//NONSGML vGen v1.0//EN"> <fn>Frank Dawson</fn> Dawson, Hoffman 9 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 <n> <family>Dawson</family> <given>Frank</given></n> <tel tel.type="WORK MSG">+1-617-693-8728</tel> <photo img.type=jpeg><extref uri="photo1" /></photo> <email email.type="INTERNET">Frank_Dawson@Lotus.com</email> </vCard> The following is an example of a vCard that includes a photo element as inline binary content. <?XML VERSION="1.0" ENCODING="UTF-8"?> <!DOCTYPE vCard PUBLIC "-//IETF//DTD vCard v3.0//EN"> <vCard version="3.0"> <fn>Frank Dawson</fn> <n><family>Dawson</family><given>Frank</given></n> <photo img.type="jpeg"><b64bin>MIICajCCAdOgAwIBAgICBEUwDQ EEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmlj YXRpb25z...and so on...IENvcnBvc==</b64bin></photo> </vCard> 4.4 vCard with an agent element The following is an example of a vCard that includes an agent element. The content of the agent element is another vCard. <?XML VERSION="1.0" ENCODING="UTF-8"?> <!DOCTYPE vCard PUBLIC "-//IETF//DTD vCard v3.0//EN"> <vCard version="3.0" prodid="-//HandGen//NONSGML vGen v1.0//EN"> <fn>Frank Dawson</fn> <n> <family>Dawson</family> <given>Frank</given></n> <tel tel.type="WORK MSG">+1.617-693.8728</tel> <agent><vCard version="3.0" prodid="-//HandGen//NONSGML vGen v1.0//EN"> <fn>Kathie Collins</fn> <n> <family>Collins</family> <given>Kathie</given></n> <tel tel.type="WORK MSG">+1.617.693-5660</tel> <email email.type="INTERNET">Kathie_Collins@Lotus.com</email> </vCard></agent> <email email.type="INTERNET">Frank_Dawson@Lotus.com</email> </vCard> 4.5 XML document reference to a non-XML vCard The following is an example of a XML document with a proper reference to a non-XML entity containing a vCard object in the format defined by [VCARD]. This example shows how existing vCard objects can be Dawson, Hoffman 10 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 integrated into XML documents using the XML structure defined in this document. <?XML VERSION="1.0" ENCODING="UTF-8"?> <!DOCTYPE loanappl SYSTEM "http://host.finance.com/loanappl.dtd" [ <!ENTITY fdawson SYSTEM "http://fdawson.com/myvcard.vcf" NDATA vCard> <!NOTATION vCard PUBLIC "-//IETF//NONSGML vCard version 3.0//EN"> ]> <loan> <pd vcard=fdawson></pd> <acct name=CFCU id="http://www.cfu.org">01234-56789</acct> <amt need="immediate">$1,000,000</amt> </loan> 5. Acknowledgments The following have participated in the drafting and discussion of this memo: Paul Hoffman 6. Security Considerations Security issues are not currently discussed in this memo. 7. Bibliography [FPI] F. Dawson and P. Hoffman, "vCard v3.0 Formal Public Identifier", Internet Draft, http://www.internic.net/internet- drafts/draft-dawson-vcard-fpi-00.txt, July 1998. [ISO9070] "Information Technology_SGML Support Facilities_ Registration Procedures for Public Text Owner Identifiers", ISO/IEC 9070, Second Edition, International Organization for Standardization, April, 1991. [RFC 2045] N. Freed, N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) - Part One: Format of Internet Message Bodies", RFC 2045, November 1996. [RFC 2119] S. Bradner, "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, ftp://ftp.isi.edu/in-notes/ rfc2119.txt, March 1997. [VCARD] F. Dawson and T. Howes, "vCard MIME Directory Profile", RFC 2426, ftp://ftp.isi.edu/in-notes/rfc2426.txt, September 1998. [XML] "Extensible Markup Language (XML)", Worldwid Web Consortium, http://www.w3.org/TR/PR-xml-971208, December 1997. Dawson, Hoffman 11 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 8. Author's Address The following address information is provided in a vCard v3.0 electronic business card, format. BEGIN:VCARD VERSION:3.0 FN:Frank Dawson N:Dawson;Frank ORG:Lotus Development Corporation ADR;WORK;POSTAL;PARCEL:;;6544 Battleford Drive;Raleigh; NC;27613-3502;US TEL;PREF;WORK;MSG:+1-617-693-8728 TEL;WORK;MSG:+1-919-676-9515 EMAIL;PREF;INTERNET:Frank_Dawson@Lotus.com EMAIL;INTERNET:fdawson@earthlink.net END:VCARD BEGIN:VCARD VERSION:3.0 FN:Paul Hoffman N:Hoffman;Paul ORG:Internet Mail Consortium ADR;WORK;POSTAL;PARCEL:;;127 Segre Place;Santa Cruz; CA;95060;US TEL;PREF;WORK;MSG:+1-408-426-9827 EMAIL;INTERNET:phoffman@imc.org END:VCARD Dawson, Hoffman 12 Expires April 1999 Internet Draft vCard v3.0 XML DTD October 15, 1998 9. Full Copyright Statement "Copyright (C) The Internet Society (1998).All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implmentation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works.However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process MUST be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Dawson, Hoffman 13 Expires April 1999