jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Nuescheler <david.nuesche...@gmail.com>
Subject Re: xpath property clarifications
Date Sun, 01 May 2005 20:19:01 GMT
hi ryan,

thanks a lot. good point. i will investigate.

regards,
david

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
> 
> 


-- 
----------------------------------------------------------------------
standardize your content-repository !
                               http://www.jcp.org/en/jsr/detail?id=170
---------------------------------------< 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

Mime
View raw message