CMIS: How to escape dashes in property names

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
cseickel
Active Member II

CMIS: How to escape dashes in property names

Jump to solution

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

1 Solution

Accepted Solutions
afaust
Master

Re: CMIS: How to escape dashes in property names

Jump 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..

2 Replies
afaust
Master

Re: CMIS: How to escape dashes in property names

Jump 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..

cseickel
Active Member II

Re: CMIS: How to escape dashes in property names

Jump to solution

Thank you for taking the time to look into this.  It's not what I was hoping to hear, but it was extremely helpful.