From dev-return-6535-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Mon Apr 03 07:13:52 2006 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 38365 invoked from network); 3 Apr 2006 07:13:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Apr 2006 07:13:52 -0000 Received: (qmail 78004 invoked by uid 500); 3 Apr 2006 07:13:51 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 77629 invoked by uid 500); 3 Apr 2006 07:13:50 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 77620 invoked by uid 99); 3 Apr 2006 07:13:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Apr 2006 00:13:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 03 Apr 2006 00:13:49 -0700 Received: (qmail invoked by alias); 03 Apr 2006 07:13:27 -0000 Received: from bsl-rtr.day.com (EHLO [10.0.0.58]) [212.249.34.130] by mail.gmx.net (mp030) with SMTP; 03 Apr 2006 09:13:27 +0200 X-Authenticated: #894343 Message-ID: <4430C0DE.5000601@gmx.net> Date: Mon, 03 Apr 2006 08:29:50 +0200 From: Marcel Reutegger User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: dev@jackrabbit.apache.org Subject: Re: Xpath "or queries" References: <1F8E762E1B3F814F9630D0D32A1C65F8251675@NYWEXMB81.msad.ms.com> In-Reply-To: <1F8E762E1B3F814F9630D0D32A1C65F8251675@NYWEXMB81.msad.ms.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Daglian, Michael (IT) wrote: > I was wondering what the proper syntax is for executing or statements > within an xpath query. According to the spec something like the > following should be possible (although totally contrived in this case): > > //element(*, nt:file) or //element(*, mix:lockable) from a pure syntactic standpoint this allowed by the spec. however there are a number of constraints that also apply to a query in order to make it mappable to SQL. One of these constraints is that only one path expression must be supported. the union of two path expression like the one above is not supported by jackrabbit. there are discussions in the expert group of jsr-283 on extended query features that should become mandatory in JCR 2.0. Supporting the union operator is IMO an extension that definitively makes sense. But more about this topic on a separate email thread... > However, this throws a ClassCastException in the XPathQueryBuilder on > line 322 (it appears that in the invocation of the visit method the > SimpleNode id indicates a type of JJTROOTDESCENDANTS at a certain point > but the data is actually an OrQueryNode and hence the cast to a > PathQueryNode fails). I am using the 0.9 release currently. This is certainly a bug in the query builder. could you please file a jira issue? Thanks. regards marcel