cancel
Showing results for 
Search instead for 
Did you mean: 

JSR-170 Querying support

maksim
Champ in-the-making
Champ in-the-making
Hi,
I've tried to execute simple query which selects nodes by assigned mix-in … but fail …
Here is my query (almost one-to-one copied from JSR-170 spec):

//element(*, {my.new.model}:imageClassification)

Where {my.new.model}:imageClassification is a mix-in name.

The result is an exception:
org.jaxen.saxpath.XPathSyntaxException: //element(*, {my.new.model}:imageClassification): 10: Expected node-type


However executing regular XPath query //{my.new.model}:imageClassification works fine.

Do I do something incorrectly or it means that JSR-170 XPath syntax is not supported in current Alfresco version?
If so… when it can be expected?

Thank you in advance
Max
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise
Hi

I think this is my issue as the implementation tests for type as opposed to types and aspects. I will recheck the JSR 170 spec and fix accordingly.


I have raised this as AR-244

Regards

Andy

andy
Champ on-the-rise
Champ on-the-rise
Hi

I have just checked the 170 spec (6.6.4.13 to be precise).
The element node test is for the node primary type not mixins.
I do not think there is any support for this in 170.

Using name space prefixes you would have

myModel:myType

Using explicit namespaces you would have
{http://some.url.to/my/model}myType

I am not sure if this is giving you the parse error.

You could use a query direct to the lucene index to do the same job if you are not fixed to 170.

Regards

Andy