I am trying to create a cmis query that includes a property with dashes in the name, but I get errors like this one whenever I include that column. The property is sf.smf:system-template-location, and this is the error I get:
line 1:97 no viable alternative at character 't'
I tried escaping it with \ and \\ but it does not help. Is there another type of escape I should be using for dashes in property names?
Thanks,
Chris
Solved! Go to Solution.
I have looked into the CMIS query parser definition and there appears to be no support for escaping dashes, and dashes are not supported (as per your error) in the name of a column. The CMIS spec itself does not forbid the use of a dash in a query name, but both Alfresco and OpenCMIS have implemented their parsers to be more restrictive, likely to comply with what the CMIS spec mentions as "string SHOULD NOT contain any characters that negatively interact with the BNF grammar". I can see how a dash could negatively interact with the BNF grammar..
I have looked into the CMIS query parser definition and there appears to be no support for escaping dashes, and dashes are not supported (as per your error) in the name of a column. The CMIS spec itself does not forbid the use of a dash in a query name, but both Alfresco and OpenCMIS have implemented their parsers to be more restrictive, likely to comply with what the CMIS spec mentions as "string SHOULD NOT contain any characters that negatively interact with the BNF grammar". I can see how a dash could negatively interact with the BNF grammar..
Thank you for taking the time to look into this. It's not what I was hoping to hear, but it was extremely helpful.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.