On Mon, 2014-04-28 at 23:18 +0200, Lukas Zeller wrote: > Hi Patrick, > > > Unfortunately I am not getting the group-tag field populated. I'm > > attaching my field list and profile. > > small oversight on my and your part :-) > > The attribute to be added to <property> is called "groupfield", not > "grouptag"...
I fixed that (see attached profile + field list). It fills the GROUP_TAG array now, but the LABEL array only has one entry, apparently the last one. The array positions also don't match: item34.URL:http\://custom.com item34.X-ABLabel:Custom-label - 3 : string GROUP_TAG [ 0, n/a, 0] : <array with 19 elements> -- element 0 : "item34" - 4 : string LABEL [ 0, 0, 0] : <array with 1 elements> -- element 0 : "Custom-label" - 34 : string WEB [ 0, 0, 0] : <array with 19 elements> -- element 0 : <unassigned> ... -- element 18 : "http://custom.com" Note that we now have multiple properties sharing the same group tag, not just two (ORG and TITLE in the example). It is not clear to me how "groupfield" interacts with the "repeat" parameter. Do I need repeat="array" increment="1" despite "groupfield" overriding the choice of the position? What happens if the two don't agree? Suppose URL is used without group tag, then followed by an URL with group tag: URL:http://foo.com item1.X-ABLabel:custom-label item1.URL:http://custom.com First this adds http://foo.com at postion 0 of the WEB field => WEB = [ 'http://foo.com' ] GROUP_TAG = [] LABEL = [] Then the first label and tag are parsed: WEB = [ 'http://foo.com' ] GROUP_TAG = [ 'item1' ] LABEL = [ 'custom-label' ] Now we have a problem. Based on "GROUP_TAG", item1.URL must be at position 0, but that position in WEB is already taken. Or is the second step creating an empty (or unassigned) GROUP_TAG entry, with the special semantic that empty group tags are never matched against each other? Anyway, here's the full parse log: [2014-04-29 09:30:09.811] Parsing: * [2014-04-29 09:30:09.811] 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-29 09:30:09.812] TMimeDirProfileHandler::parseProperty: ORG does not specify all values * [2014-04-29 09:30:09.813] Successfully parsed: * [2014-04-29 09:30:09.813] Item LocalID='6a5bd79f8b1cdd58', RemoteID='', operation=replace, size: [maxlocal,maxremote,actual] * [2014-04-29 09:30:09.813] - 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] : <array with 19 elements> -- element 0 : "item34" -- element 1 : <empty> -- element 2 : <empty> -- element 3 : <empty> -- element 4 : <empty> -- element 5 : <empty> -- element 6 : "item13" -- element 7 : <empty> -- element 8 : "item14" -- element 9 : <empty> -- element 10 : <empty> -- element 11 : "item1" -- element 12 : "item2" -- element 13 : "item3" -- element 14 : "item30" -- element 15 : "item31" -- element 16 : "item32" -- element 17 : "item33" -- element 18 : "item34" - 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 14 elements> -- element 0 : <unassigned> -- element 1 : <unassigned> -- element 2 : <unassigned> -- element 3 : <unassigned> -- element 4 : <unassigned> -- element 5 : <unassigned> -- element 6 : <unassigned> -- element 7 : <unassigned> -- element 8 : <unassigned> -- element 9 : <unassigned> -- element 10 : <unassigned> -- element 11 : <unassigned> -- element 12 : 1971-01-01 (floating) -- element 13 : 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 12 elements> -- element 0 : <unassigned> -- element 1 : <unassigned> -- element 2 : <unassigned> -- element 3 : <unassigned> -- element 4 : <unassigned> -- element 5 : <unassigned> -- element 6 : <unassigned> -- element 7 : <unassigned> -- element 8 : <unassigned> -- element 9 : "john....@home.com" -- element 10 : "d...@work.com" -- element 11 : "j...@custom.com" - 30 : integer EMAIL_FLAGS [ 0, 0, 0] : <array with 11 elements> -- element 0 : <unassigned> -- element 1 : <unassigned> -- element 2 : <unassigned> -- element 3 : <unassigned> -- element 4 : <unassigned> -- element 5 : <unassigned> -- element 6 : <unassigned> -- element 7 : <unassigned> -- element 8 : <unassigned> -- element 9 : 1 -- element 10 : 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 19 elements> -- element 0 : <unassigned> -- element 1 : <unassigned> -- element 2 : <unassigned> -- element 3 : <unassigned> -- element 4 : <unassigned> -- element 5 : <unassigned> -- element 6 : <unassigned> -- element 7 : <unassigned> -- element 8 : <unassigned> -- element 9 : <unassigned> -- element 10 : <unassigned> -- element 11 : <unassigned> -- element 12 : <unassigned> -- element 13 : <unassigned> -- element 14 : "http://profile.com" -- element 15 : "http://blog.com" -- element 16 : "http://homepage.com" -- element 17 : "http://company.com" -- element 18 : "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 RELATEDNAMES [ 0, 0, 0] : <array with 1 elements> -- element 0 : "custom relationship" - 43 : string MANAGER [ 0, 0, 0] : <empty> - 44 : string ASSISTANT [ 0, 0, 0] : <empty> - 45 : string SPOUSE [ 0, 0, 0] : <empty> - 46 : string WANTS_HTML [ 0, 0, 5] : "FALSE" - 47 : string IMPP [ 0, 0, 0] : <array with 9 elements> -- element 0 : "xmpp:google%20talk" -- element 1 : "aim:aim" -- element 2 : "ymsgr:yahoo" -- element 3 : "skype:skype" -- element 4 : "x-apple:QQ" -- element 5 : "msnim:MSN" -- element 6 : "aim:ICQ" -- element 7 : "xmpp:Jabber" -- element 8 : "x-apple:custom%20chat" - 48 : string IMPP_SERVICE [ 0, 0, 0] : <array with 0 elements> - 49 : string IMPP_SLOT [ 0, 0, 0] : <array with 0 elements> - 50 : string AIM_HANDLE [ 0, 0, 0] : <array with 0 elements> - 51 : string AIM_SLOT [ 0, 0, 0] : <array with 0 elements> - 52 : string GADUGADU_HANDLE [ 0, 0, 0] : <array with 0 elements> - 53 : string GADUGADU_SLOT [ 0, 0, 0] : <array with 0 elements> - 54 : string GROUPWISE_HANDLE [ 0, 0, 0] : <array with 0 elements> - 55 : string GROUPWISE_SLOT [ 0, 0, 0] : <array with 0 elements> - 56 : string ICQ_HANDLE [ 0, 0, 0] : <array with 0 elements> - 57 : string ICQ_SLOT [ 0, 0, 0] : <array with 0 elements> - 58 : string JABBER_HANDLE [ 0, 0, 0] : <array with 0 elements> - 59 : string JABBER_SLOT [ 0, 0, 0] : <array with 0 elements> - 60 : string MSN_HANDLE [ 0, 0, 0] : <array with 0 elements> - 61 : string MSN_SLOT [ 0, 0, 0] : <array with 0 elements> - 62 : string YAHOO_HANDLE [ 0, 0, 0] : <array with 0 elements> - 63 : string YAHOO_SLOT [ 0, 0, 0] : <array with 0 elements> - 64 : string SKYPE_HANDLE [ 0, 0, 0] : <array with 0 elements> - 65 : string SKYPE_SLOT [ 0, 0, 0] : <array with 0 elements> - 66 : string SIP_HANDLE [ 0, 0, 0] : <array with 0 elements> - 67 : string SIP_SLOT [ 0, 0, 0] : <array with 0 elements> - 68 : string IM_ADDRESS [ 0, 0, 0] : <array with 0 elements> - 69 : string MEANWHILE_HANDLE [ 0, 0, 0] : <array with 0 elements> - 70 : string IRC_HANDLE [ 0, 0, 0] : <array with 0 elements> - 71 : string SMS_HANDLE [ 0, 0, 0] : <array with 0 elements> - 72 : multiline ADR_STREET [ 0, 0, 0] : <array with 3 elements> -- element 0 : "home address " -- element 1 : "work address" -- element 2 : "custom address" - 73 : multiline ADR_ADDTL [ 0, 0, 0] : <array with 3 elements> -- element 0 : "neighborhood" -- element 1 : <unassigned> -- element 2 : <unassigned> - 74 : integer ADR_STREET_FLAGS [ 0, 0, 0] : <array with 3 elements> -- element 0 : 1 -- element 1 : 2 -- element 2 : <unassigned> - 75 : string ADR_STREET_LABEL [ 0, n/a, 0] : <unassigned> - 76 : integer ADR_STREET_ID [ 0, n/a, 0] : <unassigned> - 77 : multiline ADR_POBOX [ 0, 0, 0] : <array with 3 elements> -- element 0 : "PO" -- element 1 : <unassigned> -- element 2 : <unassigned> - 78 : multiline ADR_CITY [ 0, 0, 0] : <array with 3 elements> -- element 0 : "City" -- element 1 : <unassigned> -- element 2 : <unassigned> - 79 : multiline ADR_REG [ 0, 0, 0] : <array with 3 elements> -- element 0 : "State" -- element 1 : <unassigned> -- element 2 : <unassigned> - 80 : multiline ADR_ZIP [ 0, 0, 0] : <array with 3 elements> -- element 0 : "ZIP" -- element 1 : <unassigned> -- element 2 : <unassigned> - 81 : multiline ADR_COUNTRY [ 0, 0, 0] : <array with 3 elements> -- element 0 : "Country" -- element 1 : <unassigned> -- element 2 : <unassigned> - 82 : multiline NOTE [ 0, 0, 15] : "A test contact." - 83 : string PHOTO [ 0, 0, 516] : "�PNG - 84 : string PHOTO_TYPE [ 0, 0, 0] : <empty> - 85 : string PHOTO_VALUE [ 0, 0, 0] : <empty> - 86 : string GEO_LAT [ 0, 0, 0] : <empty> - 87 : string GEO_LONG [ 0, 0, 0] : <empty> - 88 : string CRYPTOENCRYPTPREF [ 0, 0, 0] : <empty> - 89 : string CRYPTOPROTOPREF [ 0, 0, 0] : <array with 0 elements> - 90 : string CRYPTOSIGNPREF [ 0, 0, 0] : <empty> - 91 : string OPENPGPFP [ 0, 0, 0] : <empty> - 92 : string XPROPS [ 0, 0, 0] : <array with 2 elements> -- element 0 : "X-PHONETIC-FIRST-NAME:John" -- element 1 : "X-PHONETIC-LAST-NAME:Doe" -- 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.
00vcard-fieldlist.xml
Description: XML document
01vcard-profile.xml
Description: XML document
_______________________________________________ os-libsynthesis mailing list os-libsynthesis@synthesis.ch http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis