jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daglian, Michael \(IT\)" <Michael.Dagl...@morganstanley.com>
Subject RE: Xpath "or queries"
Date Sat, 01 Apr 2006 01:25:06 GMT
Hi Alex,

Thanks for the reply. Actually, I am not quite sure if the spec quote
reads in the way you've described but that actually is a separate issue
here (although clarification on the interpretation of the spec quote
would also be appreciated). The same result occurs with any expressions
in the or clause (e.g. /jcr:root/foo or /jcr:root/bar).

Best Regards,

-- Mike

> -----Original Message-----
> From: Alexandru Popescu [mailto:the.mindstorm.mailinglist@gmail.com] 
> Sent: Friday, March 31, 2006 8:07 PM
> To: dev@jackrabbit.apache.org
> Subject: Re: Xpath "or queries"
> 
> According to 6.6.3.2 Type constraint:
> 
> [quote]
> Implementations are required to support constraints of one 
> primary type. It is optional to support constraints based on 
> multiple primary node types (this would, in any case, only be 
> applicable to implementations that supported multiple 
> inheritance of node types). It is also optional to support 
> constraints on (one or more) mixin node types.
> [/quote]
> 
> so I would say that only the 1st form is guaranteed to work.
> 
> hth,
> 
> ./alex
> --
> .w( the_mindstorm )p.
> 
> 
> On 4/1/06, Daglian, Michael (IT) 
> <Michael.Daglian@morganstanley.com> wrote:
> > Hi everyone,
> >
> > I was wondering what the proper syntax is for executing or 
> statements 
> > within an xpath query. According to the spec something like the 
> > following should be possible (although totally contrived in 
> this case):
> >
> > //element(*, nt:file) or //element(*, mix:lockable)
> >
> > However, this throws a ClassCastException in the 
> XPathQueryBuilder on 
> > line 322 (it appears that in the invocation of the visit method the 
> > SimpleNode id indicates a type of JJTROOTDESCENDANTS at a certain 
> > point but the data is actually an OrQueryNode and hence the 
> cast to a 
> > PathQueryNode fails). I am using the 0.9 release currently. 
> Apologies 
> > if this question was previously discussed or fixed in a 
> post 0.9 candidate.
> > Thanks!
> >
> > Best Regards,
> >
> > -- Mike
> > --------------------------------------------------------
> >
> > NOTICE: If received in error, please destroy and notify 
> sender.  Sender does not waive confidentiality or privilege, 
> and use is prohibited.
> >
>
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality
or privilege, and use is prohibited.

Mime
View raw message