question: public static XMLInputSource resolveDocument ( XSDDescription desc , Hashtable locationPairs , XMLEntityResolver entityResolver ) throws IOException { String loc = null ; if ( desc . getContextType ( ) == XSDDescription . CONTEXT_IMPORT || desc . fromInstance ( ) ) { String namespace = desc . getTargetNamespace ( ) ; String ns = namespace == null ? XMLSymbols . EMPTY_STRING : namespace ; LocationArray tempLA = ( LocationArray ) locationPairs . get ( ns ) ; if ( tempLA != null ) loc = tempLA . getFirstLocation ( ) ; } if ( loc == null ) { String [ ] hints = desc . getLocationHints ( ) ; if ( hints != null && hints . length > 0 ) loc = hints [ 0 ] ; } String expandedLoc = XMLEntityManager . expandSystemId ( loc , desc . getBaseSystemId ( ) , false ) ; desc . setLiteralSystemId ( loc ) ; desc . setExpandedSystemId ( expandedLoc ) ; return entityResolver . resolveEntity ( desc ) ; }
target:  This method tries to resolve location of the given schema. The loader stores the namespace/location pairs in a hashtable (use "" as the namespace of absent namespace). When resolving an entity, loader first tries to find in the hashtable whether there is a value for that namespace, if so, pass that location value to the user-defined entity resolver.