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.
<echo message="Compiling..." />
<javac srcdir="${src.dir}" destdir="${build.classes.dir}">
<javac srcdir="${src.dir}" destdir="${build.classes.dir}" source="1.4">
<!-- <classpath> not needed since Ant already supplies these Sep-03 -sc -->
<include name="${resolver.subdir}/*.java"/>
<include name="${resolver.subdir}/helpers/*.java"/>
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
import java.util.Iterator;
import java.net.URL;
import java.net.MalformedURLException;
import org.apache.xml.resolver.CatalogManager;
/**
* Return all registered public IDs.
*/
public Iterator getPublicIDs() {
Vector v = new Vector();
Enumeration enum = catalogEntries.elements();
while (enum.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement();
if (e.getEntryType() == PUBLIC) {
v.add(e.getEntryArg(0));
}
return v.iterator();
* Return the applicable DOCTYPE system identifier.
*
* @param entityName The name of the entity (element) for which
String resolved = getResolvedEntity(publicId, systemId);
if (resolved != null) {
try {
InputSource iSource = new InputSource(resolved);
iSource.setPublicId(publicId);
// Ideally this method would not attempt to open the
// InputStream, but there is a bug (in Xerces, at least)
// that causes the parser to mistakenly open the wrong
// system identifier if the returned InputSource does
// not have a byteStream.
//
// It could be argued that we still shouldn't do this here,
// but since the purpose of calling the entityResolver is
// almost certainly to open the input stream, it seems to
// do little harm.
URL url = new URL(resolved);
InputStream iStream = url.openStream();
iSource.setByteStream(iStream);
return iSource;
} catch (Exception e) {
catalogManager.debug.message(1, "Failed to create InputSource", resolved);
return null;