Get this properties namespace
        @param prefix: The default prefix.
        @type prefix: str
        @return: The schema's target namespace
        @rtype: (I{prefix},I{URI})
346142
def namespace(self, prefix=None):
        
        ns = self.schema.tns
        if ns[0] is None:
            ns = (prefix, ns[1])
        return ns
1127445
public function getNamespaceForPrefix( $prefix )
	{
		// Initialize $this->documentPrefixes
		$this->getDocumentNamespaces();

		if ( ! isset( $this->documentPrefixes[ $prefix ] ) )
		{
			// Look for prefix in imported taxonmies
			$taxonomies = array_filter( $this->context->importedSchemas, function( $xbrl ) use ( $prefix ) { return $xbrl->getPrefix() == $prefix; } );
			return $taxonomies ? key( $taxonomies ): null;
		}
		return $this->documentPrefixes[ $prefix ];
	}
1370192
def parse(self, prefix):
		
		# reset to default values
		self._prefix = ""

		url = re.sub(r'http://', '', prefix)
		url = re.sub(r'https://', '', url)

		# any prefix customization before parsing?
		custom_prefix = self.detectCustomImportPaths(url)
		if custom_prefix != {}:
			url = custom_prefix["provider_prefix"]

		info = self._parsePrefix(url)

		self._signature = info["signature"]
		self._prefix = info["prefix"]

		return self
1004562
def clean_prefix(self):
        
        if self.instance.fixed:
            return self.instance.prefix

        prefix = self.cleaned_data['prefix']
        if not namespace.is_ncname(prefix):
            raise forms.ValidationError("This is an invalid prefix")

        return prefix
394865
public static nsxmlnamespace get(nitro_service service, String prefix) throws Exception{
		nsxmlnamespace obj = new nsxmlnamespace();
		obj.set_prefix(prefix);
		nsxmlnamespace response = (nsxmlnamespace) obj.get_resource(service);
		return response;
	}
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
36321
public String getNamespaceURI(String prefix) {
        if (prefix == null || prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)) {
            return prefix2Uri.get(DEFAULT_NS);
        } else {
            return prefix2Uri.get(prefix);
        }
    }
112558
public void registerPrefixForNamespace(String prefix, String namespace) {
        getEnvironment().registerNamespace(prefix, getUrl(namespace));
    }
446844
public Map<String, V> prefix(@NonNull String prefix) {
      final TrieNode<V> match = root.find(prefix);
      if (match == null) {
         return Collections.emptyMap();
      }
      return new AbstractMap<String, V>() {
         @Override
         public Set<Entry<String, V>> entrySet() {
            return new AbstractSet<Entry<String, V>>() {
               @Override
               public Iterator<Entry<String, V>> iterator() {
                  return Iterators.unmodifiableIterator(new EntryIterator<>(match));
               }

               @Override
               public int size() {
                  return match.size;
               }
            };
         }
      };
   }
68245
public static List<String> getKeys(String prefix) {
        List<String> res = new ArrayList<>();
        for(String key: props.keySet()){
            if(key.startsWith(prefix)){
                res.add(key);
            }
        }
        return res;
    }
100301
def end_namespace(self, prefix):
        
        del self._ns[prefix]
        self._g.endPrefixMapping(prefix)
1341925
def get_prefix(self):
        """"""
        prefix = self.bucket
        if self.prefix:
            prefix += self.delimiter + self.prefix
        return prefix
959259
def xpathNsLookup(self, prefix):
        
        ret = libxml2mod.xmlXPathNsLookup(self._o, prefix)
        return ret
318371
def start_namespace(self, prefix, uri):
        
        self._g.startPrefixMapping(prefix, uri)
        self._ns[prefix] = uri
262495
public void setNamespace(String prefix, String uri) {
		Namespace namespace = new Namespace(prefix, uri);
		this.namespace.add(namespace);
	}
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);
	}
658200
public String getPrefix(String namespaceURI)
   {
      String prefix = null;
      try
      {
         prefix = namespaceRegistry.getPrefix(namespaceURI);
      }
      catch (NamespaceException exc)
      {
         prefix = prefixes.get(namespaceURI);
      }
      catch (RepositoryException exc)
      {
         log.error(exc.getMessage(), exc);
      }
      return prefix;

   }