<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CMIS Select AS (alias) and text-qualifying spaces in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cmis-select-as-alias-and-text-qualifying-spaces/m-p/263681#M216811</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working through some scenarios with CMIS, and I ran into this scenario – not sure if this is CMIS spec oriented, or Alfresco impl, but hopefully at least raising it up unless someone else found a workaround:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Intent: Return the 'Display Name' as the alias for each return column.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;String query1 = "SELECT " + propertyDefinition.getId(); //works&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;String query2 = "SELECT " + propertyDefinition.getId() + " AS '" + propertyDefinition.getDisplayName()+"' "; //surrounding with single quotes for displayname with spaces failing with errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;String query3 = "SELECT " + propertyDefinition.getId() + " AS \"" + propertyDefinition.getDisplayName()+"\" "; //surrounding with double quotes for displaynames with spaces failing with errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;String query4 = "SELECT " + queryFragment.append(propertyDefinition.getId() + " AS z_" + propertyDefinition.getLocalName(); //localName seems to always be a single word (no space).&amp;nbsp; Error with cmis:name's localname of 'name', so prefix with z_ worked around for demonstration purposes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Summary: I do not seem to be able to provide column alias on the SELECT portion that contains spaces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Darren&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jan 2013 19:49:26 GMT</pubDate>
    <dc:creator>dhartford</dc:creator>
    <dc:date>2013-01-03T19:49:26Z</dc:date>
    <item>
      <title>CMIS Select AS (alias) and text-qualifying spaces</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cmis-select-as-alias-and-text-qualifying-spaces/m-p/263681#M216811</link>
      <description>Hey all,I'm working through some scenarios with CMIS, and I ran into this scenario – not sure if this is CMIS spec oriented, or Alfresco impl, but hopefully at least raising it up unless someone else found a workaround:Intent: Return the 'Display Name' as the alias for each return column.String quer</description>
      <pubDate>Thu, 03 Jan 2013 19:49:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cmis-select-as-alias-and-text-qualifying-spaces/m-p/263681#M216811</guid>
      <dc:creator>dhartford</dc:creator>
      <dc:date>2013-01-03T19:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS Select AS (alias) and text-qualifying spaces</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cmis-select-as-alias-and-text-qualifying-spaces/m-p/263682#M216812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That is correct. You cannot use a column alias that contains a space. According to the spec, a column alias must conform to the same rules as the query name. Here are the rules for query names as specified in the 1.1 draft:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;All properties MUST supply a string queryName attribute which is used for query and filter operations on&lt;BR /&gt;object-types. This is an opaque string with limitations. This string SHOULD NOT contain any characters&lt;BR /&gt;that negatively interact with the BNF grammar.&lt;BR /&gt;The string MUST NOT contain:&lt;BR /&gt;• whitespace " "&lt;BR /&gt;• comma ","&lt;BR /&gt;• double quotes '"'&lt;BR /&gt;• single quotes "'"&lt;BR /&gt;• backslash "\"&lt;BR /&gt;• the period "."&lt;BR /&gt;• the open "(" or close ")" parenthesis characters&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 23:14:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cmis-select-as-alias-and-text-qualifying-spaces/m-p/263682#M216812</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2013-01-07T23:14:25Z</dc:date>
    </item>
  </channel>
</rss>

