<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thomas Brüderli a écrit :
<blockquote cite="mid:4E7332BD.9060309@kolabsys.com" type="cite">
  <pre wrap="">Alain Abbas wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Could be mor simple to put preferred="1" in the <email /> entry instead
to make a duplicate entry <preferred> that is always hard to maintains.
Example
<email displayname="aa" preferred="1><a class="moz-txt-link-abbreviated" href="mailto:aa@aa.com">aa@aa.com</a></email>
<email displayname="bb"> <a class="moz-txt-link-abbreviated" href="mailto:bb@bb.com">bb@bb.com</a></email>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Also in this case inconsistency can arise:

<email displayname="aa" preferred="1"><a class="moz-txt-link-abbreviated" href="mailto:aa@aa.com">aa@aa.com</a></email>
<email displayname="bb" preferred="1"><a class="moz-txt-link-abbreviated" href="mailto:bb@bb.com">bb@bb.com</a></email>

  </pre>
  <blockquote type="cite">
    <pre wrap="">like that e are sure to not have duplicate infos and false info
in case of :
<email displayname="bb"> <a class="moz-txt-link-abbreviated" href="mailto:bb@bb.com">bb@bb.com</a></email>
<preferred>
<email><a class="moz-txt-link-abbreviated" href="mailto:toto@toto.com">toto@toto.com</a></email>
</preferred>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
In either case, the client altering a contact object is responsible to 
ensure consistent data whereas the latter case is IMO preferable because 
it doesn't require iteration over all <email> nodes for both reading the 
preferred email address and setting/changing 
  </pre>
</blockquote>
yes but you have not inconsistency in the datas just in the logic (2
preferred) that is more easy to handle than <br>
a different address in <preferred> tag. Now about iteration 70%
of contacts have only one email and perhaps <br>
20% have 2 or 3 , that is not a big iteration :-)<br>
<br>
Regards<br>
Alain <br>
<br>
<blockquote cite="mid:4E7332BD.9060309@kolabsys.com" type="cite">
  <pre wrap="">
~Thomas

_______________________________________________
Kolab-format mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kolab-format@kolab.org">Kolab-format@kolab.org</a>
<a class="moz-txt-link-freetext" href="https://kolab.org/mailman/listinfo/kolab-format">https://kolab.org/mailman/listinfo/kolab-format</a>
  </pre>
</blockquote>
<br>
</body>
</html>