prefixedName: PNAME_LN | PNAME_NS
            PNAME_NS: PN_PREFIX? ':' ;
            PNAME_LN: PNAME_NS PN_LOCAL ;
8760
def prefixedname_to_iriref(self, prefix: ShExDocParser.PrefixedNameContext) -> ShExJ.IRIREF:
        
        return ShExJ.IRIREF(self.prefixedname_to_str(prefix))
153466
function Name() {
    /**
     * The prefix value
     * @member
     */
    this.prefix = null;
    /**
     * The first value
     * @member
     */
    this.first = null;
    /**
     * The middle value
     * @member
     */
    this.middle = null;
    /**
     * The last value
     * @member
     */
    this.last = null;
    /**
     * The suffix value
     * @member
     */
    this.suffix = null;

}
18342
def _NSPrefix(self, ns):
      
      if ns == self.defaultNS:
         return ''
      prefix = self.nsMap[ns]
      return prefix and prefix + ':' or ''
797004
function prefix( $name = '' ) {
		return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name;
	}
86733
def -(other)
      other = other.to_key_path
      raise KeyError unless prefix?(other)

      super(other.length)
    end
1051589
private String processName(String name) {
        String prefix = "";

        if (this.type != null) {
            prefix = this.type.getName() + ".";
        }

        return prefix + name;
    }
898505
def explode_qname(ns_stack, qname, attr=false)
      if qname.is_a?(Array)
        local_part, prefix, uri = qname
        if uri
          raise "invalid name: #{qname.inspect}" if !prefix
          bound_uri = find_namespace_uri(ns_stack, prefix)
          raise "namespace conflict: prefix '#{prefix}' refers to '#{uri}' and '#{bound_uri}'" if bound_uri && uri != bound_uri
          return [local_part, prefix, uri]
        elsif prefix
          uri = find_namespace_uri(ns_stack, prefix)
          raise "namespace prefix not bound: '#{prefix}'" if !uri
          return [local_part, prefix, uri]
        else
          return local_part
        end
      end

      local_part, prefix = split_qname(qname)
      if prefix
        if prefix=="xmlns" && attr
          [local_part, prefix]
        else
          uri = find_namespace_uri(ns_stack, prefix)
          raise "namespace prefix not bound: '#{prefix}'" if ! uri
          [local_part, prefix, uri]
        end
      else
        if attr
          local_part
        else
          default_uri = find_namespace_uri(ns_stack, "")
          if default_uri
            [local_part, "", default_uri]
          else
            local_part
          end
        end
      end
    end
872488
def _versioned_lib_name(env, libnode, version, prefix, suffix, prefix_generator, suffix_generator, **kw):
    """'"""
    Verbose = False

    if Verbose:
        print("_versioned_lib_name: libnode={:r}".format(libnode.get_path()))
        print("_versioned_lib_name: version={:r}".format(version))
        print("_versioned_lib_name: prefix={:r}".format(prefix))
        print("_versioned_lib_name: suffix={:r}".format(suffix))
        print("_versioned_lib_name: suffix_generator={:r}".format(suffix_generator))

    versioned_name = os.path.basename(libnode.get_path())
    if Verbose:
        print("_versioned_lib_name: versioned_name={:r}".format(versioned_name))

    versioned_prefix = prefix_generator(env, **kw)
    versioned_suffix = suffix_generator(env, **kw)
    if Verbose:
        print("_versioned_lib_name: versioned_prefix={:r}".format(versioned_prefix))
        print("_versioned_lib_name: versioned_suffix={:r}".format(versioned_suffix))

    versioned_prefix_re = '^' + re.escape(versioned_prefix)
    versioned_suffix_re = re.escape(versioned_suffix) + '$'
    name = re.sub(versioned_prefix_re, prefix, versioned_name)
    name = re.sub(versioned_suffix_re, suffix, name)
    if Verbose:
        print("_versioned_lib_name: name={:r}".format(name))
    return name
424619
def prefix_iter(self, ns_uri):
        """"""
        ni = self.__lookup_uri(ns_uri)
        return iter(ni.prefixes)
