protected String patchName(String qname){
  final int lastColon=qname.lastIndexOf(':');
  if (lastColon > 0) {
    final int firstColon=qname.indexOf(':');
    final String prefix=qname.substring(0,firstColon);
    final String localName=qname.substring(lastColon + 1);
    final String uri=m_prefixMap.lookupNamespace(prefix);
    if (uri != null && uri.length() == 0) {
      return localName;
    }
 else     if (firstColon != lastColon) {
      return prefix + ':' + localName;
    }
  }
  return qname;
}

protected String patchName ( String qname ) { final int lastColon = qname . lastIndexOf ( ':' ) ; if ( lastColon > 0 ) { final int firstColon = qname . indexOf ( ':' ) ; final String prefix = qname . substring ( 0 , firstColon ) ; final String localName = qname . substring ( lastColon + 1 ) ; final String uri = m_prefixMap . lookupNamespace ( prefix ) ; if ( uri != null && uri . length ( ) == 0 ) { return localName ; } else if ( firstColon != lastColon ) { return prefix + ':' + localName ; } } return qname ; }
if at runtime , when the qname of the attribute is known , another prefix is specified for the attribute , then we can patch or hack the name with this method . for a qname of the form " ns ? : otherprefix : name " , this function patches the qname by simply ignoring " otherprefix " . todo : this method is a hack ! we do not have access to the xml file , it sometimes generates a ns prefix of the form " ns ? " for an attribute .
