One document matched: draft-perreault-vcarddav-vcardxml-02.xml


<?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc rfcedstyle="yes" ?>
<?rfc rfcprocack="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?><!-- default = 3 -->
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<?rfc strict="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>

<rfc ipr="trust200902" docName="draft-perreault-vcarddav-vcardxml-02" category="std"
  obsoletes="2425, 2426, 4770" updates="2739">

  <front>
    <title abbrev="vCard XML">vCard XML Schema</title>
    <author initials="S." surname="Perreault" fullname="Simon Perreault">
      <organization>Viagénie</organization>
      <address>
      <postal>
        <street>2600 boul. Laurier, suite 625</street>
        <city>Québec</city>
        <region>QC</region>
        <code>G1V 4W1</code>
        <country>Canada</country>
      </postal>
      <phone>+1 418 656 9254</phone>
      <email>simon.perreault@viagenie.ca</email>
      <uri>http://www.viagenie.ca</uri>
    </address>
    </author>
    <date year="2009"/>
    <area>Applications</area>
    <keyword>vcard</keyword>
    <abstract>
      <t>This document defines the XML schema of the vCard data format.</t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction">
      <t>vCard <xref target="I-D.ietf-vcarddav-vcardrev"/> 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.</t>
    </section>
    
    <section title="The Schema">
      <t>The schema is expressed in the RELAX NG language <xref
          target="relaxng"/><xref target="relaxng-compact"/> and is found in
        <xref target="schema"/>.</t>
    </section>
    
    <section title="Example: Author's XML vCard">
      <figure>
        <artwork>
<![CDATA[%%simon.xml%%]]>
        </artwork>
      </figure>
    </section>
    
    <section title="Design Considerations">
      <t>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.</t>
      <t>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:</t>
      <figure>
        <artwork><![CDATA[
  <tel>
    <type><voice/></type>
    <uri>tel:+1-555-555-555</uri>
  </tel>
        ]]></artwork>
      </figure>
      <t>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.</t>
      <t>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.</t>
      <section title="Extensibility">
        <t>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.</t>
        <t>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:</t>
        <figure>
          <artwork><![CDATA[
  <ext:my-prop
      ext:xmlns="http://example.com/extensions/my-vcard">
    <pref>1</pref>                <!-- Core vCard elements  -->
    <text>value goes here</text>  <!-- are still accessible -->
  </ext:my-prop>
          ]]></artwork>
        </figure>
        <t>Note that extension elements do not need the "X- or "VND-" prefix in
          XML. The XML namespace mechanism is sufficient.</t>
        <t>A vCard XML parser MUST ignore elements that are not part of this
          specification.</t>
        <t>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.</t>
        <t>Since vCard also has provisions for extending value enumerations,
          such as the allowed TYPE parameter values, these values are expressed
          using tags in XML.</t>
      </section>
      <section title="Limitations">
        <t>The schema does not validate the cardinality of properties. This is a
          limitation of the schema definition language. Cardinalities of the
          origiginal vCard format <xref target="I-D.ietf-vcarddav-vcardrev"/>
          MUST still be respected.</t>
        <t>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.</t>
      </section>
    </section>
    
    <section title="Security Considerations">
      <t>TBD</t>
    </section>

  </middle>
  
  <back>
    
    <references title="Normative References">
      <?rfc include="reference.I-D.draft-ietf-vcarddav-vcardrev-08"?>
      <?rfc include="reference.relaxng"?>
      <?rfc include="reference.relaxng-compact"?>
    </references>
    
    <section title="Relax NG Schema" anchor="schema">
      <figure>
        <artwork>
<![CDATA[%%vcard.rnc%%]]>
        </artwork>
      </figure>
    </section>

    <section
      title="Change Log (to be removed by RFC Editor prior to publication)"
      anchor="changelog">
      <section title="Changes in -02">
        <t>
          <list style="symbols">
            <t>Synchronized with <xref
                target="I-D.ietf-vcarddav-vcardrev"/>.</t>
          </list>
        </t>
      </section>
      <section title="Changes in -01">
        <t>
          <list style="symbols">
            <t>Completely reworked the schema as a result of WG feedback.</t>
            <t>Parameters and value types are now elements.</t>
            <t>Feature parity with plain vCard has been reached.</t>
            <t>RELAX NG compact syntax is now used.</t>
            <t>Chose XML namespace from IANA's range.</t>
            <t>Added section on limitations.</t>
          </list>
        </t>
      </section>
    </section>
    
  </back>

</rfc>

PAFTECH AB 2003-20262026-04-24 04:10:53