commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: [jxpath] namespace registration not remembered for JXPathContext.getRelativeContext
Date Thu, 24 May 2007 04:06:47 GMT
I assume you're using JXPath 1.2 .  This feature was
implemented shortly after its release, so you can use
it in the forthcoming 1.3 version.

HTH,
Matt

--- David Smiley <DSMILEY@mitre.org> wrote:

> 
> 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
> 
> 



      ____________________________________________________________________________________Fussy?
Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message