On Wed, 2014-04-16 at 17:34 +0200, Lukas Zeller wrote:
> Hello Patrick,
> 
> On 11.04.2014, at 12:18, Patrick Ohly <patrick.o...@intel.com> wrote:
> 
> > Google CardDAV and iOS/OS X use group tags to represent custom labels in
> > vCards. Attached is an example. Note that the Google vCard format used
> > by CardDAV is not the same as the one used by Gmail's export feature.
> > The example is from CardDAV.
> > 
> > I am trying to understand how I can support that using libsynthesis.
> > 
> > The doc mentions:
> > 
> > "groupfield"
> > [...]
> > Is there an example using this feature?
> 
> I implemented that feature back at Synthesis in 2010 for Beat's
> Android client, and what is shown in the docs (the TITLE/ORG case) is
> in fact taken from that client's config.
> 
> > Is the following field list and profile correct?
> > 
> > Field list:
> > 
> >      <field name="TITLE" array="yes" type="string"/>
> >      <field name="ORG_NAME" array="yes" type="string"/>
> >      <field name="ORG_DIVISION" array="yes" type="string"/>
> >      <field name="ORG_OFFICE" tarray="yes" ype="string"/>
> >      <field name="ORG_TEAM" array="yes" type="string"/>
> >      <field name="ROLE" array="yes"  type="string"/>
> >      <field name="GROUP-TAG-TITLE-ORG" array="yes" type="string"/>
> > 
> > Profile:
> > 
> >        <property name="TITLE" grouptag="GROUP-TAG-TITLE-ORG">
> >          <value field="TITLE"/>
> >        </property>
> >        <property name="ORG" values="4" grouptag="GROUP-TAG-TITLE-ORG">
> >          <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>
> > 
> > 
> > My understanding is that parsing the example from the documentation will 
> > lead to:
> > ORG = [ "myOwnCompany", "myEmployer" ]
> > TITLE = [ "boss", "employee" ]
> > GROUP-TAG-TITLE-ORG = [ "A", "B" ]
> 
> Yes, that's excactly what is supposed to happen.

Unfortunately I am not getting the group-tag field populated. I'm
attaching my field list and profile.

When parsing, I get:

[2014-04-28 19:31:37.575] Parsing: 
  * [2014-04-28 19:31:37.575] 
BEGIN:VCARD
VERSION:3.0
N:Doe;John;1;Mr.;Sr.
FN:Mr. John 1 Doe Sr.
NICKNAME:Johnny
TITLE:tester
ORG:at company
REV:2014-04-28T17:31:23Z
UID:6a5bd79f8b1cdd58
BDAY;VALUE=DATE:1970-12-30
ADR;TYPE=HOME:PO;neighborhood;home address\n;City;State;ZIP;Country
ADR;TYPE=WORK:;;work address;;;;
ADR;TYPE=OTHER:;;custom address;;;;
TEL;TYPE=WORK:business 1
TEL;TYPE=CELL:mobile
TEL;TYPE=HOME:home
TEL:main
TEL;TYPE=FAX,WORK:work fax
TEL;TYPE=FAX,HOME:home fax
item13.TEL:google voice
TEL;TYPE=PAGER:pager
item14.TEL:custom
EMAIL;TYPE=HOME,PREF:john....@home.com
EMAIL;TYPE=WORK:d...@work.com
item1.EMAIL:j...@custom.com
NOTE:A test contact.
PHOTO;ENCODING=B:iVBORw0KGgoAAAANSUhEUgAAACQAAAAXCAYAAABj7u2bAAAABmJLR0QA/w
 D/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gEICjgdiWkBOQAAAB10RVh0Q
 29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAABaElEQVRIx+3Wu0tcURAG8F98gRKT
 YGORRqwksJV/QOqFFIFgKgsRYbHV1larDQQCKQxpUscyhUmXJuCSNpYWPsAU6wPxHW6aWbgsu+v
 e3RUs7geHc+fON3O+M4c5HHLkyHG/eISkg5heIGmUr++hVWigyY6THlejbWSt0Bv8QBXX2MF7jK
 U4IyjjJ45xg31sYKZuw7Xv9Gh6vvXO9QbBtbGNJ8Ert+AlTURkFjQX9g5e4ykGUcBm+FaDexx2M
 UQOYhIL2Lpj09oV9CvsQgPuePj+hP037BL6M6yRSdDZHWVOcBHcEv7FvyN8xxqmeynovA1Baf4U
 VvANhyn/Uq8E/Q57ssNufhvx1QZrDHfS9p9i3sQsnscdNowXWEQlOBXMYyI4j3EavqFUzpOYl4O
 TqUJ9+NzmkbXyb6Ryfumm7Wso4it2cYXL6K6PeBmcV8E5iEvxPDjv8CyVaxQfsIfbqGIlf17k6B
 b/Ae0cnahfg6KuAAAAAElFTkSuQmCC
