SortKey sortKey = sortKeys[i];
AttributeType attrType = sortKey.getAttributeType();
List<Attribute> attrList = entry.getAttribute(attrType);
if (attrList != null)
{
AttributeValue sortValue = null;
// There may be multiple versions of this attribute in the target entry
// (e.g., with different sets of options), and it may also be a
// multivalued attribute. In that case, we need to find the value that
// is the best match for the corresponding sort key (i.e., for sorting