    <!-- vCard profile for Evolution, KDE, SyncML -->
    <mimeprofile name="vCard" fieldlist="contacts">

      <profile name="VCARD" nummandatory="0"> <!-- we allow records without "N" as Address book can store them -->
        <property name="VERSION">
          <value conversion="version"/>
        </property>

        <property onlyformode="standard" name="PRODID" mandatory="no">
          <value conversion="prodid"/>
        </property>

        <property name="REV" rule="EXTENDED-DATE-FORMAT" mandatory="yes">
          <value field="REV" conversion="DATE+EXTFMT"/>
        </property>
        <property name="REV" rule="other" mandatory="yes">
          <value field="REV"/>
        </property>

        <property name="UID" rule="HAVE-VCARD-UID" showindevinf="no">
          <value field="UID"/>
        </property>

        <property name="N" values="5" mandatory="yes"> <!-- Note: makes N parse and generate even if not in remote's CTCap -->
          <value index="0" field="N_LAST"/>
          <value index="1" field="N_FIRST"/>
          <value index="2" field="N_MIDDLE"/>
          <value index="3" field="N_PREFIX"/>
          <value index="4" field="N_SUFFIX"/>
        </property>

        <property name="FN">
          <value field="FN"/>
        </property>

        <!-- FILE_AS not supported by KDE natively, let's use X-EVOLUTION-FILE-AS as extension -->
        <property name="X-EVOLUTION-FILE-AS">
          <value field="FILE_AS"/>
        </property>

        <property name="X-GENDER">
          <value field="GENDER"/>
        </property>

        <!-- onlyformode="standard": not part of vCard 2.1, but some
             peers (like the Funambol server) accept it anyway in
             vCard 2.1 -->
        <property name="NICKNAME">
          <value field="NICKNAME"/>
        </property>

        <property name="TITLE">
          <value field="TITLE"/>
        </property>

        <property name="CATEGORIES" values="list" valueseparator="," altvalueseparator=";" > <!-- non-standard, but 1:1 as in vCard 3.0 (NOT like in vCalendar 1.0, where separator is ";") -->
          <value field="CATEGORIES"/>
          <position field="CATEGORIES" repeat="array" increment="1" minshow="0"/>
        </property>

        <!-- ORG property for KDE *and* everyone else; KDE *also* uses X-KADDRESSBOOK-X-Office -->
        <property name="ORG" values="4">
          <value index="0" field="ORG_NAME"/>
          <value index="1" field="ORG_DIVISION"/>
          <value index="2" field="ORG_OFFICE"/>
          <value index="3" field="ORG_TEAM"/>
        </property>
        <property name="X-KADDRESSBOOK-X-Office" suppressempty="yes" rule="KDE">
          <value field="ORG_OFFICE"/>
        </property>

        <!-- X-KADDRESSBOOK-X-Profession property for KDE, ROLE for everyone else -->
        <property name="ROLE" rule="KDE"/>
        <property name="ROLE" rule="other">
          <value field="ROLE"/>
        </property>
        <property name="X-KADDRESSBOOK-X-Profession" suppressempty="yes" show="no" rule="KDE">
          <value field="ROLE"/>
        </property>

        <property name="TEL" groupfield="GROUP_TAG">
          <value field="TEL"/>
          <position field="TEL" repeat="array" increment="1" minshow="1"/>
          <parameter name="TYPE" default="yes" positional="no" show="yes">
            <value field="TEL_FLAGS" conversion="multimix" combine=",">
              <enum name="HOME"     value="B0"/>
              <enum name="WORK"     value="B1"/>
              <enum mode="ignore"   value="B2"/> <!-- OTHER -->
              <enum name="VOICE"    value="B3"/>
              <enum name="CELL"     value="B4"/>
              <enum name="FAX"      value="B5"/>
              <enum name="PAGER"    value="B6"/>
              <enum name="PREF"     value="B7"/>
              <enum name="CAR"      value="B8"/>
              <enum name="X-EVOLUTION-CALLBACK" value="B9"/>
              <enum name="X-EVOLUTION-RADIO" value="B10"/>
              <enum name="X-EVOLUTION-TELEX" value="B11"/>
              <enum name="X-EVOLUTION-TTYTDD" value="B12"/>
            </value>
          </parameter>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="TEL_SLOT"/>
          </parameter>
          <parameter name="X-ABLabel" rule="HAVE-ABLABEL-PARAMETER" sharedfield="yes">
            <value field="LABEL"/>
          </parameter>
        </property>

        <property name="EMAIL" groupfield="GROUP_TAG">
          <value field="EMAIL"/>
          <position field="EMAIL" repeat="array" increment="1" minshow="1"/>
          <parameter name="TYPE" default="yes" positional="no" show="yes">
            <value field="EMAIL_FLAGS" conversion="multimix" combine=",">
              <enum name="HOME"     value="B0"/>
              <enum name="WORK"     value="B1"/>
              <enum mode="ignore"   value="B2"/> <!-- OTHER -->
              <enum name="INTERNET" value="B3"/>
            </value>
          </parameter>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="EMAIL_SLOT"/>
          </parameter>
          <parameter name="X-ABLabel" rule="HAVE-ABLABEL-PARAMETER" sharedfield="yes">
            <value field="LABEL"/>
          </parameter>
        </property>

        <property name="URL" groupfield="GROUP_TAG">
          <value field="WEB"/>
          <position field="WEB" repeat="array" increment="1" minshow="1"/>
          <parameter name="TYPE" default="yes" positional="no" show="yes">
            <value field="WEB_FLAGS" conversion="multimix" combine=",">
              <enum name="HOME"     value="B0"/>
              <enum name="WORK"     value="B1"/>
              <enum mode="ignore"   value="B2"/> <!-- OTHER -->
              <enum name="PREF"     value="B3"/>
            </value>
          </parameter>
          <parameter name="X-ABLabel" rule="HAVE-ABLABEL-PARAMETER" sharedfield="yes">
            <value field="LABEL"/>
          </parameter>
        </property>

        <property name="CALURI" suppressempty="yes">
          <value field="CALURI"/>
        </property>
        <property name="FBURL" suppressempty="yes">
          <value field="FBURL"/>
        </property>

        <!-- X-EVOLUTION-BLOG-URL property for everyone except KDE -->
        <property name="X-EVOLUTION-BLOG-URL" suppressempty="yes" rule="KDE"/>
        <property name="X-EVOLUTION-BLOG-URL" suppressempty="yes" rule="other">
          <value field="BLOGURL"/>
        </property>
        <!-- the KDE way of expressing BLOGURL -->
        <property name="X-KADDRESSBOOK-BlogFeed" suppressempty="yes" show="no" rule="KDE">
          <value field="BLOGURL"/>
        </property>

        <!-- VIDEOURL not supported by KDE natively, let's use X-EVOLUTION-VIDEO-URL as extension -->
        <property name="X-EVOLUTION-VIDEO-URL" suppressempty="yes" rule="other">
          <value field="VIDEOURL"/>
        </property>

        <!-- item for SyncML server: EVOLUTION rule not active,
             both X-EVOLUTION-MANAGER and X-MANAGER are sent.

             item from SyncML server: EVOLUTION rule not active,
             both X-EVOLUTION-MANAGER and X-MANAGER are checked,
             but X-EVOLUTION-MANAGER later so that it overwrites
             a value set earlier by X-MANAGER (if any). This is
             a more or less arbitrary priority, chosen because
             servers that know about SyncEvolution (ScheduleWorld,
             Memotoo) use the X-EVOLUTION variant.

             item to/from Evolution: EVOLUTION rule is active,
             only X-EVOLUTION-MANAGER is used.

             item to/from KDE: the X-EVOLUTION extensions are disabled,
             only exchanged via KDE-only extensions
        -->
        <property name="X-EVOLUTION-MANAGER" suppressempty="yes" delayedparsing="1" rule="KDE"/> <!-- disable X-EVOLUTION-MANAGER for KDE -->
        <property name="X-EVOLUTION-MANAGER" suppressempty="yes" delayedparsing="1" rule="other">
          <value field="MANAGER"/>
        </property>
        <property name="X-MANAGER" suppressempty="yes" rule="EVOLUTION"/> <!-- disables the X-MANAGER for EVOLUTION -->
        <property name="X-MANAGER" suppressempty="yes" rule="KDE"/> <!-- disables the X-MANAGER for KDE -->
        <property name="X-MANAGER" suppressempty="yes" rule="other">
          <value field="MANAGER"/>
        </property>
        <property name="X-KADDRESSBOOK-X-ManagersName" suppressempty="yes" show="no" rule="KDE">
          <value field="MANAGER"/>
        </property>

        <property name="X-EVOLUTION-ASSISTANT" suppressempty="yes" delayedparsing="1" rule="KDE"/>
        <property name="X-EVOLUTION-ASSISTANT" suppressempty="yes" delayedparsing="1" rule="other">
          <value field="ASSISTANT"/>
        </property>
        <property name="X-ASSISTANT" suppressempty="yes" rule="EVOLUTION"/>
        <property name="X-ASSISTANT" suppressempty="yes" rule="KDE"/>
        <property name="X-ASSISTANT" suppressempty="yes" rule="other">
          <value field="ASSISTANT"/>
        </property>
        <property name="X-KADDRESSBOOK-X-AssistantsName" suppressempty="yes" show="no" rule="KDE">
          <value field="ASSISTANT"/>
        </property>

        <property name="X-ABRELATEDNAMES" suppressempty="yes" groupfield="GROUP_TAG">
          <value field="RELATEDNAMES"/>
          <position field="RELATEDNAMES" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-ABLabel" rule="HAVE-ABLABEL-PARAMETER" sharedfield="yes">
            <value field="LABEL"/>
          </parameter>
        </property>

        <property name="X-EVOLUTION-SPOUSE" suppressempty="yes" delayedparsing="1" rule ="KDE"/>
        <property name="X-EVOLUTION-SPOUSE" suppressempty="yes" delayedparsing="1" rule ="other">
          <value field="SPOUSE" show="yes"/>
        </property>
        <property name="X-SPOUSE" suppressempty="yes" rule="EVOLUTION"/>
        <property name="X-SPOUSE" suppressempty="yes" rule="KDE"/>
        <property name="X-SPOUSE" suppressempty="yes" rule="other">
          <value field="SPOUSE"/>
        </property>
        <property name="X-KADDRESSBOOK-X-SpousesName" suppressempty="yes" show="no" rule="KDE">
          <value field="SPOUSE"/>
        </property>

        <property name="X-EVOLUTION-ANNIVERSARY" suppressempty="yes" delayedparsing="1" rule="KDE"/>
        <property name="X-EVOLUTION-ANNIVERSARY" suppressempty="yes" delayedparsing="1" rule="other">
          <value field="ANNIVERSARY"/>
        </property>
        <property name="X-ANNIVERSARY" suppressempty="yes" rule="EVOLUTION"/>
        <property name="X-ANNIVERSARY" suppressempty="yes" rule="KDE"/>
        <property name="X-ANNIVERSARY" suppressempty="yes" rule="other">
          <value field="ANNIVERSARY"/>
        </property>
        <property name="X-KADDRESSBOOK-X-Anniversary" suppressempty="yes" show="no" rule="KDE">
          <value field="ANNIVERSARY"/>
        </property>

        <property name="X-ABDATE" suppressempty="yes" groupfield="GROUP_TAG">
          <value field="XDATE" conversion="DATE+EXTFMT"/>
          <position field="XDATE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-ABLabel" rule="HAVE-ABLABEL-PARAMETER" sharedfield="yes">
            <value field="LABEL"/>
          </parameter>
        </property>

        <property name="IMPP" suppressempty="yes" groupfield="GROUP_TAG">
          <value field="IMPP"/>
          <position field="IMPP" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT-IN-IMPP">
            <value field="IMPP_SLOT"/>
          </parameter>
          <parameter name="X-SERVICE-TYPE" positional="no" show="no">
            <value field="IMPP_SERVICE"/>
          </parameter>
          <parameter name="X-ABLabel" rule="HAVE-ABLABEL-PARAMETER" sharedfield="yes">
            <value field="LABEL"/>
          </parameter>
        </property>

        <property name="X-AIM" suppressempty="yes" rule="KDE"/>
        <property name="X-AIM" suppressempty="yes" rule="other">
          <value field="AIM_HANDLE"/>
          <position field="AIM_HANDLE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="AIM_SLOT"/>
          </parameter>
        </property>
        <property name="X-messaging/aim-All" suppressempty="yes" show="no" rule="KDE">
          <value field="AIM_HANDLE"/>
          <position field="AIM_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>

        <property name="X-GADUGADU" suppressempty="yes" rule="KDE"/>
        <property name="X-GADUGADU" suppressempty="yes" rule="other">
          <value field="GADUGADU_HANDLE"/>
          <position field="GADUGADU_HANDLE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="GADUGADU_SLOT"/>
          </parameter>
        </property>
        <property name="X-messaging/gadu-All" suppressempty="yes" show="no" rule="KDE">
          <value field="GADUGADU_HANDLE"/>
          <position field="GADUGADU_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>


        <property name="X-GROUPWISE" suppressempty="yes" rule="KDE"/>
        <property name="X-GROUPWISE" suppressempty="yes" rule="other">
          <value field="GROUPWISE_HANDLE"/>
          <position field="GROUPWISE_HANDLE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="GROUPWISE_SLOT"/>
          </parameter>
        </property>
        <property name="X-messaging/groupwise-All" suppressempty="yes" show="no" rule="KDE">
          <value field="GROUPWISE_HANDLE"/>
          <position field="GROUPWISE_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>

        <property name="X-ICQ" suppressempty="yes" rule="KDE"/>
        <property name="X-ICQ" suppressempty="yes" rule="other">
          <value field="ICQ_HANDLE"/>
          <position field="ICQ_HANDLE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="ICQ_SLOT"/>
          </parameter>
        </property>
        <property name="X-messaging/icq-All" suppressempty="yes" show="no" rule="KDE">
          <value field="ICQ_HANDLE"/>
          <position field="ICQ_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>

        <property name="X-JABBER" suppressempty="yes" rule="KDE"/>
        <property name="X-JABBER" suppressempty="yes" rule="other">
          <value field="JABBER_HANDLE"/>
          <position field="JABBER_HANDLE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no">
            <value field="JABBER_SLOT"/>
          </parameter>
        </property>
        <property name="X-messaging/xmpp-All" suppressempty="yes" show="no" rule="KDE">
          <value field="JABBER_HANDLE"/>
          <position field="JABBER_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>

        <property name="X-MSN" suppressempty="yes" rule="KDE"/>
        <property name="X-MSN" suppressempty="yes" rule="other">
          <value field="MSN_HANDLE"/>
          <position field="MSN_HANDLE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="MSN_SLOT"/>
          </parameter>
        </property>
        <property name="X-messaging/msn-All" suppressempty="yes" show="no" rule="KDE">
          <value field="MSN_HANDLE"/>
          <position field="MSN_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>

        <property name="X-YAHOO" suppressempty="yes" rule="KDE"/>
        <property name="X-YAHOO" suppressempty="yes" rule="other">
          <value field="YAHOO_HANDLE"/>
          <position field="YAHOO_HANDLE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="YAHOO_SLOT"/>
          </parameter>
        </property>
        <property name="X-messaging/yahoo-All" suppressempty="yes" show="no" rule="KDE">
          <value field="YAHOO_HANDLE"/>
          <position field="YAHOO_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>

        <property name="X-SKYPE" suppressempty="yes" rule="KDE"/>
        <property name="X-SKYPE" suppressempty="yes" rule="other"> 
          <value field="SKYPE_HANDLE"/>
          <position field="SKYPE_HANDLE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="SKYPE_SLOT"/>
          </parameter>
        </property>
        <property name="X-messaging/skype-All" suppressempty="yes" show="no" rule="KDE">
          <value field="SKYPE_HANDLE"/>
          <position field="SKYPE_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>

        <!-- No X-messaging/sip-All in KDE?! Then let's use X-SIP for everyone. -->
        <property name="X-SIP" suppressempty="yes">
          <value field="SIP_HANDLE"/>
          <position field="SIP_HANDLE" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-EVOLUTION-UI-SLOT" positional="no" show="no" rule="HAVE-EVOLUTION-UI-SLOT">
            <value field="SIP_SLOT"/>
          </parameter>
        </property>

        <!--
            KDE way of expressing certain extensions that have no
            other representations externally. Let's use the same
            representation as in KDE for everyone else.
        -->
        <property name="X-messaging/irc-All" suppressempty="yes">
          <value field="IRC_HANDLE"/>
          <position field="IRC_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>
        <property name="X-messaging/meanwhile-All" suppressempty="yes">
          <value field="MEANWHILE_HANDLE"/>
          <position field="MEANWHILE_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>
        <property name="X-messaging/sms-All" suppressempty="yes">
          <value field="SMS_HANDLE"/>
          <position field="SMS_HANDLE" repeat="array" increment="1" minshow="0"/>
        </property>
        <property name="X-KADDRESSBOOK-CRYPTOENCRYPTPREF" suppressempty="yes">
          <value field="CRYPTOENCRYPTPREF"/>
        </property>
        <property name="X-KADDRESSBOOK-CRYPTOPROTOPREF" suppressempty="yes">
          <value field="CRYPTOPROTOPREF"/>
        </property>
        <property name="X-KADDRESSBOOK-CRYPTOSIGNPREF" suppressempty="yes">
          <value field="CRYPTOSIGNPREF"/>
        </property>
        <property name="X-KADDRESSBOOK-OPENPGPFP" suppressempty="yes">
          <value field="OPENPGPFP"/>
        </property>
        <property name="X-KADDRESSBOOK-X-IMAddress" suppressempty="yes">
          <value field="IM_ADDRESS"/>
        </property>

        <property name="X-MOZILLA-HTML">
          <value field="WANTS_HTML"/>
        </property>

        <property name="ADR" values="7" groupfield="GROUP_TAG">
          <value index="0" field="ADR_POBOX"/>
          <value index="1" field="ADR_ADDTL"/>
          <value index="2" field="ADR_STREET"/>
          <value index="3" field="ADR_CITY"/>
          <value index="4" field="ADR_REG"/>
          <value index="5" field="ADR_ZIP"/>
          <value index="6" field="ADR_COUNTRY"/>
          <position field="ADR_POBOX" repeat="array" increment="1" minshow="1"/>
          <parameter name="TYPE" default="yes" positional="no" show="yes">
            <value field="ADR_STREET_FLAGS" conversion="multimix" combine=",">
              <enum name="HOME"     value="B0"/>
              <enum name="WORK"     value="B1"/>
              <enum mode="ignore"   value="B2"/> <!-- OTHER -->
            </value>
          </parameter>
          <parameter name="X-ABLabel" rule="HAVE-ABLABEL-PARAMETER" sharedfield="yes">
            <value field="LABEL"/>
          </parameter>
        </property>

        <property name="BDAY" rule="EXTENDED-DATE-FORMAT">
          <value field="BDAY" conversion="DATE+EXTFMT"/>
        </property>
        <property name="BDAY" rule="other">
          <value field="BDAY"/>
        </property>

        <property name="NOTE" filter="no">
          <value field="NOTE"/>
        </property>

        <property name="PHOTO" filter="no">
          <value field="PHOTO" conversion="BLOB_AUTO"/>
          <parameter name="TYPE" default="no" show="yes">
            <value field="PHOTO_TYPE"/>
          </parameter>
          <parameter name="VALUE" default="no" show="yes">
            <value field="PHOTO_VALUE"/>
          </parameter>
        </property>

        <property name="GEO" values="2">
          <value index="0" field="GEO_LAT"/>
          <value index="1" field="GEO_LONG"/>
        </property>

        <!-- Label assigned to any of the repeating properties. -->
        <property name="X-ABLabel" suppressempty="yes" groupfield="GROUP_TAG" rule="HAVE-ABLABEL-PROPERTY">
          <value field="LABEL" repeat="array" increment="1" minshow="0"/>
          <position field="LABEL" repeat="array" increment="1" minshow="1"/>
        </property>

        <property name="X-*" suppressempty="yes" show="false">
          <value field="XPROPS"/>
          <position field="XPROPS" repeat="array" increment="1" minshow="0"/>
        </property>

      </profile>
    </mimeprofile>
