Customizing the Exchange ActiveSync XSLT file

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

Mapping for Exchange ActiveSync devices (such as Apple, BlackBerry 10, and Windows) is done by customizing the file nameLookup-AS.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 to that directory. Customize the copied file only, as 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/understood by the device are defined by the Exchange ActiveSync protocol. Currently only the following fields are defined:
  • DisplayName
  • Phone
  • Title
  • Company
  • Alias
  • FirstName
  • LastName
  • HomePhone
  • MobilePhone
  • EmailAddress
  • Office
By default, the Domino® directory field of OfficePhoneNumber is mapped to the device field of Phoneas shown below.
<xsl:call-template name="MapField">
        <xsl:with-param name="OldValue">
          <xsl:value-of select="OfficePhoneNumber"/>
        </xsl:with-param>
        <xsl:with-param name="NewName">Phone</xsl:with-param>
      </xsl:call-template>
If your LDAP uses a field name called WorkPhoneinstead, then in addition to adding WorkPhone to the nameLookupFields, you would also change the Exchange Active Sync XSLT to look like the following:
<xsl:call-template name="MapField">
        <xsl:with-param name="OldValue">
          <xsl:value-of select="WorkPhone"/>
        </xsl:with-param>
        <xsl:with-param name="NewName">Phone</xsl:with-param>
      </xsl:call-template>
By default, the middle initial is appended to the FirstName field, as the Exchange Active Sync protocol does not define a middle initial field.
<xsl:element name="FirstName" xmlns="GAL:"> 
        <xsl:value-of select="normalize-space(concat(FirstName, ' ', MiddleInitial))"/>
      </xsl:element>
You could similarity add a name prefix (Mr., Dr., Ms.) to the first name field if desired. Assuming the LDAP field name is NamePrefix, then the XSLT would look like the following:
<xsl:element name="FirstName" xmlns="GAL:"> 
        <xsl:value-of select="normalize-space(concat(NamePrefix, ' ', FirstName, ' ', MiddleInitial))"/>
      </xsl:element>

Extensive changes to the XSLT file should not be necessary. However, if you need more information about XSLT, see http://www.w3.org/TR/xslt.