Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 47709 invoked from network); 27 Jan 2006 19:00:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jan 2006 19:00:39 -0000 Received: (qmail 38351 invoked by uid 500); 27 Jan 2006 19:00:35 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 38340 invoked by uid 99); 27 Jan 2006 19:00:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2006 11:00:35 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [207.214.146.149] (HELO cos-svr.polivec.com) (207.214.146.149) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2006 11:00:34 -0800 X-MIMEOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Query by node name Date: Fri, 27 Jan 2006 11:00:13 -0800 Message-ID: <15CD2397F4339A449B77B12B112E969B42C723@cos-svr.polivec.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Query by node name Thread-Index: AcYdsvJX+SRg6VTnRkiZqkdH6yCyoQFuGAlA From: "Joan Xiao" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, I'm having some problem when I try to query the repository by node name. I have a custom node type, say my:file, which extends nt:file. And I'm able to add nodes of this custom node type and then retrieve them successfully. Now I need to determine whether a node of certain name exists in the repository. If I use the query string: //element(*, my:file), it correctly returns all nodes of the type my:file. So suppose I have a node of this type with path /Documents/test.txt, it does get returned. But if I replace * by a node name, i.e., //element(test.txt, my:file), it doesn't return anything even though the file exists and is returned from the previous query.=20 I've also tried the following queries: /Documents//element(*, my.file): returns nothing /Documents//element(test.txt, my.file): returns nothing /jcr:root//element(*, my.file): returns nothing /jcr:root/Documents//element(*, my.file): returns nothing /jcr:root/Documents//element(test.txt, my.file): returns nothing I've also tried to use SQL query, but the result is consistent with XPATH. Is there anything I'm doing wrong here? Thanks for any help. Joan