public function processContext($active_ctx, $local_ctx, $options) {
    global $jsonld_default_load_document;
    self::setdefaults($options, array(
      'base' => '',
      'documentLoader' => $jsonld_default_load_document));

    // return initial context early for null context
    if($local_ctx === null) {
      return $this->_getInitialContext($options);
    }

    // retrieve URLs in local_ctx
    $local_ctx = self::copy($local_ctx);
    if(is_string($local_ctx) or (
      is_object($local_ctx) && !property_exists($local_ctx, '@context'))) {
      $local_ctx = (object)array('@context' => $local_ctx);
    }
    try {
      $this->_retrieveContextUrls(
        $local_ctx, new stdClass(),
        $options['documentLoader'], $options['base']);
    } catch(Exception $e) {
      throw new JsonLdException(
        'Could not process JSON-LD context.',
        'jsonld.ContextError', null, null, $e);
    }

    // process context
    return $this->_processContext($active_ctx, $local_ctx, $options);
  }