item4.IMPP;X-SERVICE-TYPE=GoogleTalk:xmpp:google%20talk
item5.IMPP;X-SERVICE-TYPE=AIM:aim:aim
item6.IMPP;X-SERVICE-TYPE=Yahoo:ymsgr:yahoo
item7.IMPP;X-SERVICE-TYPE=Skype:skype:skype
item8.IMPP;X-SERVICE-TYPE=QQ:x-apple:QQ
item9.IMPP;X-SERVICE-TYPE=MSN:msnim:MSN
item10.IMPP;X-SERVICE-TYPE=ICQ:aim:ICQ
item11.IMPP;X-SERVICE-TYPE=Jabber:xmpp:Jabber
item12.IMPP;X-SERVICE-TYPE=Chat-label:x-apple:custom%20chat
X-EVOLUTION-FILE-AS:Doe\, John
X-MOZILLA-HTML:FALSE
X-ABLABEL:custom-label
X-PHONETIC-FIRST-NAME:John
X-PHONETIC-LAST-NAME:Doe
item1.X-ABLabel:custom-label
item2.X-ABDATE:1971-01-01
item2.X-ABLabel:Anniversary
item3.X-ABDATE:2000-02-01
item3.X-ABLabel:custom-label
item4.X-ABLabel:Other
item5.X-ABLabel:Other
item6.X-ABLabel:Other
item7.X-ABLabel:Other
item8.X-ABLabel:Other
item9.X-ABLabel:Other
item10.X-ABLabel:Other
item11.X-ABLabel:Other
item12.X-ABLabel:Other
item13.X-ABLabel:Google Voice
item14.X-ABLabel:custom-label
item15.X-ABRELATEDNAMES:spouse
item15.X-ABLabel:Spouse
item16.X-ABRELATEDNAMES:child
item16.X-ABLabel:Child
item17.X-ABRELATEDNAMES:mother
item17.X-ABLabel:Mother
item18.X-ABRELATEDNAMES:father
item18.X-ABLabel:Father
item19.X-ABRELATEDNAMES:parent
item19.X-ABLabel:Parent
item20.X-ABRELATEDNAMES:brother
item20.X-ABLabel:Brother
item21.X-ABRELATEDNAMES:sister
item21.X-ABLabel:Sister
item22.X-ABRELATEDNAMES:friend
item22.X-ABLabel:Friend
item23.X-ABRELATEDNAMES:relative
item23.X-ABLabel:relative
item24.X-ABRELATEDNAMES:manager
item24.X-ABLabel:Manager
item25.X-ABRELATEDNAMES:assistant
item25.X-ABLabel:Assistant
item26.X-ABRELATEDNAMES:referred-by
item26.X-ABLabel:referred by
item27.X-ABRELATEDNAMES:partner
item27.X-ABLabel:Partner
item28.X-ABRELATEDNAMES:domestic partner
item28.X-ABLabel:domestic partner
item29.X-ABRELATEDNAMES:custom relationship
item29.X-ABLabel:custom-label
item30.URL:http\://profile.com
item30.X-ABLabel:Profile
item31.URL:http\://blog.com
item31.X-ABLabel:Blog
item32.URL:http\://homepage.com
item32.X-ABLabel:HomePage
item33.URL:http\://company.com
item33.X-ABLabel:Work
item34.URL:http\://custom.com
item34.X-ABLabel:Custom-label
END:VCARD
  * [2014-04-28 19:31:37.576] TMimeDirProfileHandler::parseProperty: ORG
    does not specify all values
  * [2014-04-28 19:31:37.576] parseMimeDir: property not parsed (unknown
    or not storable): item4.IMPP;X-SERVICE-TYPE=Goog
  * [2014-04-28 19:31:37.576] parseMimeDir: property not parsed (unknown
    or not storable): item5.IMPP;X-SERVICE-TYPE=AIM:
  * [2014-04-28 19:31:37.576] parseMimeDir: property not parsed (unknown
    or not storable): item6.IMPP;X-SERVICE-TYPE=Yaho
  * [2014-04-28 19:31:37.576] parseMimeDir: property not parsed (unknown
    or not storable): item7.IMPP;X-SERVICE-TYPE=Skyp
  * [2014-04-28 19:31:37.576] parseMimeDir: property not parsed (unknown
    or not storable): item8.IMPP;X-SERVICE-TYPE=QQ:x
  * [2014-04-28 19:31:37.576] parseMimeDir: property not parsed (unknown
    or not storable): item9.IMPP;X-SERVICE-TYPE=MSN:
  * [2014-04-28 19:31:37.576] parseMimeDir: property not parsed (unknown
    or not storable): item10.IMPP;X-SERVICE-TYPE=ICQ
  * [2014-04-28 19:31:37.576] parseMimeDir: property not parsed (unknown
    or not storable): item11.IMPP;X-SERVICE-TYPE=Jab
  * [2014-04-28 19:31:37.576] parseMimeDir: property not parsed (unknown
    or not storable): item12.IMPP;X-SERVICE-TYPE=Cha
  * [2014-04-28 19:31:37.576] Successfully parsed: 
  * [2014-04-28 19:31:37.576] Item LocalID='6a5bd79f8b1cdd58',
    RemoteID='', operation=replace, size: [maxlocal,maxremote,actual]
  * [2014-04-28 19:31:37.577] 
