|
From: Henrik /K. <kaa...@us...> - 2009-10-13 22:24:59
|
xmlformat_compare has a nice way of comparing OSyncXMLFields; adding and
subtracting "points" to see how well two OSyncXMLFormats match.
However, this does *not* extend to sub-fields.
If we have
<Name>
<LastName>Doe</LastName>
<FirstName>John</FirstName>
</Name>
and compare to
<Name>
<LastName>Doe</LastName>
<FirstName>John</FirstName>
<Prefix>Mr.</Prefix>
</Name>
the two fields will not match, resulting in a -90 points penalty.
Even worse, if we have
<Name>
<LastName>Doe</LastName>
<FirstName>John</FirstName>
</Name>
and compare this to how file-sync currently reports vcards to xml:
<Name>
<LastName>Doe</LastName>
<FirstName>John</FirstName>
<Additional></Additional>
<Prefix></Prefix>
<Suffix></Suffix>
</Name>
the two fields will not match either
(we get "Run out of list2 elements. Different.")
Does anyone have a good idea as to how to resolve this issue?
/Henrik
|