private static string ToExpressionValue(Node value, CartoReaderContext cntx)
    {
      string result = null;

      Number num = value as Number;
      if (num != null)
        result = num.Value.ToString();
      else
      {
        Quoted quoted = value as Quoted;
        if (quoted != null)
          result = QuoteValue(quoted.Value.ToString());
        else
          result = cntx.GetValue(value);
      }

      return result;
    }
    public static string ToFilter(CartoFilterSet filterSet, CartoReaderContext cntx)
    {
      string result = string.Empty;

      if (filterSet.Count > 0)
      {
        int i = 0;
        foreach (CartoFilterElement filter in filterSet.Filters)
        {
          if (i != 0)
            result += " and ";

          result += cntx.Translator.ToFilter(cntx.GetValue( filter.Key), ToExpressionOperator(filter.Op), ToExpressionValue(filter.Value, cntx));
          i++;
        }
      }

      return result;
    }