I'd prefer the way PicaJet does it: When new pictures with IPTC keywords are opened by XnView, the keywords should be added to the category tree on the left-hand side of the XnView browser window. On the other hand, if you assign a picture (or a whole bunch) to a category in this tree via drag and drop, this category and all its parents should be written to the IPTC keywords of the selected files. If that takes too long, XnView could wait until the user wants to quit the program and save the newly assigned categories then (i.e. all categories assigned in the session).
The hierarchy of the categories needn't be saved in the IPTC data (I think the IPTC standard doesn't support hierarchies in keywords). It would be very handy though if the categories in the category tree could be moved by drag and drop (also to another hierarchical level). I hope it is clear what I mean

Another thing which would be nice is if it was possible to do complex searches for the categories in the category tree, i.e. if you could combine them by "and" or "or". E.g., in this way, it would be possible to find all pictures taken in Rome with family members or friends on them - I hope you get what I want to say

Thanks again for the great program!
Frank