fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / knewstuff / doc / Identification.txt
blob498bc3cdf7d9a72aae4125ea82543d5284c11a67
1 How to identify entries
2 -----------------------
4 The KNS2::CoreEngine uses id() for entries and pid() for providers to find out
5 a unique identifier which can be used to compare one of them to another one of
6 the same kind.
8 In KNS1, the name and the payload URL were used to compare the entries, as
9 they're guaranteed to exist. In KNS2, the internationalised nature of those
10 tags is honoured.
11 The proposed comparison algorithm is hence called "internationalised
12 identification" (i18n-id) and is already implemented by Hotstuff.
13 It will also be implemented by KNewStuff2.
15 How does i18n-id work?
16 Out of all the tags of an entry, one is taken randomly. Its content together
17 with its language form the identity tuple. When an entry is to be compared,
18 the tag with the same language as used in the id is used for comparison.
19 Note that i18n-id works even in the absence of a language attribute. However,
20 in GHNS, a language attribute will almost always be present. It'd be naive to
21 throw information away when it is present already.
23 What i18n-id assumes is that translations never vanish, once added. It would
24 of course be trivial to extend the algorithm to check through all of the
25 languages once present, hence it would work as long as at least one
26 translation is kept.
28 What i18n-id achieves is that one doesn't have to rely on "unique ids"
29 maintained by the server, which would definitely change if repositories are
30 merged.