Customizing the VCARD XSLT file

Once you know what fields are being returned from your look up, you can map them to fields on the device.

Mapping for HCL Verse for Android and iOS devices is done by customizing the file nameLookup-VCARD.xslt. The file is located in the data\traveler\cfg\namelookupTemplate directory. To customize the file, create a new directory called data\traveler\cfg\namelookup and copy the file there. Customize the copied file only, the version in the namelookupTemplate directory will be overwritten during an upgrade and any changes lost. A server restart is required the first time this file is created, after which changes to the file will be picked up dynamically.

By default, this file is configured to map the standard Domino® Directory fields to the device fields. The fields that can be used and understood by the device are defined by the VCARD 3.0 Specifications. VCARD 3.0 is defined by several RFC publications, but a simplified description can be found here: http://en.wikipedia.org/wiki/VCard.

In general, it should not be necessary to modify the VCARD mapping. Regardless, the following examples show changes that may be desiredable when customizing the mapping from server to device.

Important: Line wrapping may occur in the examples below due to browser formatting. The VCARD format does not permit the wrapping of lines within a given property definition. End of line means end of property.
Example 1: By default the Domino® directory field OfficePhoneNumber is mapped to the device field of Work Phone. If your LDAP used WorkPhone instead of OfficePhoneNumber then you would change the XSLT as shown below:
<!-- BEGIN: PERFORM CUSTOMIZATION HERE -->
BEGIN:VCARD
VERSION:3.0
FN;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="FullName"/>
N;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="LastName"/>;<xsl:value-of select="FirstName"/>;<xsl:value-of select="MiddleInitial"/>;<xsl:value-of select="Title"/>;<xsl:value-of select="Suffix"/>
ADR;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=WORK;TYPE=PREF:;;<xsl:value-of select="OfficeStreetAddress"/>;<xsl:value-of select="OfficeCity"/>;<xsl:value-of select="OfficeState"/>;<xsl:value-of select="OfficeZIP"/>;<xsl:value-of select="OfficeCountry"/>
ADR;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=HOME;TYPE=PREF:;;<xsl:value-of select="StreetAddress"/>;<xsl:value-of select="City"/>;<xsl:value-of select="State"/>;<xsl:value-of select="Zip"/>;<xsl:value-of select="Country"/>
TITLE;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="JobTitle"/>
ORG;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="CompanyName"/>;<xsl:value-of select="Department"/>
EMAIL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=INTERNET:<xsl:value-of select="InternetAddress"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=CELL:<xsl:value-of select="CellPhoneNumber"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=HOME:<xsl:value-of select="PhoneNumber"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=WORK:<xsl:value-of select="WorkPhone"/>
URL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="WebSite"/>
X-IBM-LOOKUP-TYPE:<xsl:value-of select="Type"/>
END:VCARD
<!-- END: PERFORM CUSTOMIZATION HERE -->
Example 2: By default, the Address fields are tailored to a standard US Domino® directory address. In certain locales other fields may need to be specified. The following description details the VCARD address property.
Post Office Address (first field) Extended Address (second field), Street (third field), Locality (fourth field), Region (fifth field), Postal Code (six field), and Country (seventh field)
To add the directory field PostOfficeAddress to the Home address, and use State or County for Region, the XSLT would look like the following:
<!-- BEGIN: PERFORM CUSTOMIZATION HERE -->
BEGIN:VCARD
VERSION:3.0
FN;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="FullName"/>
N;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="LastName"/>;<xsl:value-of select="FirstName"/>;<xsl:value-of select="MiddleInitial"/>;<xsl:value-of select="Title"/>;<xsl:value-of select="Suffix"/>
ADR;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=WORK;TYPE=PREF:;;<xsl:value-of select="OfficeStreetAddress"/>;<xsl:value-of select="OfficeCity"/>;<xsl:value-of select="OfficeState"/>;<xsl:value-of select="OfficeZIP"/>;<xsl:value-of select="OfficeCountry"/>
ADR;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=HOME;TYPE=PREF:<xsl:value-of select="PostOfficeAddress"/>;;<xsl:value-of select="StreetAddress"/>;<xsl:value-of select="City"/>;<xsl:value-of select="State"/><xsl:value-of select="County"/>;<xsl:value-of select="Zip"/>;<xsl:value-of select="Country"/>
TITLE;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="JobTitle"/>
ORG;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="CompanyName"/>;<xsl:value-of select="Department"/>
EMAIL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=INTERNET:<xsl:value-of select="InternetAddress"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=CELL:<xsl:value-of select="CellPhoneNumber"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=HOME:<xsl:value-of select="PhoneNumber"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=WORK:<xsl:value-of select="OfficePhoneNumber"/>
URL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="WebSite"/>
X-IBM-LOOKUP-TYPE:<xsl:value-of select="Type"/>
END:VCARD
<!-- END: PERFORM CUSTOMIZATION HERE -->
Example 3: The Android Verse and iOS Verse clients support four additional TEL values, FAX;HOME, FAX;WORK, PAGER, VOICE, in addition to the three default TEL values CELL, HOME and WORK. (HTMO supports the default TEL values only). To return these additional values, add their Domino directory field names to the notes.ini setting NTS_NAME_LOOKUP_ITEMS_EXT. Then add TEL lines for them to nameLookup-VCARD.xslt. The following example shows four additional TEL values for the directory fields ExtraPhone1, ExtraPhone2, ExtraPhone3, and ExtraPhone4, which would also be added to the NTS_NAME_LOOKUP_ITEMS_EXT setting.
<!-- BEGIN: PERFORM CUSTOMIZATION HERE -->
BEGIN:VCARD
VERSION:3.0
FN;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="FullName"/>
N;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="LastName"/>;<xsl:value-of select="FirstName"/>;<xsl:value-of select="MiddleInitial"/>;<xsl:value-of select="Title"/>;<xsl:value-of select="Suffix"/>
ADR;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=WORK;TYPE=PREF:;;<xsl:value-of select="OfficeStreetAddress"/>;<xsl:value-of select="OfficeCity"/>;<xsl:value-of select="OfficeState"/>;<xsl:value-of select="OfficeZIP"/>;<xsl:value-of select="OfficeCountry"/>
ADR;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=HOME;TYPE=PREF:;;<xsl:value-of select="StreetAddress"/>;<xsl:value-of select="City"/>;<xsl:value-of select="State"/>;<xsl:value-of select="Zip"/>;<xsl:value-of select="Country"/>
TITLE;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="JobTitle"/>
ORG;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="CompanyName"/>;<xsl:value-of select="Department"/>
EMAIL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=INTERNET:<xsl:value-of select="InternetAddress"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=CELL:<xsl:value-of select="CellPhoneNumber"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=HOME:<xsl:value-of select="PhoneNumber"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=WORK:<xsl:value-of select="WorkPhone"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=FAX;HOME:<xsl:value-of select="ExtraPhone1"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=FAX;WORK:<xsl:value-of select="ExtraPhone2"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=PAGER:<xsl:value-of select="ExtraPhone3"/>
TEL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8;TYPE=VOICE:<xsl:value-of select="ExtraPhone4"/>
URL;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:<xsl:value-of select="WebSite"/>
X-IBM-LOOKUP-TYPE:<xsl:value-of select="Type"/>
END:VCARD
<!-- END: PERFORM CUSTOMIZATION HERE -->