Previous: , Up: Querying Servers   [Contents][Index]

3.1.3 Duplicate Attributes

Directory standards may authorize different instances of the same attribute in a record. For instance the record of a person may contain several email fields containing different email addresses, in which case EUDC will consider the attribute duplicated.

EUDC has several methods to deal with duplicated attributes. The available methods are:


Makes a list with the different values of the duplicate attribute. The record is returned with only one instance of the attribute with a list of all the different values as a value. This is the default method that is used to handle duplicate fields for which no other method has been specified.


Discards all the duplicate values of the field keeping only the first one.


Concatenates the different values using a newline as a separator. The record keeps only one instance of the field the value of which is a single multi-line string.


Duplicates the whole record into as many instances as there are different values for the field. This is the default for the email field. Thus a record containing 3 different email addresses is duplicated into three different records each having a single email address. This is particularly useful in combination with select as the method to handle multiple matches in inline expansion queries (see Inline Query Expansion) because you are presented with the 3 addresses in a selection buffer

Because a method may not be applicable to all fields, the variable eudc-duplicate-attribute-handling-method lets you specify either a default method for all fields or a method for each individual field.

Variable: eudc-duplicate-attribute-handling-method

A method to handle entries containing duplicate attributes. This is either an alist of elements (attr . method), or a symbol method. The alist form of the variable associates a method to an individual attribute name; the second form specifies a method applicable to all attribute names. Available methods are: list, first, concat, and duplicate (see above). The default is list.

Previous: , Up: Querying Servers   [Contents][Index]