Hi all,
There is a bug in the reset() method of Instance it replaces the
instanceDocument, but the instanceContext points to this document. The
instanceConext is returned the getValue() method of the JXPath Container
interface. And therefore stale data is returned by all Path functions. I
tried adding the following statement to the end of the reset() method :
this.instanceContext = JXPathContext.newContext(this);
But this doesn't solve the problems, I got NullPointerExceptions in the
dispatch method of container. Therefore I made a patch that removed all
children from the root node of the instance document and added cloned
elements f the original instance data to the root node.
Therefore I followed an other strategy to solve the problem (see attached
patch). If you do not replace the document element of the instance data but
only the children by importing them, everything seems to work.
Nick Van den Bleeken.
Instance-patch.txt
Description: Text document
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|