jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Dewell" <r...@dewell.org>
Subject Re: xpath property clarifications
Date Tue, 10 May 2005 05:30:40 GMT
Hi Peeter,

Thanks for taking a look at that.  I found another one today, so I thought 
I'd go ahead and mention it here:

-------
6.6.4.4
//section/para[@type='warning'] order by title ascending
-------

I think title should be @title.

Ryan



"Peeter Piegaze" <peeter.piegaze@gmail.com> wrote in message 
news:3df33a25050502042957c47876@mail.gmail.com...
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 <ryan@dewell.org> wrote:
> Hi David,
>
> Here are a few examples from the spec where properties are referenced
> without a preceding "@", or are discussed in a inconsistent way (IMHO):
>
> -------------
>
> 6.6.4.2
> //myapp:title[jcrfn:contains("JCR")]
>
> From the example XML view, myapp:title is a Property not a Node.
>
> -------------
>
> 6.6.4.1
>
> //para[jcrfn:like(title,'%Java%')]
>
> In contrast, the deref function example passes '@' preceding the property
> name.
>
> -------------
> 6.6.4.3
>
> 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:
>
> ""A query expression to find the person's last name property would be:
>
> //myapp:myDoc/deref(@myapp:author, 'myapp:person')/lastName
>
> The dereference expression above evaluates to a node which has
>
> the name myapp:person. Subsequently a child node or property of
>
> person's last name is selected.""
>
> So which is it?  A child node or a property?  :)
>
> -------------
>
> "David Nuescheler" <david.nuescheler@gmail.com> wrote in message
> news:eb7e21905043013245a7ba716@mail.gmail.com...
>
> hi ryan,
>
> > 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?)
>
> > Many examples in the specification seem to use one or the other other
> > depending on the context (can provide examples if needed), but are 
> > always
> > referring to a property.  What is the criteria for knowing when and 
> > where
> > to
> > prefix a Property name with "@", or has this been clarified in versions
> > beyond the last public draft?
>
> 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 
> very
> different characteristics than xpath.
>
> 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.
>
> regards,
> david
>
>




Mime
View raw message