I'm also interested in this question. Which alternative is proposed by JCR 2.0 ?

On Thu, Jul 7, 2011 at 5:38 PM, Alexander Klimetschek <aklimets@adobe.com> wrote:
It is only deprecated in the JCR 2.0 spec (and hence the javax.jcr api
docs), but Jackrabbit will continue to support it, since a lot of apps on
top of Jackrabbit make use of Xpath as the primary query language.

Cheers,
Alex

On 07.07.11 08:21, "g. raaja" <raaja09@gmail.com> wrote:

>Hi,
>
>Its showing Query.XPATH is deprecated and in API its showing
>
>*Deprecated. As of JCR 2.0, this language is deprecated.*
>
>my code is: This is for adding spellcheck
>
>*QueryManager qm = jcrSession.getWorkspace().getQueryManager();
>Query query =
>qm.createQuery("/jcr:root[rep:spellcheck('"+content+"')]/(rep:spellcheck()
>)",
>Query.XPATH);*
>
>and in another condition
>
>*QueryManager qm = jcrSession.getWorkspace().getQueryManager();
>stmt1 ="//element(*,nt:resource)[jcr:contains(.,'"+content+"')]";
>Query q = qm.createQuery(stmt1, Query.XPATH)*;
>
>I am not getting an idea what I have to use instead of this.
>
>Please guide me what to use in the place of this Query.XPATH.
>
>Thanking you.
>
>--raaja g
>
>--
>View this message in context:
>http://jackrabbit.510166.n4.nabble.com/what-we-have-to-use-instead-of-Quer
>y-XPATH-tp3650763p3650763.html
>Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
>



--
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel




--
OpenKM
http://www.openkm.com
http://www.guia-ubuntu.org