/* */ {
/* 155 */ if ((locs == null) || (locs.size() == 0)) {
/* 156 */ throw new IllegalArgumentException("Illegal schema location map");
/* */ }
/* 158 */ JBossXSErrorHandler xserr = new JBossXSErrorHandler();
/* 159 */ JBossWSEntityResolver resolver = new JBossWSEntityResolver();
/* 160 */ JBossXSEntityResolver xsresolve = new JBossXSEntityResolver(resolver, locs);
/* 161 */ XMLSchemaLoader loader = (XMLSchemaLoader)this.schemautils.getXSLoader(xserr, xsresolve);
/* */
/* 163 */ int index = 0;
/* 164 */ SchemaGrammar[] gs = new SchemaGrammar[locs.size()];
/* 165 */ Iterator it = locs.keySet().iterator();
/* 166 */ while (it.hasNext())
/* */ {
/* */ try
/* */ {
/* 170 */ String nsURI = (String)it.next();
/* 171 */ URL orgURL = (URL)locs.get(nsURI);
/* 172 */ URL resURL = resolveNamespaceURI(resolver, nsURI);
/* 173 */ URL url = resURL != null ? resURL : orgURL;
/* */
/* 175 */ log.debug("Load schema: " + nsURI + "=" + url);
/* 176 */ XMLInputSource inputSource = new XMLInputSource(null, url.toExternalForm(), null);
/* */
/* 178 */ InputSource tmpSrc = resolver.resolveEntity(null, url.toExternalForm());
/* 179 */ InputStream in = tmpSrc.getByteStream() != null ? tmpSrc.getByteStream() : new ResourceURL(url).openStream();
/* 180 */ inputSource.setByteStream(in);
/* */
/* 182 */ SchemaGrammar grammar = (SchemaGrammar)loader.loadGrammar(inputSource);
/* 183 */ if (grammar == null) {