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 EA3389A82 for ; Tue, 3 Apr 2012 12:09:42 +0000 (UTC) Received: (qmail 3549 invoked by uid 500); 3 Apr 2012 12:09:35 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 3520 invoked by uid 500); 3 Apr 2012 12:09:35 -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 3470 invoked by uid 99); 3 Apr 2012 12:09:35 -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:09:35 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mueller@adobe.com designates 64.18.1.208 as permitted sender) Received: from [64.18.1.208] (HELO exprod6og107.obsmtp.com) (64.18.1.208) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 12:09:27 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob107.postini.com ([64.18.5.12]) with SMTP ID DSNKT3roYfto+4iweNh0AnPkeGIoqyXMxR1r@postini.com; Tue, 03 Apr 2012 05:09:06 PDT Received: from inner-relay-4.eur.adobe.com (inner-relay-4b [10.128.4.237]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q33C94v7027681 for ; Tue, 3 Apr 2012 05:09:04 -0700 (PDT) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id q33C922c013141 for ; Tue, 3 Apr 2012 05:09:04 -0700 (PDT) Received: from eurcas01.eur.adobe.com (10.128.4.27) by nacas01.corp.adobe.com (10.8.189.99) with Microsoft SMTP Server (TLS) id 8.3.192.1; Tue, 3 Apr 2012 05:09:03 -0700 Received: from eurmbx01.eur.adobe.com ([10.128.4.32]) by eurcas01.eur.adobe.com ([10.128.4.27]) with mapi; Tue, 3 Apr 2012 13:09:02 +0100 From: Thomas Mueller To: "oak-dev@jackrabbit.apache.org" Date: Tue, 3 Apr 2012 13:09:00 +0100 Subject: Re: Converting XPath to SQL-2 Thread-Topic: Converting XPath to SQL-2 Thread-Index: Ac0Rko5/TqXvcHjUSHegc/38TRcS+w== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.14.0.111121 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi, >The //* expression matches all nodes, so no need to map it to any >specific constraint. I see it was a bad example... What if it's not the root itself, for example: /jcr:root/content//*[@test=3D'hello'] This XPath query includes the node "content". The SQL-2 query select * from [nt:base] where [test]=3D'hello' and isdescendantnode('/content') would exclude the node "content" itself AFAIK. So what would be the right SQL-2 query here? Regards, Thomas