Michal Hybler wrote:
I have a problem with xpath I have code:

String s = "//*"; query = manager.createQuery(s,Query.XPATH);
                        QueryResult result = query.execute();
                        NodeIterator it = result.getNodes();

but thid code doesnt return all nodes but only root node
when I used sql String s = "select * from nt:unstructured"
it was working good.

anyone knows where can be a problem?

The above code works fine for me and returns all nodes in the workspace. What version of jackrabbit are you using?

please note that the two queries are not equivalent. //* in xpath is equivalent to 'select * from nt:base' in sql.

or the other way round: 'select * from nt:base' is equivalent to //element(*, nt:unstructured' in xpath.

another question how can i use sql for searching nodes with sql for
properties? where can i find syntax of sql for jackrabbit?

it's in the jsr 170 spec ;)

regards
 marcel

Reply via email to