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 Sat, 30 Apr 2005 21:25:30 GMT
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):


>From the example XML view, myapp:title is a Property not a Node.



In contrast, the deref function example passes '@' preceding the property 


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

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
be looked at as a folder and property could be looked at as a file.


View raw message