-  0 :    integer SYNCLVL         [   0, n/a,     0] : <unassigned>
-  1 :  timestamp REV             [   0,   0,     0] : 2014-04-28T17:31:23Z 
(TZ: UTC)
-  2 :     string UID             [   0, n/a,    16] : "6a5bd79f8b1cdd58"
-  3 :     string GROUP_TAG       [   0, n/a,     0] : <unassigned>
-  4 :     string LABEL           [   0,   0,     0] : <array with 1 elements>
                                     -- element    0 : "Custom-label"
-  5 :     string N_LAST          [   0,   0,     3] : "Doe"
-  6 :     string N_FIRST         [   0,   0,     4] : "John"
-  7 :     string N_MIDDLE        [   0,   0,     1] : "1"
-  8 :     string N_PREFIX        [   0,   0,     3] : "Mr."
-  9 :     string N_SUFFIX        [   0,   0,     3] : "Sr."
- 10 :     string NICKNAME        [   0,   0,     6] : "Johnny"
- 11 :     string TITLE           [   0,   0,     6] : "tester"
- 12 :     string FN              [   0,   0,    18] : "Mr. John 1 Doe Sr."
- 13 :     string FILE_AS         [   0,   0,     9] : "Doe, John"
- 14 :     string GENDER          [   0,   0,     0] : <empty>
- 15 :     string CATEGORIES      [   0,   0,     0] : <array with 0 elements>
- 16 :     string ORG_NAME        [   0,   0,    10] : "at company"
- 17 :     string ORG_DIVISION    [   0,   0,     0] : <empty>
- 18 :     string ORG_OFFICE      [   0,   0,     0] : <empty>
- 19 :     string ORG_TEAM        [   0,   0,     0] : <empty>
- 20 :     string ROLE            [   0,   0,     0] : <empty>
- 21 :       date BDAY            [   0,   0,     0] : 1970-12-30 (floating)
- 22 :       date ANNIVERSARY     [   0,   0,     0] : <empty>
- 23 :       date XDATE           [   0,   0,     0] : <array with 2 elements>
                                     -- element    0 : 1971-01-01 (floating)
                                     -- element    1 : 2000-02-01 (floating)
- 24 :  telephone TEL             [   0,   0,     0] : <array with 9 elements>
                                     -- element    0 : "business 1"
                                     -- element    1 : "mobile"
                                     -- element    2 : "home"
                                     -- element    3 : "main"
                                     -- element    4 : "work fax"
                                     -- element    5 : "home fax"
                                     -- element    6 : "google voice"
                                     -- element    7 : "pager"
                                     -- element    8 : "custom"
- 25 :    integer TEL_FLAGS       [   0,   0,     0] : <array with 8 elements>
                                     -- element    0 : 2
                                     -- element    1 : 16
                                     -- element    2 : 1
                                     -- element    3 : <unassigned>
                                     -- element    4 : 34
                                     -- element    5 : 33
                                     -- element    6 : <unassigned>
                                     -- element    7 : 64
