Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 32867 invoked from network); 1 May 2005 20:19:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 May 2005 20:19:05 -0000 Received: (qmail 64630 invoked by uid 500); 1 May 2005 20:20:28 -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 64615 invoked by uid 99); 1 May 2005 20:20:28 -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 david.nuescheler@gmail.com designates 64.233.170.192 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.192) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 01 May 2005 13:20:28 -0700 Received: by rproxy.gmail.com with SMTP id y7so968027rne for ; Sun, 01 May 2005 13:19:01 -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=LrAmPtVUUCkGrZ2KLswpO9XFoN0Xg4BIbaJudasxsHB4QXF889TMJicOx/yK4rzmMmHtGnFenEdvGimNfp8gvp2yo6COEIS7BHiK0Tnjq/tkFbG/zVdoVFj9SimFr6jJHW6oAFBPJbTCqe0CHJLvB5HYkaTy4UQl/36UtgglJw8= Received: by 10.38.14.1 with SMTP id 1mr5644837rnn; Sun, 01 May 2005 13:19:01 -0700 (PDT) Received: by 10.38.11.73 with HTTP; Sun, 1 May 2005 13:19:01 -0700 (PDT) Message-ID: Date: Sun, 1 May 2005 22:19:01 +0200 From: David Nuescheler Reply-To: david.nuescheler@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 a lot. good point. i will investigate. regards, david 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 >=20 --=20 ---------------------------------------------------------------------- standardize your content-repository ! http://www.jcp.org/en/jsr/detail?id=3D170 ---------------------------------------< david.nuescheler@day.com >--- This message is a private communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and then delete it from your system. Thank you. The sender does not assume any liability for timely, trouble free, complete, virus free, secure, error free or uninterrupted arrival of this e-mail. For verification please request a hard copy version. mailto:david.nuescheler@day.com http://www.day.com David Nuescheler Chief Technology Officer Day Software AG Barfuesserplatz 6 / Postfach 4001 Basel Switzerland T 41 61 226 98 98 F 41 61 226 98 97