vCard XML SchemaViagénie2600 boul. Laurier, suite 625QuébecQCG1V 4W1Canada+1 418 656 9254simon.perreault@viagenie.cahttp://www.viagenie.ca
Applications
vcardThis document defines the XML schema of the vCard data format.vCard is a data
format for representing and exchanging information about individuals.
It is a text-based format (as opposed to a binary format). This
document defines an XML representation for vCard. The underlying data
structure is exactly the same, enabling a 1-to-1 mapping between the
original vCard format and the XML representation. The XML formatting may
be preferred in some contexts where an XML engine is readily available
and may be reused instead of writing a stand-alone vCard parser.The schema is expressed in the RELAX NG language and is found in
.The general idea is to map vCard parameters, properties, and value
types to XML elements. For example, the "FN" property is mapped to the
"fn" element. That element in turn contains a text element whose
content corresponds to the vCard property's value.vCard parameters are also mapped to XML elements. They are contained in
property elements. For example, the "TYPE" parameter applied to the
"TEL" property would look like the following in XML:Properties having structured values (e.g. the N property) are
expressed by XML element trees. Element names in that tree (e.g.
"surname", "given", etc.) do not have a vCard equivalent since they
are identified by position in plain vCard.Line folding is a non-issue in XML. Therefore, the mapping from vCard
to XML is done after the unfolding procedure is carried out.
Conversely, the mapping from XML to vCard is done before the folding
procedure is carried out.The original vCard format is extensible. New properties, parameters,
data types and values (collectively known as vCard objects) can be
registered from IANA. It is expected that these vCard extensions will
also specify extensions to the XML format described in this document.
This is not a requirement: a separate document may be used instead.Unregistered extensions (i.e. those starting with "X-" and
"VND-...-") can be expressed in XML by making use of XML namespaces.
They simply correspond to elements outside of the core namespace. For
example:Note that extension elements do not need the "X- or "VND-" prefix in
XML. The XML namespace mechanism is sufficient.A vCard XML parser MUST ignore elements that are not part of this
specification.In the original vCard format, the VERSION property was mandatory and
played a role in extensibility. In XML, this property is absent. Its
role is played by the vCard core namespace identifier, which includes
the version number. vCard revisions will use a different
namespace.Since vCard also has provisions for extending value enumerations,
such as the allowed TYPE parameter values, these values are expressed
using tags in XML.The schema does not validate the cardinality of properties. This is a
limitation of the schema definition language. Cardinalities of the
origiginal vCard format
MUST still be respected.Some constructs (e.g. value enumerations in type parameters) have
additional ordering constraints in XML. This is a result of
limitations of the schema definition language and the order is
arbitrary. The order MUST be respected in XML for the vCard to be
valid. However, reordering as part of conversion to or from plain
vCard MAY happen.TBDSynchronized with .Completely reworked the schema as a result of WG feedback.Parameters and value types are now elements.Feature parity with plain vCard has been reached.RELAX NG compact syntax is now used.Chose XML namespace from IANA's range.Added section on limitations.