From commons-user-return-19291-apmail-jakarta-commons-user-archive=jakarta.apache.org@jakarta.apache.org Wed May 23 17:31:04 2007 Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 99203 invoked from network); 23 May 2007 17:31:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 May 2007 17:31:01 -0000 Received: (qmail 55012 invoked by uid 500); 23 May 2007 17:31:01 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 54966 invoked by uid 500); 23 May 2007 17:31:01 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 54949 invoked by uid 99); 23 May 2007 17:31:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2007 10:31:01 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2007 10:30:55 -0700 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1HqufS-0001mW-Vv for commons-user@jakarta.apache.org; Wed, 23 May 2007 10:30:34 -0700 Message-ID: <10768895.post@talk.nabble.com> Date: Wed, 23 May 2007 10:30:34 -0700 (PDT) From: David Smiley To: commons-user@jakarta.apache.org Subject: [jxpath] namespace registration not remembered for JXPathContext.getRelativeContext MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: DSMILEY@mitre.org X-Virus-Checked: Checked by ClamAV on apache.org 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: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org