From jackrabbit-dev-return-1924-apmail-incubator-jackrabbit-dev-archive=www.apache.org@incubator.apache.org Mon May 02 11:29:48 2005 Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 61343 invoked from network); 2 May 2005 11:29:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 May 2005 11:29:48 -0000 Received: (qmail 69975 invoked by uid 500); 2 May 2005 11:31:11 -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 69958 invoked by uid 99); 2 May 2005 11:31:11 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of peeter.piegaze@gmail.com designates 64.233.184.196 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.196) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 02 May 2005 04:31:10 -0700 Received: by wproxy.gmail.com with SMTP id 69so1315276wra for ; Mon, 02 May 2005 04:29:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dPxe0OY3KHN3WePRO4sVg09dzxOmWLXY1qrjYO7F04raoFRyTqupKJ5lPICJOeT1vQ98E+GQnBQiwe4M1zBikPrfaua4owFAJDW19r/Bcel5VKAySDNYhod/R+BipF4EATRZ7pF//VHzvvxEVUv0/r68d2w7xMoDpoPxoelzDng= Received: by 10.54.123.8 with SMTP id v8mr594420wrc; Mon, 02 May 2005 04:29:44 -0700 (PDT) Received: by 10.54.101.15 with HTTP; Mon, 2 May 2005 04:29:44 -0700 (PDT) Message-ID: <3df33a25050502042957c47876@mail.gmail.com> Date: Mon, 2 May 2005 13:29:44 +0200 From: Peeter Piegaze Reply-To: peeter.piegaze@day.com To: jackrabbit-dev@incubator.apache.org Subject: Re: xpath property clarifications In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Ryan, Thanks for finding those inconsistencies, they have been fixed for the next release of the spec. Cheers, Peeter On 4/30/05, Ryan Dewell wrote: > Hi David, >=20 > Here are a few examples from the spec where properties are referenced > without a preceding "@", or are discussed in a inconsistent way (IMHO): >=20 > ------------- >=20 > 6.6.4.2 > //myapp:title[jcrfn:contains("JCR")] >=20 > From the example XML view, myapp:title is a Property not a Node. >=20 > ------------- >=20 > 6.6.4.1 >=20 > //para[jcrfn:like(title,'%Java%')] >=20 > In contrast, the deref function example passes '@' preceding the property > name. >=20 > ------------- > 6.6.4.3 >=20 > Here's a really confusing paragraph in its varying use of the word > "property". Notice how lastName does not have a @ in front of it: >=20 > ""A query expression to find the person's last name property would be: >=20 > //myapp:myDoc/deref(@myapp:author, 'myapp:person')/lastName >=20 > The dereference expression above evaluates to a node which has >=20 > the name myapp:person. Subsequently a child node or property of >=20 > person's last name is selected."" >=20 > So which is it? A child node or a property? :) >=20 > ------------- >=20 > "David Nuescheler" wrote in message > news:eb7e21905043013245a7ba716@mail.gmail.com... >=20 > hi ryan, >=20 > > I'm having a hard time understanding from the specification how to know > > when > > a javax.jcr.Property should be referenced in xpath as: > > 1) @firstName > > or > > 2) firstName > xpath is only used in the query section. whenever you use xpath > for querying the repository you use an @ > there are probably no examples that refer to using a property in xpath > without an @. > (or can point out an example in the spec?) >=20 > > Many examples in the specification seem to use one or the other other > > depending on the context (can provide examples if needed), but are alwa= ys > > referring to a property. What is the criteria for knowing when and whe= re > > to > > prefix a Property name with "@", or has this been clarified in versions > > beyond the last public draft? >=20 > a "content repository path" on the other hand which is used thoughout > the entire api to identify a single item in the content repository has ve= ry > different characteristics than xpath. >=20 > the repository path is comparable to a filesystem path, in which a node > could > be looked at as a folder and property could be looked at as a file. >=20 > regards, > david >=20 >