cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS: How to escape dashes in property names

cseickel
Confirmed Champ
Confirmed Champ

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 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

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

View answer in original post

2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator

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
Confirmed Champ
Confirmed Champ

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