Hi.  JXPath is pretty darned cool by the way; thanks to all those who worked
on it. Any way, I am examining an XML document that uses several namespaces. 
There are a few string values I want to fetch out of it that are common
siblings at the same point in the document.  I could use the same
JXPathContext reference to fetch out the values I want, but then the
beginning part of the xpath expression would be the same and presumably
would incur redundant tree traversal.  I'd like for JXPath to get me to the
common ancestor of the elements I want, and then I'll evaluate simpler
expressions from there.  From the user guide, I am to follow these
instructions: 
http://jakarta.apache.org/commons/jxpath/users-guide.html#Relative_Contexts
Relative Contexts .  I registered the relevant XML namespaces on the first
JXPathContext I got ahold of so that I could use them in my expressions. 
Unfortunately, if you generate a Pointer and then a "relative" JXPathContext
(via the getRelativeContext(Pointer) method), the namespace registrations I
did are forgotten.  I could of course re-register them but I think JXPath
should be improved so that is not necessary.  Do people agree with me that
this is a shortcoming?

~ David
-- 
View this message in context: 
http://www.nabble.com/-jxpath--namespace-registration-not-remembered-for-JXPathContext.getRelativeContext-tf3805452.html#a10768895
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to