Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1DE929105 for ; Tue, 3 Apr 2012 12:18:57 +0000 (UTC) Received: (qmail 62509 invoked by uid 500); 3 Apr 2012 12:18:56 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 62463 invoked by uid 500); 3 Apr 2012 12:18:56 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 62455 invoked by uid 99); 3 Apr 2012 12:18:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 12:18:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jukka.zitting@gmail.com designates 209.85.212.172 as permitted sender) Received: from [209.85.212.172] (HELO mail-wi0-f172.google.com) (209.85.212.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 12:18:50 +0000 Received: by wibhj6 with SMTP id hj6so3596840wib.1 for ; Tue, 03 Apr 2012 05:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=/aigq4pV1j6TC4H+KFmTJ/EXTlqIUJZfy/s2lSuYwvU=; b=ZLgXejZZu0pA6oT5ZMZK/T/S/fL6YJp2+NJSApkg39mbxLPwZLCl5RSMPbpiaKHdqQ qGUyX9h7a1F+/pcSiBNrNkUWCaxxsIg218dng6WOx7FFACVlVjU+SSHQrMfZkPDTzaTI JfIAtYthQYfqksmc1/NTYmG5PwgnMHS1pUGBgDmx+IA8Vs+cLRVN5tGxDFm4p8CNWBIp eVD3pfqTwz0s14BMngZE7Z8vB9cAF40KGGIDKRJNkI9lcbPnoVodjrVbkV9d6z9zC1gJ EJk1l7JNChWi5P6iq++2llT4p2gtJRpfZhDJAsR7K9m7NsC3quLj8zDwxPA6AOX5VKmH EFNg== Received: by 10.180.101.8 with SMTP id fc8mr35971765wib.12.1333455509002; Tue, 03 Apr 2012 05:18:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.84.199 with HTTP; Tue, 3 Apr 2012 05:18:08 -0700 (PDT) In-Reply-To: References: From: Jukka Zitting Date: Tue, 3 Apr 2012 14:18:08 +0200 Message-ID: Subject: Re: Converting XPath to SQL-2 To: oak-dev@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi, On Tue, Apr 3, 2012 at 2:09 PM, Thomas Mueller wrote: > =A0 =A0/jcr:root/content//*[@test=3D'hello'] I think that should be: select * from [nt:base] where [test]=3D'hello' and (isdescendantnode('/content') or issamenode('/content')) Or alternatively we come up with an extra constraint: select * from [nt:base] where [test]=3D'hello' and isdescendantorsamenode('/content') BR, Jukka Zitting