Keyword arguments:
            namespaceURI -- namespace of attribute to create, None is for
                attributes in no namespace.
            localName -- local name of new attribute
            value -- value of new attribute
432290
def setAttributeNS(self, namespaceURI, localName, value):
        '''
        
        ''' 
        prefix = None
        if namespaceURI:
            try:
                prefix = self.getPrefix(namespaceURI)
            except KeyError, ex:
                prefix = 'ns2'
                self.setNamespaceAttribute(prefix, namespaceURI)
        qualifiedName = localName
        if prefix:
            qualifiedName = '%s:%s' %(prefix, localName)
        self._setAttributeNS(namespaceURI, qualifiedName, value)
1158549
public void writeAttribute(String prefix, String namespaceURI,
			String localName, String value) throws XMLStreamException {
		try {
			this.exiAttributes.addAttribute(namespaceURI, localName, prefix,
					value);
		} catch (Exception e) {
			throw new XMLStreamException(e.getLocalizedMessage(), e);
		}
	}
467874
public T namespace(String prefix, String namespaceUri) {
        getXpathVariableExtractor().getNamespaces().put(prefix, namespaceUri);
        xmlMessageValidationContext.getNamespaces().put(prefix, namespaceUri);
        return self;
    }
12314
def resolve_namespace(self, qname):
        
        if ':' in qname:
            prefix, name = qname.split(':', 1)
            uri = self._ns[prefix]
        else:
            name = qname
            if None in self._ns:
                uri = self._ns[None]
            else:
                uri = None
        return (uri, name)
1146847
def _create_namespace(namespace, apiserver_url):
    '''  '''
    # Prepare URL
    url = "{0}/api/v1/namespaces".format(apiserver_url)
    # Prepare data
    data = {
        "kind": "Namespace",
        "apiVersion": "v1",
        "metadata": {
            "name": namespace,
        }
    }
    log.trace("namespace creation requests: %s", data)
    # Make request
    ret = _kpost(url, data)
    log.trace("result is: %s", ret)
    # Check requests status
    return ret
444791
def namespace_attributes(ns)
      Hash[ns.map do |prefix, uri|
             if prefix==""
               ["xmlns", uri]
             else
               [["xmlns", prefix].join(":"), uri]
             end
           end]
    end
647373
def setNamespaceAttribute(self, prefix, namespaceURI):
        '''
        
        '''
        self._setAttributeNS(XMLNS.BASE, 'xmlns:%s' %prefix, namespaceURI)
1318395
@Override
    public String doGetNamespaceURI(String prefix)
    {
        // Note: base class checks for 'known' problems and prefixes:
        if (mNsByPrefix == null) {
            mNsByPrefix = buildByPrefixMap();
        }
        Namespace ns = mNsByPrefix.get(prefix);
        if (ns == null && mParentCtxt != null) {
            return mParentCtxt.getNamespaceURI(prefix);
        }
        return (ns == null) ? null : ns.getNamespaceURI();
    }
638313
@FFDCIgnore(URISyntaxException.class)
    public static String namespaceURIToPackage(String namespaceURI) {
        try {
            return nameSpaceURIToPackage(new URI(namespaceURI));
        } catch (URISyntaxException ex) {
            return null;
        }
    }
1221603
public void writeDecimalAttribute(String prefix, String namespaceURI, String localName, BigDecimal value) throws Exception {
		this.attribute(namespaceURI, localName, value.toPlainString());
	}
582382
public function isValidAttributeNS($namespace_uri, $local_name)
    {
        if (!$this->isHandledNamespace($namespace_uri)) return false;

        $attrs = $this->namespaces_by_uri[$namespace_uri]->getAttributes();
        return isset($attrs[$local_name]);
    }
809613
protected void namespaceImpl(String prefix, String namespaceURI) {
        if (! (this.xmlNode instanceof Element)) {
            throw new RuntimeException(
                "Cannot add an attribute to non-Element underlying node: "
                + this.xmlNode);
        }
        if (prefix != null && prefix.length() > 0) {
            ((Element) xmlNode).setAttributeNS("http://www.w3.org/2000/xmlns/",
                "xmlns:" + prefix, namespaceURI);
        } else {
            ((Element) xmlNode).setAttributeNS("http://www.w3.org/2000/xmlns/",
                "xmlns", namespaceURI);
        }
    }
125498
def _find_attrNS(E, namespaceURI, localName):
    '''
    '''
    try:
        v = E.getAttributeNS(namespaceURI, localName)
        if v: return v
    except: pass
    return None
219932
public void setNamespaceURI(String prefix, String namespaceURI) {
    if (prefix == null)
      throw new IllegalArgumentException("Cannot bind null prefix");
    if (namespaceURI == null)
      throw new IllegalArgumentException("Cannot set prefix to null namespace URI");

    // no need to store
    if (XMLConstants.XML_NS_PREFIX.equals(prefix) || XMLConstants.XMLNS_ATTRIBUTE.equals(prefix))
      return;

    bindings.put(prefix, namespaceURI);
  }
329033
def parse_localinstancepath(parser, event, node):
    

    #pylint: disable=unused-argument

    (next_event, next_node) = six.next(parser)

    if not _is_start(next_event, next_node, 'LOCALNAMESPACEPATH'):
        raise ParseError('Expecting LOCALNAMESPACEPATH')

    namespacepath = parse_localnamespacepath(parser, next_event, next_node)

    (next_event, next_node) = six.next(parser)

    if not _is_start(next_event, next_node, 'INSTANCENAME'):
        raise ParseError('Expecting INSTANCENAME')

    instancename = parse_instancename(parser, next_event, next_node)

    instancename.namespace = namespacepath

    return instancename
753321
public void writeBooleanAttribute(String prefix, String namespaceURI, String localName, boolean value) throws Exception {
		this.attribute(namespaceURI, localName, Boolean.toString(value));

	}
1099743
static Namespace parseUnknown(List<String> unknown) {
    Map<String, Object> attrs = new HashMap<>();
    String attr = null;
    for (String arg : unknown) {
      if (arg.startsWith("--")) {
        int splitIndex = arg.indexOf('=');
        if (splitIndex == -1) {
          attr = arg.substring(2);
        } else {
          attrs.put(arg.substring(2, splitIndex), arg.substring(splitIndex + 1));
          attr = null;
        }
      } else if (attr != null) {
        attrs.put(attr, arg);
        attr = null;
      }
    }
    return new Namespace(attrs);
  }