2008/6/16 16:47:25 marcel wrote:
> looks like jackrabbit is not in line with the spec, because jackrabbit does
> consider mixin types in the element() node test.
>
> there's something else that is strange. ocm:file2 is defined as a mixin, but
> is
> later used in the code as a primary type to create a node. shouldn't that be
> prevented?
It's no my invention. I'm using Jackrabbit OCM, its query implementation always
element() for type constrain whether the node type is mixin or not:
//org.apache.jackrabbit.ocm.query.impl.QueryManagerImpl
public String buildJCRExpression(Query query) {
...
String jcrExp = "";
// Add scope & node name
if (((filter.getScope() != null) && (!filter.getScope().equals("")))) {
jcrExp += "/jcr:root" + filter.getScope() + "element(" +
filter.getNodeName() + ", ";
}
else {
jcrExp += "//element(" + filter.getNodeName() + ", ";
}
// Add node type
jcrExp += this.getNodeType(filter) + ") ";
...
}
___________________________________________________________
雅虎邮箱,您的终生邮箱!
http://cn.mail.yahoo.com/