jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Waschkowski" <mwaschkow...@gmail.com>
Subject Re: difference between xpath searches
Date Thu, 28 Jun 2007 13:03:37 GMT
Hi Felix,

Ya, I hear what you are saying, and respect it. As a user and a developer
who sees significant similarities between the two node retrieval methods I
just believe they should have similar semantics (and just because the spec
says that its this way doesn't make it right ;)

Thank you very much for your insights, you've been very helpful.

Best,

Mark

On 6/28/07, Felix Meschberger <Felix.Meschberger@day.com> wrote:
>
> Hi Mark,
>
> I just reiterate, what has been said before: The argument to the
> Node.getNode(String path) method is NOT an xpath query, so the results are
> not expected to be the same. Also, the specification is different for the
> getNode method and Query.execute methods.
>
> All in all, there is no inconsistency between the two functionalities,
> because they are completely different. The two are two ways of achieving
> different goals, they are by no means two ways to achieve the same goal.
>
> Regards
> Felix
>
> On 6/27/07, Mark Waschkowski <mwaschkowski@gmail.com> wrote:
> >
> > Hi,
> >
> > Thanks Jukka and Felix for the clarifications. I understand now that the
> > call to getNode cannot be a query. Please allow me to restate:
> >
> > Node retrieval is not handled consistently when retrieving nodes using
> an
> > xpath that refers to a particular location within the repository.
> >
> > For example do the following:
> > 0) define xpath == '/documents/contacts'
> > 1) create a session
> > 2) add a node in documents/contacts
> > 3) retrieve your nodes by using 3a or 3b
> > 3a)
> >   session.getRootNode().getNode(xpath).getNodes()
> > 3b)
> >     Workspace ws = session.getWorkspace();
> >     QueryManager qm = ws.getQueryManager();
> >     Query q = qm.createQuery(xpath, Query.XPATH);
> >     NodeIterator iter = q.execute().getNodes();
> >
> > You will, as mandated by the spec, get different results! I believe that
> > the
> > nodes returned should be consistent regardless of Node retrieval access,
> > either both with the added node, or both without.
> >
> > Best,
> >
>



-- 
Best,

Mark Waschkowski

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message