Print

Print


Issue on how to handle structured data as a XCQL and CQL term.
 
In XCQL the type of term could be relaxed to allow any XML structure e.g.
 
<index>geo.countryBorders</index>
  <relation>within</relation>
  <term>
    <gils:boundingRect xmlns:gils="urn:gils.org:termTypes">
      <gils:point>13N25W</gils:point>
      <gils:point>25S70E</gils:point>
    </gils:boundingRect>
  </term>
</searchClause>

xmlns would(?) be needed to ensure no clash over typing - or just define index (e.g. geo.countryBorders) to be a particular type?
 
How to encode in CQL?
 
option 1: direct escaped encoding?
 
geo.countryBorders within "&lt;gils:boundingRect xmlns:gils="urn:gils.org:termTypes"&gt&lt;gils:point&gt;13N25W&lt/gils:point&gt;..."

option 2: different bespoke string based encoding
 
geo.countryBorders within "boundingRect(13N25W,25S70E)"

Questions: how to ensure that this is recognised as a structure not as a string? (or just define this for the particular index geo.countryBorders must be a structure of this form). How to avoid type clashing etc.
 
Matthew