This method is assumed to just use default namespace (if any),
and no further checks should be done.
517201
@Override
    public void writeStartElement(String localName)
        throws XMLStreamException
    {
        checkStartElement(localName, null);
        if (mValidator != null) {
            mValidator.validateElementStart(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);
        }
        mEmptyElement = false;
        if (mOutputElemPool != null) {
            SimpleOutputElement newCurr = mOutputElemPool;
            mOutputElemPool = newCurr.reuseAsChild(mCurrElem, localName);
            --mPoolSize;
            mCurrElem = newCurr;
        } else {
            mCurrElem = mCurrElem.createChild(localName);
        }

        doWriteStartTag(localName);
    }
204762
public void ensureNamespace(String schema)
    {
        try {
            // If the table schema is not "default" and the namespace does not exist, create it
            if (!schema.equals(DEFAULT) && !connector.namespaceOperations().exists(schema)) {
                connector.namespaceOperations().create(schema);
            }
        }
        catch (AccumuloException | AccumuloSecurityException e) {
            throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Failed to check for existence or create Accumulo namespace", e);
        }
        catch (NamespaceExistsException e) {
            // Suppress race condition between test for existence and creation
            LOG.warn("NamespaceExistsException suppressed when creating " + schema);
        }
    }
988776
def _namespace_requested(self, namespace):
        """"""
        if namespace is None:
            return False
        namespace_tuple = self._tuplefy_namespace(namespace)
        if namespace_tuple[0] in IGNORE_DBS:
            return False
        elif namespace_tuple[1] in IGNORE_COLLECTIONS:
            return False
        else:
            return self._tuple_requested(namespace_tuple)
201603
def namespace(self):
        
        if self.prefix is None:
            return self.defaultNamespace()
        return self.resolvePrefix(self.prefix)
1187808
@Override
    public void outputNamespaceDeclarations(XMLStreamWriter w) throws XMLStreamException
    {
        for (int i = 0, len = mNamespaces.size(); i < len; ++i) {
            Namespace ns = mNamespaces.get(i);
            if (ns.isDefaultNamespaceDeclaration()) {
                w.writeDefaultNamespace(ns.getNamespaceURI());
            } else {
                w.writeNamespace(ns.getPrefix(), ns.getNamespaceURI());
            }
        }
    }
51895
def reset_namespace(self, namespace=None, params=None):
        
        log = logging.getLogger("%s.%s" % (self.log_name,
                                           inspect.stack()[0][3]))
        log.setLevel(self.log_level)
        namespace = pick(namespace, self.namespace)
        params = pick(params, self.namespace_params)
        log.warning(" Reseting namespace '%s' at host: %s",
                 namespace,
                 self.url)
        try:
            self.delete_namespace(namespace)
        except RuntimeError:
            pass
        self.create_namespace(namespace, params)
280907
@Override
    public void writeDefaultNamespace(String nsURI)
    {
        if (mOpenElement == null) {
            throw new IllegalStateException("No currently open START_ELEMENT, cannot write attribute");
        }
        setDefaultNamespace(nsURI);
        mOpenElement.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns", nsURI);
    }
718938
@javax.annotation.Nonnull
    public java.util.Optional<java.util.Map<String,String>> optionalNamespaces() {
        return java.util.Optional.ofNullable(mNamespaces);
    }
1078227
def _iparam_namespace_from_namespace(self, obj):
        # pylint: disable=invalid-name,
        

        if isinstance(obj, six.string_types):
            namespace = obj.strip('/')
        elif obj is None:
            namespace = obj
        else:
            raise TypeError(
                _format("The 'namespace' argument of the WBEMConnection "
                        "operation has invalid type {0} (must be None, or a "
                        "string)",
                        type(obj)))
        if namespace is None:
            namespace = self.default_namespace
        return namespace
962423
function() {
    var str
      , prefix;
    this.expect('namespace');

    this.skipSpacesAndComments();
    if (prefix = this.accept('ident')) {
      prefix = prefix.val;
    }
    this.skipSpacesAndComments();

    str = this.accept('string') || this.url();
    this.allowPostfix = true;
    return new nodes.Namespace(str, prefix);
  }
