
In some special cases, some part of XML document,
being pointed by a XML entity, should be copied into a new separate document
with new entity pointing to the root of this document.
One reason for doing this is optimization of XPER processing (see xper_cut).
Another way to use this functionality is passing of some XML entity
to a function, when function uses XPath operations with references to
the "document@s root".
		
The origin of the bug is @//C@ path in get_C(), which returns not
the "C element inside given b element", but
"C element inside the document where given b element is located",
thus get_C returns the first C element in the whole document with any of
two B elements given.
      
There are two ways to fix this bug.
It is better to correct get_C():
      
If you cannot patch get_C() for some reason, xml_cut will help,
but it will waste both memory and CPU time for copying a branch of
XML tree:
      
With XPER entity given, xml_cut() works exactly as xper_cut().
      