jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Perez" <mper...@gmail.com>
Subject Error with XPath queries
Date Thu, 06 Apr 2006 20:29:21 GMT
Hi.

I think I found a bug with RC3 and XPath queries. Correct me if I'm wrong, I
will try to describe it as good as possible.

On my workspace, the next query does not returns any results:
"/jcr:root//element(*,jlib:jlibrary)[@jlib:id]"

That is fine as the workspace should not have any node with a jlib:id
property.  The property jlib:id is defined for the jlib:jlibrary nodetype
that acts like a base type on my hierarchy.

But, the problem comes with the next query: "/jcr:root//*[@jlib:id]"

This query, on the same workspace without any changes, return a single
result. The result is of jlib:category that is a subtype of jlib:jlibrary,
and so the isNodeType(jlib:jlibrary) method returns true. And even more
interesting, if I perform a getProperty(jlib:id) method call, then I get a
PathNotFoundException. Of course, I have looked on the property state and
the node really do not have that property, but anyways the query returns
that single result!

Seems weird for me. Am I missing something?

Martin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message