draft-ietf-vcarddav-vcardxml-09.txt   draft-ietf-vcarddav-vcardxml-10.txt 
Network Working Group S. Perreault Network Working Group S. Perreault
Internet-Draft Viagenie Internet-Draft Viagenie
Intended status: Standards Track April 9, 2011 Intended status: Standards Track May 20, 2011
Expires: October 11, 2011 Expires: November 21, 2011
vCard XML Representation xCard: vCard XML Representation
draft-ietf-vcarddav-vcardxml-09 draft-ietf-vcarddav-vcardxml-10
Abstract Abstract
This document defines the XML schema of the vCard data format. This document defines the XML schema of the vCard data format.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 11, 2011. This Internet-Draft will expire on November 21, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 18 skipping to change at page 2, line 18
2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. The Schema . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. The Schema . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4. Example: Author's XML vCard . . . . . . . . . . . . . . . . . 3 4. Example: Author's XML vCard . . . . . . . . . . . . . . . . . 3
5. Design Considerations . . . . . . . . . . . . . . . . . . . . 5 5. Design Considerations . . . . . . . . . . . . . . . . . . . . 5
5.1. Extensibility . . . . . . . . . . . . . . . . . . . . . . 6 5.1. Extensibility . . . . . . . . . . . . . . . . . . . . . . 6
5.2. Limitations . . . . . . . . . . . . . . . . . . . . . . . 7 5.2. Limitations . . . . . . . . . . . . . . . . . . . . . . . 7
6. Format Conversions . . . . . . . . . . . . . . . . . . . . . . 8 6. Format Conversions . . . . . . . . . . . . . . . . . . . . . . 8
7. Security Considerations . . . . . . . . . . . . . . . . . . . 10 7. Security Considerations . . . . . . . . . . . . . . . . . . . 10
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
8.1. Registration of the XML Namespace . . . . . . . . . . . . 10 8.1. Registration of the XML Namespace . . . . . . . . . . . . 10
8.2. Media Type . . . . . . . . . . . . . . . . . . . . . . . . 10 8.2. Media Type . . . . . . . . . . . . . . . . . . . . . . . . 11
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 11 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
10.1. Normative References . . . . . . . . . . . . . . . . . . . 11 10.1. Normative References . . . . . . . . . . . . . . . . . . . 12
10.2. Informative References . . . . . . . . . . . . . . . . . . 12 10.2. Informative References . . . . . . . . . . . . . . . . . . 13
Appendix A. Relax NG Schema . . . . . . . . . . . . . . . . . . . 12 Appendix A. Relax NG Schema . . . . . . . . . . . . . . . . . . . 13
Appendix B. Change Log (to be removed by RFC Editor prior to Appendix B. Change Log (to be removed by RFC Editor prior to
publication) . . . . . . . . . . . . . . . . . . . . 18 publication) . . . . . . . . . . . . . . . . . . . . 21
B.1. Changes in -09 . . . . . . . . . . . . . . . . . . . . . . 18 B.1. Changes in -10 . . . . . . . . . . . . . . . . . . . . . . 21
B.2. Changes in -08 . . . . . . . . . . . . . . . . . . . . . . 18 B.2. Changes in -09 . . . . . . . . . . . . . . . . . . . . . . 22
B.3. Changes in -07 . . . . . . . . . . . . . . . . . . . . . . 18 B.3. Changes in -08 . . . . . . . . . . . . . . . . . . . . . . 22
B.4. Changes in -06 . . . . . . . . . . . . . . . . . . . . . . 19 B.4. Changes in -07 . . . . . . . . . . . . . . . . . . . . . . 22
B.5. Changes in -05 . . . . . . . . . . . . . . . . . . . . . . 19 B.5. Changes in -06 . . . . . . . . . . . . . . . . . . . . . . 22
B.6. Changes in -04 . . . . . . . . . . . . . . . . . . . . . . 19 B.6. Changes in -05 . . . . . . . . . . . . . . . . . . . . . . 22
B.7. Changes in -03 . . . . . . . . . . . . . . . . . . . . . . 19 B.7. Changes in -04 . . . . . . . . . . . . . . . . . . . . . . 22
B.8. Changes in -02 . . . . . . . . . . . . . . . . . . . . . . 19 B.8. Changes in -03 . . . . . . . . . . . . . . . . . . . . . . 23
B.9. Changes in -01 . . . . . . . . . . . . . . . . . . . . . . 20 B.9. Changes in -02 . . . . . . . . . . . . . . . . . . . . . . 23
B.10. Changes in -00 . . . . . . . . . . . . . . . . . . . . . . 20 B.10. Changes in -01 . . . . . . . . . . . . . . . . . . . . . . 23
B.11. Changes in -00 . . . . . . . . . . . . . . . . . . . . . . 24
1. Introduction 1. Introduction
vCard [I-D.ietf-vcarddav-vcardrev] is a data format for representing vCard [I-D.ietf-vcarddav-vcardrev] is a data format for representing
and exchanging information about individuals and other entities. It and exchanging information about individuals and other entities. It
is a text-based format (as opposed to a binary format). This is a text-based format (as opposed to a binary format). This
document defines an XML [W3C.REC-xml-20081126] representation for document defines xCard, an XML [W3C.REC-xml-20081126] representation
vCard. The underlying data structure is exactly the same, enabling a for vCard. The underlying data structure is exactly the same,
1-to-1 mapping between the original vCard format and the XML enabling a 1-to-1 mapping between the original vCard format and the
representation. The XML formatting may be preferred in some contexts XML representation. The XML formatting may be preferred in some
where an XML engine is readily available and may be reused instead of contexts where an XML engine is readily available and may be reused
writing a stand-alone vCard parser. instead of writing a stand-alone vCard parser.
Earlier work on an XML format for vCard was started in 1998 by Frank Earlier work on an XML format for vCard was started in 1998 by Frank
Dawson [I-D.dawson-vcard-xml-dtd]. Sadly it did not take over the Dawson [I-D.dawson-vcard-xml-dtd]. Sadly it did not take over the
world. world.
2. Conventions 2. Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
skipping to change at page 3, line 39 skipping to change at page 3, line 39
The schema is expressed in the RELAX NG language The schema is expressed in the RELAX NG language
[relaxng][relaxng-compact] and is found in Appendix A. [relaxng][relaxng-compact] and is found in Appendix A.
4. Example: Author's XML vCard 4. Example: Author's XML vCard
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> <vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
<vcard> <vcard>
<fn><text>Simon Perreault</text></fn> <fn><text>Simon Perreault</text></fn>
<n> <n>
<surname><text>Perreault</text></surname> <surname>Perreault</surname>
<given><text>Simon</text></given> <given>Simon</given>
<additional/> <additional/>
<prefix/> <prefix/>
<suffix> <suffix>ing. jr</suffix>
<text>ing. jr.</text> <suffix>M.Sc.</suffix>
<text>M.Sc.</text>
</suffix>
</n> </n>
<bday><date>--0203</date></bday> <bday><date>--0203</date></bday>
<anniversary> <anniversary>
<date-time>20090808T1430-0500</date-time> <date-time>20090808T1430-0500</date-time>
</anniversary> </anniversary>
<gender><sex><text>M</text></sex></gender> <gender><sex>M</sex></gender>
<lang> <lang>
<parameters><pref>1</pref></parameters> <parameters><pref><integer>1</integer></pref></parameters>
<language-tag>fr</language-tag> <language-tag>fr</language-tag>
</lang> </lang>
<lang> <lang>
<parameters><pref>2</pref></parameters> <parameters><pref><integer>2</integer></pref></parameters>
<language-tag>en</language-tag> <language-tag>en</language-tag>
</lang> </lang>
<org> <org>
<parameters><type><text>work</text></type></parameters> <parameters><type><text>work</text></type></parameters>
<text>Viagenie</text> <text>Viagenie</text>
</org> </org>
<adr> <adr>
<parameters> <parameters>
<type><text>work</text></type> <type><text>work</text></type>
<label>Simon Perreault\n2875 boul. Laurier, suite <label><text>Simon Perreault
D2-630\nQuebec, QC, Canada\nG1V 2M2</label> 2875 boul. Laurier, suite D2-630
Quebec, QC, Canada
G1V 2M2</text></label>
</parameters> </parameters>
<pobox/> <pobox/>
<ext/> <ext/>
<street><text>2875 boul. Laurier, suite D2-630</text></street> <street>2875 boul. Laurier, suite D2-630</street>
<locality><text>Quebec</text></locality> <locality>Quebec</locality>
<region><text>QC</text></region> <region>QC</region>
<code><text>G1V 2M2</text></code> <code>G1V 2M2</code>
<country><text>Canada</text></country> <country>Canada</country>
</adr> </adr>
<tel> <tel>
<parameters> <parameters>
<type> <type>
<text>work</text> <text>work</text>
<text>voice</text> <text>voice</text>
</type> </type>
</parameters> </parameters>
<uri>tel:+1-418-656-9254;ext=102</uri> <uri>tel:+1-418-656-9254;ext=102</uri>
</tel> </tel>
skipping to change at page 5, line 16 skipping to change at page 5, line 16
</email> </email>
<geo> <geo>
<parameters><type><text>work</text></type></parameters> <parameters><type><text>work</text></type></parameters>
<uri>geo:46.766336,-71.28955</uri> <uri>geo:46.766336,-71.28955</uri>
</geo> </geo>
<key> <key>
<parameters><type><text>work</text></type></parameters> <parameters><type><text>work</text></type></parameters>
<uri>http://www.viagenie.ca/simon.perreault/simon.asc</uri> <uri>http://www.viagenie.ca/simon.perreault/simon.asc</uri>
</key> </key>
<tz><text>America/Montreal</text></tz> <tz><text>America/Montreal</text></tz>
<url>
<parameters><type><text>home</text></type></parameters>
<uri>http://nomis80.org</uri>
</url>
</vcard> </vcard>
</vcards> </vcards>
5. Design Considerations 5. Design Considerations
The general idea is to map vCard parameters, properties, and value The general idea is to map vCard parameters, properties, and value
types to XML elements. For example, the "FN" property is mapped to types to XML elements. For example, the "FN" property is mapped to
the "fn" element. That element in turn contains a text element whose the "fn" element. That element in turn contains a text element whose
content corresponds to the vCard property's value. content corresponds to the vCard property's value.
vCard parameters are also mapped to XML elements. They are contained vCard parameters are also mapped to XML elements. They are contained
in the <parameters> element, which is contained in property elements. in the <parameters> element, which is contained in property elements.
For example, the "TYPE" parameter applied to the "TEL" property would For example, the "TYPE" parameter applied to the "TEL" property would
look like the following in XML: look like the following in XML:
<tel> <tel>
<parameters> <parameters>
<type>voice</type> <type>
<type>video</type> <text>voice</text>
<text>video</text>
</type>
</parameters> </parameters>
<uri>tel:+1-555-555-555</uri> <uri>tel:+1-555-555-555</uri>
</tel> </tel>
Parameters taking a list of values are simply repeated multiple Parameters taking a list of values are simply repeated multiple
times, once for each value in the list. times, once for each value in the list.
Properties having structured values (e.g. the "N" property) are Properties having structured values (e.g. the "N" property) are
expressed by XML element trees. Element names in that tree (e.g. expressed by XML element trees. Element names in that tree (e.g.
"surname", "given", etc.) do not have a vCard equivalent since they "surname", "given", etc.) do not have a vCard equivalent since they
skipping to change at page 6, line 45 skipping to change at page 6, line 51
END:VCARD END:VCARD
5.1. Extensibility 5.1. Extensibility
The original vCard format is extensible. New properties, parameters, The original vCard format is extensible. New properties, parameters,
data types and values (collectively known as vCard objects) can be data types and values (collectively known as vCard objects) can be
registered with IANA. It is expected that these vCard extensions registered with IANA. It is expected that these vCard extensions
will also specify extensions to the XML format described in this will also specify extensions to the XML format described in this
document. document.
New XML vCard property and parameter element names MUST be lower-
case. This is necessary to ensure that round-tripping between XML
and plain-text vCard works correctly.
Unregistered extensions (i.e. those starting with "X-" and Unregistered extensions (i.e. those starting with "X-" and
"VND-...-") are expressed in XML by using elements starting with "x-" "VND-...-") are expressed in XML by using elements starting with "x-"
and "vnd-...-". Usage of XML namespaces [W3C.REC-xml-names-20091208] and "vnd-...-". Usage of XML namespaces [W3C.REC-xml-names-20091208]
for extensibility is RECOMMENDED for extensions that have no for extensibility is RECOMMENDED for extensions that have no
equivalent in plain text vCard. Refer to Section 6 for the equivalent in plain text vCard. Refer to Section 6 for the
implications when converting between plain-text vCard and XML. implications when converting between plain-text vCard and XML.
Examples: Examples:
<x-my-prop> <x-my-prop>
<parameters> <parameters>
<pref>1</pref> <pref><integer>1</integer></pref>
</parameters> </parameters>
<text>value goes here</text> <text>value goes here</text>
<x-my-prop> <x-my-prop>
<ext:my-prop <ext:my-prop
ext:xmlns="http://example.com/extensions/my-vcard"> ext:xmlns="http://example.com/extensions/my-vcard">
<parameters> <parameters>
<pref>1</pref> <pref><integer>1</integer></pref>
</parameters> <!-- Core vCard elements --> </parameters> <!-- Core vCard elements -->
<text>value goes here</text> <!-- are still accessible --> <text>value goes here</text> <!-- are still accessible -->
</ext:my-prop> </ext:my-prop>
Note that extension elements do not need the "X- or "VND-" prefix in Note that extension elements do not need the "X- or "VND-" prefix in
XML. The XML namespace mechanism is sufficient. XML. The XML namespace mechanism is sufficient.
A vCard XML parser MUST ignore XML elements and attributes for which A vCard XML parser MUST ignore XML elements and attributes for which
it doesn't recognize the expanded name. The normal behaviour of it doesn't recognize the expanded name. The normal behaviour of
ignoring XML processing instructions whose target is not recognized ignoring XML processing instructions whose target is not recognized
skipping to change at page 8, line 7 skipping to change at page 8, line 16
Some constructs (e.g. value enumerations in type parameters) have Some constructs (e.g. value enumerations in type parameters) have
additional ordering constraints in XML. This is a result of additional ordering constraints in XML. This is a result of
limitations of the schema definition language and the order is limitations of the schema definition language and the order is
arbitrary. The order MUST be respected in XML for the vCard to be arbitrary. The order MUST be respected in XML for the vCard to be
valid. However, reordering as part of conversion to or from plain valid. However, reordering as part of conversion to or from plain
vCard MAY happen. vCard MAY happen.
6. Format Conversions 6. Format Conversions
When converting from XML vCard (this specification) to plain-text When new properties or "X-" proeprties used, a vCard<->xCard
vCard [I-D.ietf-vcarddav-vcardrev], the following rules apply: converter might not recognize them, and know what the appropriate
default value types are, yet they need to be able to preserve the
o Properties in the vCard 4 namespace: values. A similar issue arises for unrecognized property parameters.
As a result, the following rules are applied when dealing with
unrecognized properties and property parameters:
* If the converter knows of a specific plain-text representation o When converting from vCard to xCard:
for this property, it uses it. For example, the <adr> element
corresponds to the "ADR" property, which is encoded using
comma-separated lists separated by semi-colons.
* Otherwise, the property name is taken from the element name, * Any property that does not include a "VALUE" parameter and
property parameters are taken from the <parameters> element, whose default value type is not know MUST be converted using
and the content of the property is taken from the content of the value type XML element <unknown>. The content of that
the value element. If the property element has attributes or element is the unprocessed value text.
contains other XML elements, they are dropped.
* If a standard property's XML element contains XML elements and * Any unrecognized property parameter MUST be converted using the
attributes for which the converter doesn't recognize the value type XML element <unknown>, with its content set to the
expanded name, they are dropped. Therefore, it is RECOMMENDED parameter value text, treated as if it were a text value, or
to limit extensions to the property level to ensure that all list of text values.
data is preserved intact in round-trip conversions.
o Properties in other namespaces are wrapped as-is inside an "XML" * The content of "XML" properties is copied as-is to XML.
property.
o Property value escaping (Section 3.3 of * Property value escaping is undone. For example, "\n" becomes a
[I-D.ietf-vcarddav-vcardrev]) is carried out. For example, a NEWLINE character (ASCII decimal 10).
NEWLINE character (ASCII decimal 10) becomes "\n".
o Double-quoting of parameter values, as well as backslash escaping * Double-quoting of parameter values, as well as backslash
in parameter values, is carried out. For example, escaping in parameter values, is undone. For example,
<param>"foo","bar"</param> becomes PARAM="\"foo\",\"bar\"". PARAM="\"foo\",\"bar\"" becomes <param>"foo","bar"</param>.
When converting from plain-text vCard [I-D.ietf-vcarddav-vcardrev] to o When converting xCard to vCard:
XML vCard (this specification), the following rules apply:
o The content of "XML" properties is copied as-is to XML. * Properties in the vCard 4 namespace:
o Properties for which the converter knows of a specific XML + If the converter knows of a specific plain-text
representation use it. For example, the "ADR" property is representation for this property, it uses it. For example,
represented using the <adr> element and related sub-elements. the <adr> element corresponds to the "ADR" property, which
is encoded using comma-separated lists separated by semi-
colons.
o Other properties are converted to XML in the following way: + Otherwise, the property name is taken from the element name,
property parameters are taken from the <parameters> element,
and the content of the property is taken from the content of
the value element. If the property element has attributes
or contains other XML elements, they are dropped.
* The XML namespace of the property element is set to the vCard 4 + If a standard property's XML element contains XML elements
namespace. and attributes for which the converter doesn't recognize the
expanded name, they are dropped. Therefore, it is
RECOMMENDED to limit extensions to the property level to
ensure that all data is preserved intact in round-trip
conversions.
* The name of the property element is set to the lowercased name * Properties in other namespaces are wrapped as-is inside an
of the property. "XML" property.
* If the property has parameters, they get translated as-is * Any <unknown> property value XML elements are converted
(without lowercasing of parameter names, removal of backslash directly into vCard values. The containing property MUST NOT
escaping, and removal of quoting) into sub-elements of the have a "VALUE" parameter.
<parameters> element
* The property element contains a single <text> element whose * Any <unknown> parameter value XML elements are converted as if
content is copied as-is from the property's value. they were <text> value type XML elements.
o Property value escaping is undone. For example, "\n" becomes a * Property value escaping (Section 3.3 of
NEWLINE character (ASCII decimal 10). [I-D.ietf-vcarddav-vcardrev]) is carried out. For example, a
NEWLINE character (ASCII decimal 10) becomes "\n".
o Double-quoting of parameter values, as well as backslash escaping * Double-quoting of parameter values, as well as backslash
in parameter values, is undone. For example, escaping in parameter values, is carried out. For example,
PARAM="\"foo\",\"bar\"" becomes <param>"foo","bar"</param>. <param>"foo","bar"</param> becomes PARAM="\"foo\",\"bar\"".
For example, these two vCards are equivalent: For example, these two vCards are equivalent:
<?xml version="1.0"?> <?xml version="1.0"?>
<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> <vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
<vcard> <vcard>
<fn><text>J. Doe</text></fn> <fn><text>J. Doe</text></fn>
<n> <n>
<surname><text>Doe</text></surname> <surname>Doe</surname>
<given><text>J.</text></given> <given>J.</given>
<additional/> <additional/>
<prefix/> <prefix/>
<suffix/> <suffix/>
</n> </n>
<x-file> <x-file>
<parameters><type>image/jpeg</type></parameters> <parameters>
<text>alien.jpg</text> <mediatype><text>image/jpeg</text></mediatype>
</parameters>
<unknown>alien.jpg</unknown>
</x-file> </x-file>
<a xmlns="http://www.w3.org/1999/xhtml" <a xmlns="http://www.w3.org/1999/xhtml"
href="http://www.example.com">My web page!</a> href="http://www.example.com">My web page!</a>
</vcard> </vcard>
</vcards> </vcards>
BEGIN:VCARD BEGIN:VCARD
VERSION:4.0 VERSION:4.0
FN:J. Doe FN:J. Doe
N:Doe;J.;; N:Doe;J.;;
X-FILE;TYPE=image/jpeg:alien.jpg X-FILE;MEDIATYPE=image/jpeg:alien.jpg
XML:<a xmlns="http://www.w3.org/1999/xhtml"\n XML:<a xmlns="http://www.w3.org/1999/xhtml"\n
href="http://www.example.com">My web page!</a> href="http://www.example.com">My web page!</a>
END:VCARD END:VCARD
7. Security Considerations 7. Security Considerations
All the security considerations applicable to plain vCard All the security considerations applicable to plain vCard
[I-D.ietf-vcarddav-vcardrev] are applicable to this document as well. [I-D.ietf-vcarddav-vcardrev] are applicable to this document as well.
8. IANA Considerations 8. IANA Considerations
8.1. Registration of the XML Namespace 8.1. Registration of the XML Namespace
skipping to change at page 10, line 44 skipping to change at page 11, line 28
Required parameters: none Required parameters: none
Optional parameters: charset as defined for application/xml in Optional parameters: charset as defined for application/xml in
[RFC3023]; per [RFC3023], use of the charset parameter with the [RFC3023]; per [RFC3023], use of the charset parameter with the
value "utf-8" is "STRONGLY RECOMMENDED" value "utf-8" is "STRONGLY RECOMMENDED"
Encoding considerations: Same as encoding considerations of Encoding considerations: Same as encoding considerations of
application/xml as specified in [RFC3023] application/xml as specified in [RFC3023]
Security considerations: See Section 7. Security considerations: This media type has all of the security
considerations described in [RFC3023], plus those listed in
Section 7.
Interoperability considerations: This media type provides an Interoperability considerations: This media type provides an
alternative syntax to vCard data [I-D.ietf-vcarddav-vcardrev] alternative syntax to vCard data [I-D.ietf-vcarddav-vcardrev]
based on XML. based on XML.
Published specification: This specification. Published specification: This specification.
Applications which use this media type: Applications that currently Applications which use this media type: Applications that currently
make use of the text/vcard media type can use this as an make use of the text/vcard media type can use this as an
alternative. In general, applications that maintain or process alternative. In general, applications that maintain or process
skipping to change at page 11, line 46 skipping to change at page 12, line 32
Alexey Melnikov, Barry Leiba, Bjorn Hoehrmann, Cyrus Daboo, Joe Alexey Melnikov, Barry Leiba, Bjorn Hoehrmann, Cyrus Daboo, Joe
Hildebrand, Joseph Smarr, Marc Blanchet, Mike Douglas, Peter Saint- Hildebrand, Joseph Smarr, Marc Blanchet, Mike Douglas, Peter Saint-
Andre, Robins George, Zahhar Kirillov, Zoltan Ordogh. Andre, Robins George, Zahhar Kirillov, Zoltan Ordogh.
10. References 10. References
10.1. Normative References 10.1. Normative References
[I-D.ietf-vcarddav-vcardrev] Perreault, S., "vCard Format [I-D.ietf-vcarddav-vcardrev] Perreault, S., "vCard Format
Specification", Specification",
draft-ietf-vcarddav-vcardrev-19 (work draft-ietf-vcarddav-vcardrev-20 (work
in progress), April 2011. in progress), May 2011.
[RFC2119] Bradner, S., "Key words for use in RFCs [RFC2119] Bradner, S., "Key words for use in RFCs
to Indicate Requirement Levels", to Indicate Requirement Levels",
BCP 14, RFC 2119, March 1997. BCP 14, RFC 2119, March 1997.
[RFC3023] Murata, M., St. Laurent, S., and D. [RFC3023] Murata, M., St. Laurent, S., and D.
Kohn, "XML Media Types", RFC 3023, Kohn, "XML Media Types", RFC 3023,
January 2001. January 2001.
[W3C.REC-xml-20081126] Yergeau, F., Maler, E., Paoli, J., [W3C.REC-xml-20081126] Yergeau, F., Maler, E., Paoli, J.,
skipping to change at page 12, line 47 skipping to change at page 13, line 32
[RFC4288] Freed, N. and J. Klensin, "Media Type [RFC4288] Freed, N. and J. Klensin, "Media Type
Specifications and Registration Specifications and Registration
Procedures", BCP 13, RFC 4288, Procedures", BCP 13, RFC 4288,
December 2005. December 2005.
Appendix A. Relax NG Schema Appendix A. Relax NG Schema
default namespace = "urn:ietf:params:xml:ns:vcard-4.0" default namespace = "urn:ietf:params:xml:ns:vcard-4.0"
# Value types ### Section 3.3: vCard Format Specification
#
# 3.3
iana-token = xsd:string { pattern = "[a-zA-Z0-9-]+" }
x-name = xsd:string { pattern = "x-[a-zA-Z0-9-]+" }
### Section 4: Value types
#
# 4.1
value-text = element text { text } value-text = element text { text }
value-text-list = value-text+ value-text-list = value-text+
# 4.2
value-uri = element uri { xsd:anyURI } value-uri = element uri { xsd:anyURI }
# 4.3.1
value-date = element date { value-date = element date {
xsd:string { pattern = "\d{8}|\d{4}-\d\d|--\d\d(\d\d)?|---\d\d" } xsd:string { pattern = "\d{8}|\d{4}-\d\d|--\d\d(\d\d)?|---\d\d" }
} }
# 4.3.2
value-time = element time { value-time = element time {
xsd:string { pattern = "(\d\d(\d\d(\d\d)?)?|-\d\d(\d\d?)|--\d\d)" xsd:string { pattern = "(\d\d(\d\d(\d\d)?)?|-\d\d(\d\d?)|--\d\d)"
~ "(Z|[+\-]\d\d(\d\d)?)?" } ~ "(Z|[+\-]\d\d(\d\d)?)?" }
} }
# 4.3.3
value-date-time = element date-time { value-date-time = element date-time {
xsd:string { pattern = "(\d{8}|--\d{4}|---\d\d)T\d\d(\d\d(\d\d)?)?" xsd:string { pattern = "(\d{8}|--\d{4}|---\d\d)T\d\d(\d\d(\d\d)?)?"
~ "(Z|[+\-]\d\d(\d\d)?)?" } ~ "(Z|[+\-]\d\d(\d\d)?)?" }
} }
# 4.3.4
value-date-and-or-time = value-date | value-date-time | value-time value-date-and-or-time = value-date | value-date-time | value-time
# 4.3.5
value-timestamp = element timestamp { value-timestamp = element timestamp {
xsd:string { pattern = "\d{8}T\d{6}(Z|[+\-]\d\d(\d\d)?)?" } xsd:string { pattern = "\d{8}T\d{6}(Z|[+\-]\d\d(\d\d)?)?" }
} }
# 4.4
value-boolean = element boolean { xsd:boolean } value-boolean = element boolean { xsd:boolean }
# 4.5
value-integer = element integer { xsd:integer } value-integer = element integer { xsd:integer }
# 4.6
value-float = element float { xsd:float } value-float = element float { xsd:float }
# 4.7
value-utc-offset = element utc-offset {
xsd:string { pattern = "[+\-]\d\d(\d\d)?" }
}
# 4.8
value-language-tag = element language-tag { value-language-tag = element language-tag {
xsd:string { pattern = "([a-z]{2,3}((-[a-z]{3}){0,3})?|[a-z]{4,8})" xsd:string { pattern = "([a-z]{2,3}((-[a-z]{3}){0,3})?|[a-z]{4,8})"
~ "(-[a-z]{4})?(-([a-z]{2}|\d{3}))?" ~ "(-[a-z]{4})?(-([a-z]{2}|\d{3}))?"
~ "(-([0-9a-z]{5,8}|\d[0-9a-z]{3}))*" ~ "(-([0-9a-z]{5,8}|\d[0-9a-z]{3}))*"
~ "(-[0-9a-wyz](-[0-9a-z]{2,8})+)*" ~ "(-[0-9a-wyz](-[0-9a-z]{2,8})+)*"
~ "(-x(-[0-9a-z]{1,8})+)?|x(-[0-9a-z]{1,8})+|" ~ "(-x(-[0-9a-z]{1,8})+)?|x(-[0-9a-z]{1,8})+|"
~ "[a-z]{1,3}(-[0-9a-z]{2,8}){1,2}" } ~ "[a-z]{1,3}(-[0-9a-z]{2,8}){1,2}" }
} }
# Parameters ### Section 5: Parameters
#
# 5.1
param-language = element language { value-language-tag }? param-language = element language { value-language-tag }?
# 5.2
param-pref = element pref { param-pref = element pref {
element integer { element integer {
xsd:integer { minInclusive = "1" maxInclusive = "100" } xsd:integer { minInclusive = "1" maxInclusive = "100" }
} }
}? }?
# 5.4
param-altid = element altid { value-text }? param-altid = element altid { value-text }?
# 5.5
param-pid = element pid { param-pid = element pid {
element text { xsd:string { pattern = "\d+(\.\d+)?" } }+ element text { xsd:string { pattern = "\d+(\.\d+)?" } }+
}? }?
# 5.6
param-type = element type { element text { "work" | "home" }+ }? param-type = element type { element text { "work" | "home" }+ }?
# 5.7
param-mediatype = element mediatype { value-text }? param-mediatype = element mediatype { value-text }?
# 5.8
param-calscale = element calscale { element text { "gregorian" } }? param-calscale = element calscale { element text { "gregorian" } }?
# 5.9
param-sort-as = element sort-as { value-text+ }? param-sort-as = element sort-as { value-text+ }?
# 5.10
param-geo = element geo { value-uri }? param-geo = element geo { value-uri }?
# 5.11
param-tz = element tz { value-text | value-uri }? param-tz = element tz { value-text | value-uri }?
param-label = element label { value-text }?
# Properties ### Section 6: Properties
#
# 6.1.3
property-source = element source { property-source = element source {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-mediatype }, param-mediatype },
value-uri value-uri
} }
# 6.1.4
property-kind = element kind { property-kind = element kind {
element text { "individual" | "group" | "org" | "location" }* element text { "individual" | "group" | "org" | "location" |
x-name | iana-token }*
} }
# 6.2.1
property-fn = element fn { property-fn = element fn {
element parameters { param-language, param-altid, param-pid, element parameters { param-language, param-altid, param-pid,
param-pref, param-type }?, param-pref, param-type }?,
value-text value-text
} }
# 6.2.2
property-n = element n { property-n = element n {
element parameters { param-language, param-sort-as, param-altid }?, element parameters { param-language, param-sort-as, param-altid }?,
element surname { value-text-list? }, element surname { text }+,
element given { value-text-list? }, element given { text }+,
element additional { value-text-list? }, element additional { text }+,
element prefix { value-text-list? }, element prefix { text }+,
element suffix { value-text-list? } element suffix { text }+
} }
# 6.2.3
property-nickname = element nickname { property-nickname = element nickname {
element parameters { param-language, param-altid, param-pid, element parameters { param-language, param-altid, param-pid,
param-pref, param-type }?, param-pref, param-type }?,
value-text-list value-text-list
} }
# 6.2.4
property-photo = element photo { property-photo = element photo {
element parameters { param-altid, param-pid, param-pref, param-type, element parameters { param-altid, param-pid, param-pref, param-type,
param-mediatype }?, param-mediatype }?,
value-uri value-uri
} }
# 6.2.5
property-bday = element bday { property-bday = element bday {
element parameters { param-altid, param-calscale }?, element parameters { param-altid, param-calscale }?,
(value-date-and-or-time | value-text) (value-date-and-or-time | value-text)
} }
# 6.2.6
property-anniversary = element anniversary { property-anniversary = element anniversary {
element parameters { param-altid, param-calscale }?, element parameters { param-altid, param-calscale }?,
(value-date-and-or-time | value-text) (value-date-and-or-time | value-text)
} }
# 6.2.7
property-gender = element gender { property-gender = element gender {
element sex { element sex { "" | "M" | "F" | "O" | "N" | "U" },
element text { "M" | "F" | "O" | "N" | "U" }? element identity { text }?
},
element identity { value-text-list? }
} }
# 6.3.1
param-label = element label { value-text }?
property-adr = element adr { property-adr = element adr {
element parameters { param-language, param-altid, param-pid, element parameters { param-language, param-altid, param-pid,
param-pref, param-type, param-geo, param-tz, param-pref, param-type, param-geo, param-tz,
param-label }?, param-label }?,
element pobox { value-text-list? }, element pobox { text }+,
element ext { value-text-list? }, element ext { text }+,
element street { value-text-list? }, element street { text }+,
element locality { value-text-list? }, element locality { text }+,
element region { value-text-list? }, element region { text }+,
element code { value-text-list? }, element code { text }+,
element country { value-text-list? } element country { text }+
} }
# 6.4.1
property-tel = element tel { property-tel = element tel {
element parameters { element parameters {
param-altid, param-altid,
param-pid, param-pid,
param-pref, param-pref,
element type { element type {
element text { "work" | "home" | "text" | "voice" element text { "work" | "home" | "text" | "voice"
| "fax" | "cell" | "video" | "pager" | "fax" | "cell" | "video" | "pager"
| "textphone" }+ | "textphone" }+
}?, }?,
param-mediatype param-mediatype
}?, }?,
(value-text | value-uri) (value-text | value-uri)
} }
# 6.4.2
property-email = element email { property-email = element email {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type }?, param-type }?,
value-text value-text
} }
# 6.4.3
property-impp = element impp { property-impp = element impp {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type, param-mediatype }?, param-type, param-mediatype }?,
value-uri value-uri
} }
# 6.4.4
property-lang = element lang { property-lang = element lang {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type }?, param-type }?,
value-language-tag value-language-tag
} }
# 6.5.1
property-tz = element tz { property-tz = element tz {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type, param-mediatype }?, param-type, param-mediatype }?,
(value-text | value-uri) (value-text | value-uri | value-utc-offset)
} }
# 6.5.2
property-geo = element geo { property-geo = element geo {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type, param-mediatype }?, param-type, param-mediatype }?,
value-uri value-uri
} }
# 6.6.1
property-title = element title { property-title = element title {
element parameters { param-language, param-altid, param-pid, element parameters { param-language, param-altid, param-pid,
param-pref, param-type }?, param-pref, param-type }?,
value-text value-text
} }
# 6.6.2
property-role = element role { property-role = element role {
element parameters { param-language, param-altid, param-pid, element parameters { param-language, param-altid, param-pid,
param-pref, param-type }?, param-pref, param-type }?,
value-text value-text
} }
# 6.6.3
property-logo = element logo { property-logo = element logo {
element parameters { param-language, param-altid, param-pid, element parameters { param-language, param-altid, param-pid,
param-pref, param-type, param-mediatype }?, param-pref, param-type, param-mediatype }?,
value-uri value-uri
} }
# 6.6.4
property-org = element org { property-org = element org {
element parameters { param-language, param-altid, param-pid, element parameters { param-language, param-altid, param-pid,
param-pref, param-type, param-sort-as }?, param-pref, param-type, param-sort-as }?,
value-text-list value-text-list
} }
# 6.6.5
property-member = element member { property-member = element member {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-mediatype }?, param-mediatype }?,
value-uri value-uri
} }
# 6.6.6
property-related = element related { property-related = element related {
element parameters { element parameters {
param-altid, param-altid,
param-pid, param-pid,
param-pref, param-pref,
element type { element type {
element text { element text {
"work" | "home" | "contact" | "acquaintance" | "work" | "home" | "contact" | "acquaintance" |
"friend" | "met" | "co-worker" | "colleague" | "co-resident" | "friend" | "met" | "co-worker" | "colleague" | "co-resident" |
"neighbor" | "child" | "parent" | "sibling" | "spouse" | "neighbor" | "child" | "parent" | "sibling" | "spouse" |
"kin" | "muse" | "crush" | "date" | "sweetheart" | "me" "kin" | "muse" | "crush" | "date" | "sweetheart" | "me" |
"agent" | "emergency"
}+ }+
}?, }?,
param-mediatype param-mediatype
}?, }?,
(value-uri | value-text) (value-uri | value-text)
} }
# 6.7.1
property-categories = element categories { property-categories = element categories {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type }?, param-type }?,
value-text-list value-text-list
} }
# 6.7.2
property-note = element note { property-note = element note {
element parameters { param-language, param-altid, param-pid, element parameters { param-language, param-altid, param-pid,
param-pref, param-type }?, param-pref, param-type }?,
value-text value-text
} }
# 6.7.3
property-prodid = element prodid { value-text } property-prodid = element prodid { value-text }
# 6.7.4
property-rev = element rev { value-timestamp } property-rev = element rev { value-timestamp }
# 6.7.5
property-sound = element sound { property-sound = element sound {
element parameters { param-language, param-altid, param-pid, element parameters { param-language, param-altid, param-pid,
param-pref, param-type, param-mediatype }?, param-pref, param-type, param-mediatype }?,
value-uri value-uri
} }
# 6.7.6
property-uid = element uid { value-uri } property-uid = element uid { value-uri }
# 6.7.7
property-clientpidmap = element clientpidmap { property-clientpidmap = element clientpidmap {
element sourceid { xsd:positiveInteger }, element sourceid { xsd:positiveInteger },
value-uri value-uri
} }
# 6.7.8
property-url = element url { property-url = element url {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type, param-mediatype }?, param-type, param-mediatype }?,
value-uri value-uri
} }
# 6.8.1
property-key = element key { property-key = element key {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type, param-mediatype }?, param-type, param-mediatype }?,
(value-uri | value-text) (value-uri | value-text)
} }
# 6.9.1
property-fburl = element fburl { property-fburl = element fburl {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type, param-mediatype }?, param-type, param-mediatype }?,
value-uri value-uri
} }
# 6.9.2
property-caladruri = element caladruri { property-caladruri = element caladruri {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type, param-mediatype }?, param-type, param-mediatype }?,
value-uri value-uri
} }
# 6.9.3
property-caluri = element caluri { property-caluri = element caluri {
element parameters { param-altid, param-pid, param-pref, element parameters { param-altid, param-pid, param-pref,
param-type, param-mediatype }?, param-type, param-mediatype }?,
value-uri value-uri
} }
# Top-level grammar # Top-level grammar
property = property-adr | property-anniversary | property-bday property = property-adr | property-anniversary | property-bday
| property-caladruri | property-caluri | property-categories | property-caladruri | property-caluri | property-categories
| property-clientpidmap | property-email | property-fburl | property-clientpidmap | property-email | property-fburl
skipping to change at page 18, line 20 skipping to change at page 21, line 30
| element group { | element group {
attribute name { text }, attribute name { text },
property* property*
})+ })+
}+ }+
} }
Appendix B. Change Log (to be removed by RFC Editor prior to Appendix B. Change Log (to be removed by RFC Editor prior to
publication) publication)
B.1. Changes in -09 B.1. Changes in -10
o Fixed bugs in examples.
o New XML elements MUST be lower-case.
o Adjusted case conversion rules for unknown parameters.
o Added utc-offset as possible value type to tz property.
o Added "agent" and "emergency" related values.
o Added x-name and iana-token in kind values.
o Added cross-references to vcardrev sections.
o Add <unknown> element for round-tripping.
o Tweak sex grammar.
o "Structured" properties don't need <text> elements.
o Fixed wrong example.
B.2. Changes in -09
o Added "Conventions" section with reference to RFC2119. o Added "Conventions" section with reference to RFC2119.
o Fixed bad XML in example. o Fixed bad XML in example.
o Updated MIME type registration following feedback from o Updated MIME type registration following feedback from
ietf-types@iana.org. ietf-types@iana.org.
B.2. Changes in -08 B.3. Changes in -08
o Synchronized with draft-ietf-vcarddav-vcardrev-17. o Synchronized with draft-ietf-vcarddav-vcardrev-17.
o Added some references. o Added some references.
o Fixed bad XML in example. o Fixed bad XML in example.
o Added <text> element around pid param value. o Added <text> element around pid param value.
B.3. Changes in -07 B.4. Changes in -07
o Synchronized with draft-ietf-vcarddav-vcardrev-16. o Synchronized with draft-ietf-vcarddav-vcardrev-16.
o Fixed bad XML in example. o Fixed bad XML in example.
o Fixed <categories> which now takes a value-text-list. o Fixed <categories> which now takes a value-text-list.
o All parameters now use value elements. This affects type, o All parameters now use value elements. This affects type,
calscale, and pref. calscale, and pref.
B.4. Changes in -06 B.5. Changes in -06
o Synchronized with draft-ietf-vcarddav-vcardrev-15. o Synchronized with draft-ietf-vcarddav-vcardrev-15.
B.5. Changes in -05 B.6. Changes in -05
o Synchronized with draft-ietf-vcarddav-vcardrev-13. o Synchronized with draft-ietf-vcarddav-vcardrev-13.
B.6. Changes in -04 B.7. Changes in -04
o Synchronized with draft-ietf-vcarddav-vcardrev-12. o Synchronized with draft-ietf-vcarddav-vcardrev-12.
o Added application/vcard+xml media type. o Added application/vcard+xml media type.
o Added rules for backslash escaping and quoting when converting. o Added rules for backslash escaping and quoting when converting.
o Added description of <vcards> element. o Added description of <vcards> element.
o Described group construct in XML. o Described group construct in XML.
B.7. Changes in -03 B.8. Changes in -03
o Created "Format Conversions" section. o Created "Format Conversions" section.
o Turned more <type> parameter values into plain text. o Turned more <type> parameter values into plain text.
o Removed need for empty value elements in components. o Removed need for empty value elements in components.
o Wrapped value of <sex>, <class>, and <kind> in value elements. o Wrapped value of <sex>, <class>, and <kind> in value elements.
B.8. Changes in -02 B.9. Changes in -02
o Synchronized with draft-ietf-vcarddav-vcardrev-10. o Synchronized with draft-ietf-vcarddav-vcardrev-10.
o Turned <type> parameter values into plain text. o Turned <type> parameter values into plain text.
o Moved the "XML" property to vCard base. o Moved the "XML" property to vCard base.
o Changed title to avoid confusion with XML Schema. o Changed title to avoid confusion with XML Schema.
o Added prefixes "value-", "param-", and "property-" in schema. o Added prefixes "value-", "param-", and "property-" in schema.
o Better language for specifying what a parser must ignore. o Better language for specifying what a parser must ignore.
B.9. Changes in -01 B.10. Changes in -01
o Synchronized with draft-ietf-vcarddav-vcardrev-09. o Synchronized with draft-ietf-vcarddav-vcardrev-09.
o Added the <vcards> element to allow multiple vCards in a single o Added the <vcards> element to allow multiple vCards in a single
XML file. XML file.
o Created the <parameters> container element. o Created the <parameters> container element.
o Use text value for enumeration in <class> element. o Use text value for enumeration in <class> element.
o Created the "XML" vCard property. o Created the "XML" vCard property.
o Added IANA considerations section. o Added IANA considerations section.
o Added security considerations section. o Added security considerations section.
B.10. Changes in -00 B.11. Changes in -00
o Same as draft-perreault-vcarddav-vcardxml-02. o Same as draft-perreault-vcarddav-vcardxml-02.
Author's Address Author's Address
Simon Perreault Simon Perreault
Viagenie Viagenie
2600 boul. Laurier, suite 625 2600 boul. Laurier, suite 625
Quebec, QC G1V 4W1 Quebec, QC G1V 4W1
Canada Canada
 End of changes. 117 change blocks. 
142 lines changed or deleted 300 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/