Building QName out of uri and name. The name can have the prefix denoted
with ":";

@param paramUri
the namespaceuri
@param paramName
the name including a possible prefix
@return the QName obj
506636
public static final QName buildQName(final String paramUri, final String paramName) {
        QName qname;
        if (paramName.contains(":")) {
            qname = new QName(paramUri, paramName.split(":")[1], paramName.split(":")[0]);
        } else {
            qname = new QName(paramUri, paramName);
        }
        return qname;
    }
1118484
@Override
    public javax.xml.namespace.QName toQName () {
    	String escapedLocal=qnU.escapeToXsdLocalName(qnU.unescapeProvLocalName(local));
	if (qnU.is_NC_Name(escapedLocal)) {
	    if (prefix==null) {
		return new javax.xml.namespace.QName(namespace,escapedLocal);
	    } else {
		return new javax.xml.namespace.QName(namespace,escapedLocal,prefix);
	    }
	} else {
	    throw new QualifiedNameException("PROV-XML QName: local not valid " + local);

	}
    }
751875
private String responseHeaderParameter( final String headerName, final String paramName ) {
        return getHeaderParam(responseHeader(headerName), paramName);
    }
672218
public static BodyQName create(
            final String uri,
            final String local) {
        return createWithPrefix(uri, local, null);
    }
442704
public String paramo(String name) {
        String ret = routeResult.pathParams().get(name);
        if (ret != null) {
            return ret;
        }

        if (bodyParams != null && bodyParams.containsKey(name)) {
            return bodyParams.get(name).get(0);
        }

        ret = routeResult.queryParam(name);
        if (ret != null) {
            return ret;
        }

        return null;
    }
195205
protected void QName() throws javax.xml.transform.TransformerException
  {
    // Namespace
    if(lookahead(':', 1))
    {
      m_ops.setOp(m_ops.getOp(OpMap.MAPINDEX_LENGTH), m_queueMark - 1);
      m_ops.setOp(OpMap.MAPINDEX_LENGTH, m_ops.getOp(OpMap.MAPINDEX_LENGTH) + 1);

      nextToken();
      consumeExpected(':');
    }
    else
    {
      m_ops.setOp(m_ops.getOp(OpMap.MAPINDEX_LENGTH), OpCodes.EMPTY);
      m_ops.setOp(OpMap.MAPINDEX_LENGTH, m_ops.getOp(OpMap.MAPINDEX_LENGTH) + 1);
    }
    
    // Local name
    m_ops.setOp(m_ops.getOp(OpMap.MAPINDEX_LENGTH), m_queueMark - 1);
    m_ops.setOp(OpMap.MAPINDEX_LENGTH, m_ops.getOp(OpMap.MAPINDEX_LENGTH) + 1);

    nextToken();
  }
1248455
protected String lookupNamespaceURIImpl(String name) {
        String prefix = getPrefixFromQualifiedName(name);
        String namespaceURI = this.xmlNode.lookupNamespaceURI(prefix);
        return namespaceURI;
    }
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
1107404
def qname(self, uri: str) -> str:
        '''  '''
        try:
            prefix, namespace, name = self.g.compute_qname(uri)
            qname = prefix + ':' + name
            return qname
        except:
            try:
                print('prefix:', prefix)
                print('namespace:', namespace)
                print('name:', name)
            except:
                print('Could not print from compute_qname')
            exit('No qname for ' + uri)
89455
public void appendNsName(final StringBuilder sb,
                           final QName nm) {
    String uri = nm.getNamespaceURI();
    String abbr;

    if ((defaultNS != null) && uri.equals(defaultNS)) {
      abbr = null;
    } else {
      abbr = keyUri.get(uri);
      if (abbr == null) {
        abbr = uri;
      }
    }

    if (abbr != null) {
      sb.append(abbr);
      sb.append(":");
    }

    sb.append(nm.getLocalPart());
  }
601707
def buildQName(ncname, prefix, memory, len):
    
    ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)
    return ret
1033627
private Parameter getBindParameter(final String paramName) {
		// メソッド呼び出しかどうかで処理を振り分け
		if (paramName.contains(".") && paramName.contains("(") && paramName.contains(")")) {
			// メソッド呼び出しの場合は、SqlParserで値を評価するタイミングでparameterをaddしているので、そのまま返却する
			return parameterMap.get(paramName);
		} else {
			String[] keys = StringUtils.split(paramName, ".");
			String baseName = keys[0];

			Parameter parameter = parameterMap.get(baseName);
			if (parameter == null) {
				return null;
			}

			if (keys.length > 1) {
				String propertyName = keys[1];
				return parameter.createSubParameter(propertyName);
			}

			return parameter;
		}
	}
1069336
private int nameToIndex(String parameterName) throws SQLException {
    parameterMetadata.readMetadataFromDbIfRequired();
    for (int i = 1; i <= parameterMetadata.getParameterCount(); i++) {
      String name = parameterMetadata.getName(i);
      if (name != null && name.equalsIgnoreCase(parameterName)) {
        return i;
      }
    }
    throw new SQLException("there is no parameter with the name " + parameterName);
  }
1026024
private void emitQName(final QName tag) throws IOException {
    nameSpaces.emitNsAbbr(tag.getNamespaceURI(), wtr);

    out(tag.getLocalPart());

    emitNs();
  }
29724
def valid_qname(val):
    

    try:
        (prefix, localpart) = val.split(":")
        return valid_ncname(prefix) and valid_ncname(localpart)
    except ValueError:
        return valid_ncname(val)
204481
public function uri_to_qname($uri) {
        if (preg_match('~^(.*[\/\#])([a-z0-9\-\_\:]+)$~i', $uri, $m)) {
            $ns = $m[1];
            $localname = $m[2];
            $prefix = $this->get_prefix($ns);
            if ( $prefix != null && $prefix !== FALSE) {
                return $prefix . ':' . $localname;
            }
        }
        return null;
    }
924338
public static QueryParameter getParameterByName(List<QueryParameter> params, String parameterName) {
        for (QueryParameter parameter : params) {
            if (parameter.getName().equals(parameterName)) {
                return parameter;
            }
        }
        return null;
    }