Is there something local in \xmlmapvalue?
Because \xmlmapvalue in the current tree (with \xmlsetup{#1}{command}) makes \xmlvalue find the mapping, but having it executed on a different tree (with \xmlprocessbuffer{root}{buffer}{}) makes it unreachable and \xmlvalue fails.
How to solve this?