(Re)set the parent of this Namespace context.
This is separate from the c'tor because it's re-applied
when a Context2 is reused by push-after-pop.

@param context The parent Namespace context object.
4410
void setParent (Context2 parent)
    {
        this.parent = parent;
        parent.child = this;        // JJK: Doubly-linked
        declarations = null;
        prefixTable = parent.prefixTable;
        uriTable = parent.uriTable;
        elementNameTable = parent.elementNameTable;
        attributeNameTable = parent.attributeNameTable;
        defaultNS = parent.defaultNS;
        tablesDirty = false;
    }
212032
function(context) {
      this._context = context;
      if (this.scenes) {
        _.each(this.scenes, function(scene) {
          scene.setContext(context);
        });
      }
    }
907212
public void setContext(DisplayContext context) {
        if (context.type() == DisplayContext.Type.CAPITALIZATION) {
            capitalizationSetting = context;
        }
    }
1049480
public void setContext( AdapterContext context )
    {
        Object servletContext = context.getExternalContext();
        assert servletContext instanceof ServletContext : servletContext;
        _servletContext = ( ServletContext ) servletContext;
        _eventReporter = createEventReporter();
    }
223723
public void setRoot(int context, Object environment)
  {
    super.setRoot(context, environment);
    m_traverser = m_cdtm.getAxisTraverser(m_superAxis);
  }
1224233
@Override
    public void setContext(Context context) {
        super.setContext(context);

        fsInfo = FSInfo.instance(context);

        contextUseOptimizedZip = options.getBoolean("useOptimizedZip", true);
        if (contextUseOptimizedZip)
            zipFileIndexCache = ZipFileIndexCache.getSharedInstance();

        mmappedIO = options.isSet("mmappedIO");
        symbolFileEnabled = !options.isSet("ignore.symbol.file");

        String sf = options.get("sortFiles");
        if (sf != null) {
            sortFiles = (sf.equals("reverse") ? SortFiles.REVERSE : SortFiles.FORWARD);
        }
    }
737965
public void setRoot(int context, Object environment)
  {
  	super.setRoot(context, environment);
  	m_exprObj = executeFilterExpr(context, m_execContext, getPrefixResolver(), 
  	                  getIsTopLevel(), m_stackFrame, m_expr);
  }
397055
protected static void closeContext(InitialContext initialContext) {
        if (initialContext != null) {
            try {
                initialContext.close();
            } catch (NamingException e) {
                LOGGER.debug("Can't close InitialContext", e);
            }
        }
    }
1334057
public static void closeContext(DirContext context) {
		if (context != null) {
			try {
				context.close();
			}
			catch (NamingException ex) {
				LOGGER.debug("Could not close JNDI DirContext", ex);
			}
			catch (Throwable ex) {
				// We don't trust the JNDI provider: It might throw
				// RuntimeException or Error.
				LOGGER.debug("Unexpected exception on closing JNDI DirContext", ex);
			}
		}
	}
651359
private void assignContext(ElementContext context) {
        fields.stream()
                .filter(f -> f.getAnnotation(Context.class) != null)
                .forEach(f -> {
                    try {
                        f.set(view, context);
                    } catch (IllegalAccessException | IllegalArgumentException e) {
                        throw new DarcyException("Couldn't assign context to field," + f, e);
                    }
                });
    }
1081363
public void setContexts(java.util.Collection<PhaseContext> contexts) {
        if (contexts == null) {
            this.contexts = null;
            return;
        }

        this.contexts = new java.util.ArrayList<PhaseContext>(contexts);
    }
1272309
def context(self):
        
        parent = _ACTION_CONTEXT.set(self)
        try:
            yield self
        finally:
            _ACTION_CONTEXT.reset(parent)
989071
public function initializeContext(Context $context)
    {
        if (! $context instanceof WordpressAwareInterface) {
            return;
        }

        $context->setWordpress($this->wordpress);
        $context->setWordpressParameters($this->parameters);
    }
249596
public function initializeContext(Context $context)
    {
        if (!$context instanceof FixtureServiceAwareContextInterface && !$this->usesReferenceDictionary($context)) {
            return;
        }

        $context->setFixtureService($this->fixtureService);
    }
494583
protected void addNamespaceContext() {
        NamespaceMap prefixmap = new NamespaceMap();
        NamespacePrefixList npl = getXsd().getNamespaceContext();
        if (npl == null) {
            /* We get an NPE if we don't add this. */
            prefixmap.add("", XMLConstants.W3C_XML_SCHEMA_NS_URI);
        } else {
            for (int i = 0; i < npl.getDeclaredPrefixes().length; i++) {
                prefixmap.add(npl.getDeclaredPrefixes()[i],
                        npl.getNamespaceURI(npl.getDeclaredPrefixes()[i]));
            }
        }
        prefixmap.add(getCOXBNamespacePrefix(), getCOXBNamespace());
        getXsd().setNamespaceContext(prefixmap);

    }
652334
public void useNamespace(SerializerContext serializerContext, String namespace)
	{
		if (namespace != null && namespace.length() > 0)
		{
			if (serializerContext.knownNamespaces == null)
			{
				serializerContext.knownNamespaces = new HashSet<String>(8);
			}
			serializerContext.knownNamespaces.add(namespace);
		}
	}
968296
protected void setContext(Context context) throws CpoException {
    try {
      if (context == null) {
        context_ = new InitialContext();
      } else {
        context_ = context;
      }
    } catch (NamingException e) {
      throw new CpoException("Error setting Context", e);
    }
  }