I now use a different query, since the first used String compare functions in it (contains).
Here is one that checks fields:
/my:ResultProtocol/my:People/my:Person[not(@my:PersonID = current()/preceding-sibling::my:TopicPersonReference/@my:PersonID) and not(@my:PersonID = current()/following-sibling::my:TopicPersonReference/@my:PersonID)]
It says: Don't show Person nodes, that are already used in local fields before and after this one.
I could change it a little bit more, if I want:
/my:ResultProtocol/my:People/my:Person[not (@my:PersonID = current()/preceding-sibling::my:TopicPersonReference/@my:PersonID or @my:PersonID = current()/following-sibling::my:TopicPersonReference/@my:PersonID)]
or do this:
/my:ResultProtocol/my:People/my:Person[not(@my:PersonID = current()/../descendant-or-self::node()/my:TopicPersonReference[not(@my:PersonID = current()/@my:PersonID)]/@my:PersonID)]
The Error still comes, so in my opinion it is a bug. Because one could maybe argue somehow, that string-functions are difficult to adapt into the browser-world (I have no idea). But these xpaths are much shorter, quite simple and should work.
I will just accept the bug/fact, because it has no priority and is comfort feature. Since it works perfectly well in client, the browser adaption of the preceding-sibling and following-sibling-Function must be faulty. At least I cannot see the error.
One side observation:
I like this field check a lot better, plus it should perform better, since the string would grow linearly, would it? I found that in large repating node lists (where large means more than 10 rows maybe :-)) , the infopath form would not perform any good, it would almost stop completey, if I use a ComboBox Control in every row. At first I thought it must be the string filter. But it is certainly not. I now hide the combobox as soon as a selection is made and only show a calculated value or maybe a textbox and the form is fast again.