i've got a problem evaluating predicates when used in conjunction with relative contexts.
here the xml-input i'm using:
<people>
<person name="Name1"></person>
<person name="Name2"></person>
<person name="Name3"></person>
<person name="Name4"></person>
<new name="NameX"></new>
</people>here's the code:
//document is a DOM containing the above xml JXPathContext rootContext = JXPathContext.newContext(document);
//the xpath must be evaluated relative to pointer
Pointer pointer = rootContext.getPointer("/people/new/@name");
JXPathContext relativeContext =
rootContext.getRelativeContext(this.pointer);//ok assertTrue(relativeContext.getPointer("not(//person/@name=.)").getValue().toString().equals("true"));
//fails
this.pointer.setValue("Name1"); assertTrue(relativeContext.getPointer("not(//person/@name=.)").getValue().toString().equals("false"));
i've tried this and that but with no success. can someone shed some light on this or teach me what i'm doing wrong?
thanks,
Joern
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
