Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 81450 invoked from network); 27 Jun 2007 21:15:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jun 2007 21:15:01 -0000 Received: (qmail 44395 invoked by uid 500); 27 Jun 2007 21:15:02 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 44378 invoked by uid 500); 27 Jun 2007 21:15:02 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 44369 invoked by uid 99); 27 Jun 2007 21:15:02 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2007 14:15:02 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mwaschkowski@gmail.com designates 64.233.166.176 as permitted sender) Received: from [64.233.166.176] (HELO py-out-1112.google.com) (64.233.166.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2007 14:14:58 -0700 Received: by py-out-1112.google.com with SMTP id d32so753167pye for ; Wed, 27 Jun 2007 14:14:36 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=P1NVVfPFOK/Qemb3aoGdJeMRzL88s/rK6v7hCUbIjIcnZUSXzQ2vx+llAZxpHYRJf1a49C9juP8MMGzApB/ZlTOWefObdUGXaLT4a48pLnrwTx45PZtpRDH2O2swaR5M2eOYi77BysMuq0fZP6bT05vsCRUZtVOFl8C38tsdfwo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=fjXvc5Zs5hcUGKXthgMRAucRzlDQwvRR249nfgZT6QyWvXM4tuBBAQJ+aEia5ocjcada9E0FRaIsHx1EKt4ykd6TT5Rkok3adVFM/O1aZe+s1YYakvth9fYzUHM4RqLKVW7nzi3GnZ56FDAeRapgLRb5bnqXKrSmRoS4iLI/A1c= Received: by 10.65.119.14 with SMTP id w14mr1775928qbm.1182978876117; Wed, 27 Jun 2007 14:14:36 -0700 (PDT) Received: by 10.65.148.15 with HTTP; Wed, 27 Jun 2007 14:14:36 -0700 (PDT) Message-ID: <76a6ebd00706271414k28665f17ia5ea83b10039eed8@mail.gmail.com> Date: Wed, 27 Jun 2007 17:14:36 -0400 From: "Mark Waschkowski" To: users@jackrabbit.apache.org Subject: Re: difference between xpath searches In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_29988_23165024.1182978876074" References: <76a6ebd00706261121i90b040fiec371af4294b1112@mail.gmail.com> <76a6ebd00706270540o2ceccd81p901f2a2972a605e9@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_29988_23165024.1182978876074 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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, Mark On 6/27/07, Felix Meschberger wrote: > > Hi Mark, > > On 6/27/07, Mark Waschkowski wrote: > > > > Hi Felix, > > > > Thanks for the response. Please allow me to clarify the first point, I'm > > actually referring to exactly what is stated, the getNode(xPath) method. > I > > see an xpath statement as a type of search because any given xpath may > be > > a > > simple path, but often includes some kind of criteria for the result > set. > > > Thanks for the clarification. Now, there is another misconception, > unfortunately. The path argument to the Node.getNode(String) method is not > an XPath querry but a relative path with no pattern characters allowed. > This > is for direct addressing of a single child (or descendent) node. This > method > just walks down the node hierarchy without applyiing any pattern matching. > > Regards > Felix > -- Best, Mark Waschkowski ------=_Part_29988_23165024.1182978876074--