587373
def _add_plain_namespace(self, namespace):
        """"""
        src_name = namespace.source_name
        target_name = namespace.dest_name
        src_names = self._reverse_plain.setdefault(target_name, set())
        src_names.add(src_name)
        if len(src_names) > 1:
            # Another source namespace is already mapped to this target
            existing_src = (src_names - set([src_name])).pop()
            raise errors.InvalidConfiguration(
                "Multiple namespaces cannot be combined into one target "
                "namespace. Trying to map '%s' to '%s' but there already "
                "exists a mapping from '%s' to '%s'"
                % (src_name, target_name, existing_src, target_name)
            )

        self._plain[src_name] = namespace
        src_db, _ = src_name.split(".", 1)
        target_db, _ = target_name.split(".", 1)
        self._plain_db.setdefault(src_db, set()).add(target_db)
132353
def _strip_namespace(self, xml):
        """"""
        p = re.compile(b"xmlns=*[\"\"][^\"\"]*[\"\"]")
        allmatches = p.finditer(xml)
        for match in allmatches:
            xml = xml.replace(match.group(), b"")
        return xml
848799
private void initNamespaces()
    {
        // The initial prefix mappings will never be deleted because they are at element depth -1
        // (a kludge)

        // Define the default namespace (initially maps to "" uri)
        Stack stack;
        MappingRecord nn;
        nn = new MappingRecord(EMPTYSTRING, EMPTYSTRING, -1);
        stack = createPrefixStack(EMPTYSTRING);
        stack.push(nn);

        // define "xml" namespace
        nn = new MappingRecord(XML_PREFIX, "http://www.w3.org/XML/1998/namespace", -1);
        stack = createPrefixStack(XML_PREFIX);
        stack.push(nn);
    }
160214
private static boolean isNamespacePlaceholder(Node n) {
    if (!n.getBooleanProp(Node.IS_NAMESPACE)) {
      return false;
    }

    Node value = null;
    if (n.isExprResult()) {
      Node assign = n.getFirstChild();
      value = assign.getLastChild();
    } else if (n.isVar()) {
      Node name = n.getFirstChild();
      value = name.getFirstChild();
    }

    if (value == null) {
      return false;
    }
    if (value.isCast()) {
      // There may be a cast to unknown type wrapped around the value.
      value = value.getOnlyChild();
    }
    return value.isObjectLit() && !value.hasChildren();
  }
716039
function Namespacer(settings, callback) {
      if (settings.namespace != null) {
        this.groupNamespace = settings.namespace;
      } else {
        callback('Error: \'namespace\' is not configured');
      }
      if (settings.templates != null) {
        this.templates = settings.templates;
      } else {
        callback('Error: \'templates\' is not configured');
      }
      if (settings.skiproot != null) {
        this.skiproot = settings.skiproot;
      }
      if ((this.groupNamespace != null) && (this.templates != null)) {
        this.callback = callback;
        this.namespaces = [];
        this.result = [];
        this.init();
      }
    }
200928
public void addNamespace(String prefix, String namespaceURI) {
        if (prefix == null || namespaceURI == null) {
            throw new IllegalArgumentException("null arguments not allowed.");
        }
        if (namespaceURI.equals(XMLConstants.XML_NS_URI)) {
            throw new IllegalArgumentException("Adding a new namespace for " +
                XMLConstants.XML_NS_URI + "not allowed.");
        } else if (namespaceURI.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
            throw new IllegalArgumentException("Adding a new namespace for " +
                XMLConstants.XMLNS_ATTRIBUTE_NS_URI + "not allowed.");
        }
        prefix2ns.put(prefix, namespaceURI);
    }
239445
def IsAFault(self):
        '''
        '''
        e = self.body_root
        if not e: return 0
        return e.namespaceURI == SOAP.ENV and e.localName == 'Fault'