Thanks for the helpful reply, Jukka. I also think that for unsupported constructs an appropriate exception should be thrown.
I hope that in the JCR 2 specifications the query language will be required to
be more powerful as this is really a key in many usecases.
Just if you are interested, my usecase is to store ACL in the nodes in the
node hierarchy:
/my-node1 (someProperty = ...)
/acl
/owner (username = ...)
/entries
/acl-entry
/sid (nodeType = userSid, username = ...)
/other-subnodes
/my-node2
...
For my-node listing purposes it is necessary for query engine to support:
- query nodes that can be accessed by current user
- apply user filter (applied to node and its subnode properties)
- sorting
- pagination (limit offset)
I am not 100% sure, but AFAIK child-axis predicates were not supported in some
near previous version (at least they didn't work for me). Now it seems that
they work sufficiently to support child axis filtering, which is also kind of
superset of ACL matching. And I am also glad that sorting and proprietary
Jackrabbit's implementation dependent pagination is supported.
Thanks
On Tue 6. May 2008 20:21:53 Jukka Zitting wrote:
> Hi,
>
> On Mon, May 5, 2008 at 9:57 AM, Martin Zdila <[EMAIL PROTECTED]>
wrote:
> > I have nodes named "aaa" and if I execute XPath query
> > "//aaa[nonexistingnode] then all "aaa" nodes are returned regardless if
> > they contain nonexisting node or not. Is that a bug?
>
> The JCR spec doesn't require support for such queries, and though we
> have added some support for the child axis within predicates (see for
> example JCR-247), there still are a number of cases like this that
> don't work.
>
> You can file a feature request for such child node existence
> predicates, or a bug report for the fact that such unsupported queries
> are not rejected by the Jackrabbit query manager.
>
> > Second strange thing: //*[name() = 'aaa'] returns nothing even I have
> > nodes named "aaa" in my repository.
>
> Try //*[fn:name() = 'aaa'], see JCR-857.
>
> Again, Jackrabbit should reject queries with functions or other
> constructs that are not supported.
>
> > Third strange thing: if I execute //*[aaa] query, then
> > nodeIterator.getSize() returns -1. Another bug?
>
> A feature. RangeIterator.getSize() is allowed to return -1 in case the
> size of the collection is unknown.
>
> BR,
>
> Jukka Zitting
--
Martin Zdila
CTO
M-Way Solutions Slovakia s.r.o.
Letna 27, 040 01 Kosice
Slovakia
tel:+421-908-363-848
mailto:[EMAIL PROTECTED]
http://www.mwaysolutions.com
xmpp:[EMAIL PROTECTED] (Jabber)
skype:m.zdila
smime.p7s
Description: S/MIME cryptographic signature