566495
function getCanonicalNamePlain(loader, normalized, isPlugin) {
  // now just reverse apply paths rules to get canonical name
  var pathMatch;

  // first check exact path matches
  for (var p in loader.paths) {
    if (loader.paths[p].indexOf('*') != -1)
      continue;

    var curPath = normalizePath(loader, loader.paths[p], isPlugin);

    // always stop on first exact match
    if (normalized === curPath)
      return p;

    // support trailing / in paths rules
    else if (curPath[curPath.length - 1] == '/' &&
        normalized.substr(0, curPath.length - 1) == curPath.substr(0, curPath.length - 1) &&
        (normalized.length < curPath.length || normalized[curPath.length - 1] == curPath[curPath.length - 1])) {
      // first case is that canonicalize('src') = 'app' for 'app/': 'src/'
      return normalized.length < curPath.length ? p.substr(0, p.length - 1) : p + normalized.substr(curPath.length);
    }
  }

  // then wildcard matches
  var pathMatchLength = 0;
  var curMatchLength;
  if (!pathMatch)
    for (var p in loader.paths) {
      if (loader.paths[p].indexOf('*') == -1)
        continue;

      // normalize the output path
      var curPath = normalizePath(loader, loader.paths[p], true);

      // do reverse match
      var wIndex = curPath.indexOf('*');
      if (normalized.substr(0, wIndex) === curPath.substr(0, wIndex)
        && normalized.substr(normalized.length - curPath.length + wIndex + 1) === curPath.substr(wIndex + 1)) {
        curMatchLength = curPath.split('/').length;
        if (curMatchLength >= pathMatchLength) {
          pathMatch = p.replace('*', normalized.substr(wIndex, normalized.length - curPath.length + 1));
          pathMatchLength = curMatchLength;
        }
      }
    }

  // when no path was matched, act like the standard rule is *: baseURL/*
  if (!pathMatch) {
    if (normalized.substr(0, loader.baseURL.length) == loader.baseURL)
      pathMatch = normalized.substr(loader.baseURL.length);
    else if (normalized.match(absURLRegEx))
      throw new Error('Unable to calculate canonical name to bundle ' + normalized + '. Ensure that this module sits within the baseURL or a wildcard path config.');
    else
      pathMatch = normalized;
  }

  return pathMatch;
}
438529
def _remove_builtin_prefix(name):
    """"""
    if name.startswith('builtins.'):
        return name[len('builtins.'):]
    elif name.startswith('__builtin__.'):
        return name[len('__builtin__.'):]
    return name
1330728
def _is_scope_prefix(scope_name, prefix_name):
  """"""

  if not prefix_name:
    return True

  if not scope_name.endswith("/"):
    scope_name += "/"

  if not prefix_name.endswith("/"):
    prefix_name += "/"

  return scope_name.startswith(prefix_name)
700416
def prefix(self, format="sparql"):
        ''' 
        '''

        lg = logging.getLogger("%s.%s" % (self.ln, inspect.stack()[0][3]))
        lg.setLevel(self.log_level)

        _return_str = ""
        if format.lower() == "sparql":
            return "\n".join([ns._sparql_ for ns in self.namespaces])
        elif format.lower() in ["turtle", "ttl"]:
            return "\n".join([ns._ttl_ for ns in self.namespaces])
        elif format.lower() in ["rdf", "xml", "rdf/xml"]:
            return "<rdf:RDF %s>" % \
                    " ".join([ns._xml_ for ns in self.namespaces])
        else:
            raise NotImplementedError("'%s' is not a valid prefix type." %
                                      format)
491944
function(prefix, string) {
    return string.substring(0, prefix.length) == prefix ?
        string.substring(prefix.length) :
        '';
  }
167267
function prefixKeypath(obj, prefix) {
  const prefixed = {};

  if (!prefix) {
    return obj;
  }

  prefix += '.';

  for (const key in obj) {
    if (hasOwn(obj, key)) {
      prefixed[prefix + key] = obj[key];
    }
  }

  return prefixed;
}
924712
private String resolveName(String localName, String qualifiedName) {

        if ((localName == null) || (localName.length() == 0)) {
            return qualifiedName;
        } else {
            return localName;
        }
    }
716386
def add_prefix(self, name, stmt):
        
        if self.gg_level: return name
        pref, colon, local = name.partition(":")
        if colon:
            return (self.module_prefixes[stmt.i_module.i_prefixes[pref][0]]
                    + ":" + local)
        else:
            return self.prefix_stack[-1] + ":" + pref