Returns the fixed namespace URI for the prefix "dns". Other prefixes will cause an IllegalArgumentException.

@param prefix the namespace prefix
@return the URI "http://www.christofreichardt.de/java/tracer"
190083
@Override
  public String getNamespaceURI(String prefix)
  {
    if (prefix == null || !prefix.equals("dns"))
      throw new IllegalArgumentException("Accept only default namespace.");
    
    return "http://www.christofreichardt.de/java/tracer";
  }
181851
def namespace_for_prefix(self, prefix):
        
        try:
            ni = self.__lookup_prefix(prefix)
        except PrefixNotFoundError:
            return None
        else:
            return ni.uri
426964
public String findTypeWithMatchingNamespace(String prefix) {
    prefix = prefix + ".";
    // This must be sorted so that errors are deterministic, or we'll break integration tests.
    for (String name : getAllSortedTypeNames()) {
      if (name.startsWith(prefix)) {
        return name;
      }
    }
    return null;
  }
126376
protected String getPrefix(String namespace, boolean generatePrefix, boolean nonEmpty) {
		// assert namespace != null;
		if (!namesInterned) {
			// when String is interned we can do much faster namespace stack
			// lookups ...
			namespace = namespace.intern();
		} else if (checkNamesInterned) {
			checkInterning(namespace);
			// assert namespace != namespace.intern();
		}
		if (namespace == null) {
			throw new IllegalArgumentException("namespace must be not null" + getLocation());
		} else if (namespace.length() == 0) {
			throw new IllegalArgumentException("default namespace cannot have prefix" + getLocation());
		}

		// first check if namespace is already in scope
		for (int i = namespaceEnd - 1; i >= 0; --i) {
			if (namespace == namespaceUri[i]) {
				final String prefix = namespacePrefix[i];
				if (nonEmpty && prefix.length() == 0)
					continue;
				// now check that prefix is still in scope
				for (int p = namespaceEnd - 1; p > i; --p) {
					if (prefix == namespacePrefix[p])
						continue; // too bad - prefix is redeclared with
									// different namespace
				}
				return prefix;
			}
		}

		// so not found it ...
		if (!generatePrefix) {
			return null;
		}
		return generatePrefix(namespace);
	}
1121691
public String getNamespaceURI(String prefix)
   {
      String uri = null;
      try
      {
         uri = namespaceRegistry.getURI(prefix);
      }
      catch (NamespaceException exc)
      {
         uri = namespaces.get(prefix);
      }
      catch (RepositoryException exc)
      {
         log.error(exc.getMessage(), exc);
      }
      return uri;
   }
120225
def getNamespace(self, prefix):
        
        namespace = None
        if prefix == 'xmlns':
            namespace = DOM.findDefaultNS(prefix, self.__node)
        else:
            try:
                namespace = DOM.findNamespaceURI(prefix, self.__node)
            except DOMException, ex:
                if prefix != 'xml':
                    raise SchemaError, '%s namespace not declared for %s'\
                        %(prefix, self.__node._get_tagName())
                namespace = XMLNS.XML
        return namespace
843389
@Override
  public String getNamespaceURI(String prefix) {
    // per javax.xml.namespace.NamespaceContext doc
    if (prefix == null)
      throw new IllegalArgumentException("Cannot get namespace URI for null prefix");
    if (XMLConstants.XML_NS_PREFIX.equals(prefix))
      return XMLConstants.XML_NS_URI;
    if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix))
      return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;

    String namespaceURI = bindings.get(prefix);

    // per javax.xml.namespace.NamespaceContext doc
    return (namespaceURI != null) ? namespaceURI : XMLConstants.NULL_NS_URI;
  }
1224611
private void addNamespace(String prefix, String uri) {
        prefixToURI.put(prefix, uri);
        uriToPrefix.put(uri, prefix);
    }
815914
def get_prefixes(self, ns_uri):
        """"""
        ni = self.__lookup_uri(ns_uri)
        return ni.prefixes.copy()
397803
public String getRequstURIPath(String prefix, String defvalue) {
        if (requestURI == null || prefix == null || prefix.isEmpty()) return defvalue;
        int pos = requestURI.indexOf(prefix);
        if (pos < 0) return defvalue;
        String sub = requestURI.substring(pos + prefix.length());
        pos = sub.indexOf('/');
        return pos < 0 ? sub : sub.substring(0, pos);
    }
717185
public String declarePrefix(String uri){
        String prefix = findPrefix(uri);
        if(prefix==null){
            if(uri.isEmpty())
                prefix = ""; // non-empty prefix cannot be used for empty namespace
            else{
                prefix = suggested.getProperty(uri, suggestPrefix);
                if(getURI(prefix)!=null){
                    if(prefix.isEmpty())
                        prefix = "ns";
                    int i = 1;
                    String _prefix;
                    while(true){
                        _prefix = prefix + i;
                        if(getURI(_prefix)==null){
                            prefix = _prefix;
                            break;
                        }
                        i++;
                    }
                }
            }
            declarePrefix(prefix, uri);
        }
        return prefix;
    }
1181966
def resolvePrefix(self, prefix):
        
        ns = Namespace.default
        if self.parent is not None:
            ns = self.parent.resolvePrefix(prefix)
        return ns
1238341
function getNamespaceFromPrefix($prefix)
    {
        if (isset($this->namespaces[$prefix])) {
            return $this->namespaces[$prefix];
        }

        //$this->setError("No namespace registered for prefix '$prefix'");
        return FALSE;
    }
614378
public static Proxy forPropertiesOpt(String prefix) {
        String host;
        String port;
        Proxy result;

        host = System.getProperty(prefix + ".proxyHost");
        if (host == null) {
            return null;
        }
        port = System.getProperty(prefix + ".proxyPort");
        if (port == null) {
            throw new IllegalStateException("missing proxy port for host " + host);
        }
        result = new Proxy(host, Integer.parseInt(port));
        result.excludes.addAll(NON_PROXY_SEP.split(System.getProperty(prefix + ".nonProxyHosts", "")));
        return result;
    }
106946
public final String getPrefix() {
		if ((prefix == null || prefix.isEmpty()) && (configuration != null)) {
			prefix = configuration.getPrefix();
		}
		return prefix;
	}
802722
private String fixPrefix(String prefix) {
		String fixedPrefix = prefix.startsWith("/") ? prefix : "/" + prefix;
		return fixedPrefix.endsWith("/") ? fixedPrefix : fixedPrefix + "/";
	}
1091380
public String getParametersToString(String prefix) {
        final StringBuilder sb = new StringBuilder();
        getParameters().forEach((k, v) -> {
            if (sb.length() > 0) sb.append('&');
            try {
                sb.append(k).append('=').append(URLEncoder.encode(v, "UTF-8"));
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            }
        });
        return (sb.length() > 0 && prefix != null) ? (prefix + sb) : sb.toString();
    }