- 26 :     string TEL_LABEL       [   0, n/a,     0] : <unassigned>
- 27 :    integer TEL_ID          [   0, n/a,     0] : <unassigned>
- 28 :    integer TEL_SLOT        [   0,   0,     0] : <array with 0 elements>
- 29 :  multiline EMAIL           [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : "john....@home.com"
                                     -- element    1 : "d...@work.com"
                                     -- element    2 : "j...@custom.com"
- 30 :    integer EMAIL_FLAGS     [   0,   0,     0] : <array with 2 elements>
                                     -- element    0 : 1
                                     -- element    1 : 2
- 31 :     string EMAIL_LABEL     [   0, n/a,     0] : <unassigned>
- 32 :    integer EMAIL_ID        [   0, n/a,     0] : <unassigned>
- 33 :    integer EMAIL_SLOT      [   0,   0,     0] : <array with 0 elements>
- 34 :     string WEB             [   0,   0,     0] : <array with 5 elements>
                                     -- element    0 : "http://profile.com";
                                     -- element    1 : "http://blog.com";
                                     -- element    2 : "http://homepage.com";
                                     -- element    3 : "http://company.com";
                                     -- element    4 : "http://custom.com";
- 35 :    integer WEB_FLAGS       [   0,   0,     0] : <array with 0 elements>
- 36 :     string WEB_LABEL       [   0, n/a,     0] : <unassigned>
- 37 :    integer WEB_ID          [   0, n/a,     0] : <unassigned>
- 38 :     string CALURI          [   0,   0,     0] : <array with 0 elements>
- 39 :     string FBURL           [   0,   0,     0] : <array with 0 elements>
- 40 :     string BLOGURL         [   0,   0,     0] : <array with 0 elements>
- 41 :     string VIDEOURL        [   0,   0,     0] : <array with 0 elements>
- 42 :     string MANAGER         [   0,   0,     0] : <empty>
- 43 :     string ASSISTANT       [   0,   0,     0] : <empty>
- 44 :     string SPOUSE          [   0,   0,     0] : <empty>
- 45 :     string WANTS_HTML      [   0,   0,     5] : "FALSE"
- 46 :     string IMPP            [   0, n/a,     0] : <unassigned>
- 47 :     string IMPP_SERVICE    [   0, n/a,     0] : <unassigned>
- 48 :     string IMPP_LABEL      [   0, n/a,     0] : <unassigned>
- 49 :     string AIM_HANDLE      [   0,   0,     0] : <array with 0 elements>
- 50 :     string AIM_SLOT        [   0,   0,     0] : <array with 0 elements>
- 51 :     string GADUGADU_HANDLE [   0,   0,     0] : <array with 0 elements>
- 52 :     string GADUGADU_SLOT   [   0,   0,     0] : <array with 0 elements>
- 53 :     string GROUPWISE_HANDLE [   0,   0,     0] : <array with 0 elements>
- 54 :     string GROUPWISE_SLOT  [   0,   0,     0] : <array with 0 elements>
- 55 :     string ICQ_HANDLE      [   0,   0,     0] : <array with 0 elements>
- 56 :     string ICQ_SLOT        [   0,   0,     0] : <array with 0 elements>
- 57 :     string JABBER_HANDLE   [   0,   0,     0] : <array with 0 elements>
- 58 :     string JABBER_SLOT     [   0,   0,     0] : <array with 0 elements>
- 59 :     string MSN_HANDLE      [   0,   0,     0] : <array with 0 elements>
- 60 :     string MSN_SLOT        [   0,   0,     0] : <array with 0 elements>
- 61 :     string YAHOO_HANDLE    [   0,   0,     0] : <array with 0 elements>
- 62 :     string YAHOO_SLOT      [   0,   0,     0] : <array with 0 elements>
- 63 :     string SKYPE_HANDLE    [   0,   0,     0] : <array with 0 elements>
- 64 :     string SKYPE_SLOT      [   0,   0,     0] : <array with 0 elements>
- 65 :     string SIP_HANDLE      [   0,   0,     0] : <array with 0 elements>
- 66 :     string SIP_SLOT        [   0,   0,     0] : <array with 0 elements>
- 67 :     string IM_ADDRESS      [   0,   0,     0] : <array with 0 elements>
- 68 :     string MEANWHILE_HANDLE [   0,   0,     0] : <array with 0 elements>
- 69 :     string IRC_HANDLE      [   0,   0,     0] : <array with 0 elements>
- 70 :     string SMS_HANDLE      [   0,   0,     0] : <array with 0 elements>
- 71 :  multiline ADR_STREET      [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : "home address
"
                                     -- element    1 : "work address"
                                     -- element    2 : "custom address"
- 72 :  multiline ADR_ADDTL       [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : "neighborhood"
                                     -- element    1 : <unassigned>
                                     -- element    2 : <unassigned>
- 73 :    integer ADR_STREET_FLAGS [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : 1
                                     -- element    1 : 2
                                     -- element    2 : <unassigned>
- 74 :     string ADR_STREET_LABEL [   0, n/a,     0] : <unassigned>
- 75 :    integer ADR_STREET_ID   [   0, n/a,     0] : <unassigned>
- 76 :  multiline ADR_POBOX       [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : "PO"
                                     -- element    1 : <unassigned>
                                     -- element    2 : <unassigned>
- 77 :  multiline ADR_CITY        [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : "City"
                                     -- element    1 : <unassigned>
                                     -- element    2 : <unassigned>
- 78 :  multiline ADR_REG         [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : "State"
                                     -- element    1 : <unassigned>
                                     -- element    2 : <unassigned>
- 79 :  multiline ADR_ZIP         [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : "ZIP"
                                     -- element    1 : <unassigned>
                                     -- element    2 : <unassigned>
- 80 :  multiline ADR_COUNTRY     [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : "Country"
                                     -- element    1 : <unassigned>
                                     -- element    2 : <unassigned>
- 81 :  multiline NOTE            [   0,   0,    15] : "A test contact."
- 82 :     string PHOTO           [   0,   0,   516] : "�PNG

- 83 :     string PHOTO_TYPE      [   0,   0,     0] : <empty>
- 84 :     string PHOTO_VALUE     [   0,   0,     0] : <empty>
- 85 :     string GEO_LAT         [   0,   0,     0] : <empty>
- 86 :     string GEO_LONG        [   0,   0,     0] : <empty>
- 87 :     string CRYPTOENCRYPTPREF [   0,   0,     0] : <empty>
- 88 :     string CRYPTOPROTOPREF [   0,   0,     0] : <array with 0 elements>
- 89 :     string CRYPTOSIGNPREF  [   0,   0,     0] : <empty>
- 90 :     string OPENPGPFP       [   0,   0,     0] : <empty>
- 91 :     string XPROPS          [   0,   0,     0] : <array with 17 elements>
                                     -- element    0 : 
"X-PHONETIC-FIRST-NAME:John"
                                     -- element    1 : 
"X-PHONETIC-LAST-NAME:Doe"
                                     -- element    2 : 
"item15.X-ABRELATEDNAMES:spouse"
                                     -- element    3 : 
"item16.X-ABRELATEDNAMES:child"
                                     -- element    4 : 
"item17.X-ABRELATEDNAMES:mother"
                                     -- element    5 : 
"item18.X-ABRELATEDNAMES:father"
                                     -- element    6 : 
"item19.X-ABRELATEDNAMES:parent"
                                     -- element    7 : 
"item20.X-ABRELATEDNAMES:brother"
                                     -- element    8 : 
"item21.X-ABRELATEDNAMES:sister"
                                     -- element    9 : 
"item22.X-ABRELATEDNAMES:friend"
                                     -- element   10 : 
"item23.X-ABRELATEDNAMES:relative"
                                     -- element   11 : 
"item24.X-ABRELATEDNAMES:manager"
                                     -- element   12 : 
"item25.X-ABRELATEDNAMES:assistant"
                                     -- element   13 : 
"item26.X-ABRELATEDNAMES:referred-by"
                                     -- element   14 : 
"item27.X-ABRELATEDNAMES:partner"
                                     -- element   15 : 
"item28.X-ABRELATEDNAMES:domestic partner"
                                     -- element   16 : 
"item29.X-ABRELATEDNAMES:custom relationship"


Note that LABEL only has one entry and GROUP_TAG is empty.

Am I missing something in my config?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.


Attachment: 00vcard-fieldlist.xml
Description: XML document

Attachment: 01vcard-profile.xml
Description: XML document

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@synthesis.ch
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Reply via email to