This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 27930
Collapse All | Expand All

(-)resolver.xml (-1 / +1 lines)
Lines 83-89 Link Here
83
83
84
   <echo message="Compiling..." />
84
   <echo message="Compiling..." />
85
85
86
   <javac srcdir="${src.dir}" destdir="${build.classes.dir}">
86
   <javac srcdir="${src.dir}" destdir="${build.classes.dir}" source="1.4">
87
     <!-- <classpath> not needed since Ant already supplies these Sep-03 -sc -->
87
     <!-- <classpath> not needed since Ant already supplies these Sep-03 -sc -->
88
     <include name="${resolver.subdir}/*.java"/>
88
     <include name="${resolver.subdir}/*.java"/>
89
     <include name="${resolver.subdir}/helpers/*.java"/>
89
     <include name="${resolver.subdir}/helpers/*.java"/>
(-)src/org/apache/xml/resolver/Catalog.java (+18 lines)
Lines 64-69 Link Here
64
import java.util.Enumeration;
64
import java.util.Enumeration;
65
import java.util.Hashtable;
65
import java.util.Hashtable;
66
import java.util.Vector;
66
import java.util.Vector;
67
import java.util.Iterator;
67
import java.net.URL;
68
import java.net.URL;
68
import java.net.MalformedURLException;
69
import java.net.MalformedURLException;
69
import org.apache.xml.resolver.CatalogManager;
70
import org.apache.xml.resolver.CatalogManager;
Lines 1166-1171 Link Here
1166
1167
1167
1168
1168
  /**
1169
  /**
1170
   * Return all registered public IDs.
1171
   */
1172
  public Iterator getPublicIDs() {
1173
      Vector v = new Vector();
1174
      Enumeration enum = catalogEntries.elements();
1175
1176
      while (enum.hasMoreElements()) {
1177
        CatalogEntry e = (CatalogEntry) enum.nextElement();
1178
        if (e.getEntryType() == PUBLIC) {
1179
            v.add(e.getEntryArg(0));
1180
        }
1181
      }
1182
      return v.iterator();
1183
  }
1184
1185
1186
  /**
1169
   * Return the applicable DOCTYPE system identifier.
1187
   * Return the applicable DOCTYPE system identifier.
1170
   *
1188
   *
1171
   * @param entityName The name of the entity (element) for which
1189
   * @param entityName The name of the entity (element) for which
(-)src/org/apache/xml/resolver/tools/CatalogResolver.java (-21 lines)
Lines 223-252 Link Here
223
    String resolved = getResolvedEntity(publicId, systemId);
223
    String resolved = getResolvedEntity(publicId, systemId);
224
224
225
    if (resolved != null) {
225
    if (resolved != null) {
226
      try {
227
	InputSource iSource = new InputSource(resolved);
226
	InputSource iSource = new InputSource(resolved);
228
	iSource.setPublicId(publicId);
227
	iSource.setPublicId(publicId);
229
230
	// Ideally this method would not attempt to open the
231
	// InputStream, but there is a bug (in Xerces, at least)
232
	// that causes the parser to mistakenly open the wrong
233
	// system identifier if the returned InputSource does
234
	// not have a byteStream.
235
	//
236
	// It could be argued that we still shouldn't do this here,
237
	// but since the purpose of calling the entityResolver is
238
	// almost certainly to open the input stream, it seems to
239
	// do little harm.
240
	//
241
	URL url = new URL(resolved);
242
	InputStream iStream = url.openStream();
243
	iSource.setByteStream(iStream);
244
245
	return iSource;
228
	return iSource;
246
      } catch (Exception e) {
247
	catalogManager.debug.message(1, "Failed to create InputSource", resolved);
248
	return null;
249
      }
250
    }
229
    }
251
230
252
    return null;
231
    return null;

Return to bug 27930