El vie, 16-02-2007 a las 14:38 +0100, Marcel Reutegger escribió: > Paco Avila wrote: > > I think this two queries are "equivalents" because both search in the > > node content, but the results are differents: > > > > //element(*,okm:document)/@jcr:path[jcr:contains(okm:content,'apache')] > > order by @jcr:score descending > > > > //element(*,okm:resource)/@jcr:path[jcr:contains(.,'apache')] order by > > @jcr:score descending > > The queries actually look malformed. Shouldn't it read: > > //element(*,okm:document)[jcr:contains(okm:content,'apache')] > order by @jcr:score descending > > and > > //element(*,okm:resource)[jcr:contains(.,'apache')] > order by @jcr:score descending
No, the queries are ok: i want to get only the jcr:path property. And they work fine. > But even then, the nodes in the query result will be different because of the > element() node test. the first query will return okm:document nodes, whereas > the > second query will return okm:resource nodes. More or less, but every okm:document have a okm:content subnode. Both queries return the same number of nodes, but I think that the ordering should be equal because both check the same content node. -- GIT Consultors S.L. c\ Francesc Rover 2-B 07003 Palma de Mallorca (Illes Balears)
