code: public static int compare(String ns1, String ln1, String ns2, String ln2) {
  		if (ns1 == null) {
  			ns1 = Constants.XML_NULL_NS_URI;
  		}
  		if (ns2 == null) {
  			ns2 = Constants.XML_NULL_NS_URI;
  		}
  		int cLocalPart = ln1.compareTo(ln2);
  		return (cLocalPart == 0 ? ns1.compareTo(ns2) : cLocalPart);
  	}
docs: Sort lexicographically by qname local-name, then by qname uri
  
  @param ns1
  qname1 namespace
  @param ln1
  qname1 local-name
  @param ns2
  qname2 namespace
  @param ln2
  qname2 local-name
  @return a negative integer, zero, or a positive integer as the first
  qname is less than, equal to, or greater than the second.