|
@@ -59,7 +59,7 @@ import java.io.FileInputStream; |
|
|
import java.io.InputStream; |
|
|
import java.io.InputStream; |
|
|
import java.io.IOException; |
|
|
import java.io.IOException; |
|
|
import java.net.URL; |
|
|
import java.net.URL; |
|
|
import java.util.Iterator; |
|
|
|
|
|
|
|
|
import java.util.Enumeration; |
|
|
import java.util.Vector; |
|
|
import java.util.Vector; |
|
|
import org.apache.tools.ant.BuildException; |
|
|
import org.apache.tools.ant.BuildException; |
|
|
import org.apache.tools.ant.Project; |
|
|
import org.apache.tools.ant.Project; |
|
@@ -125,7 +125,7 @@ public class XMLCatalog extends DataType implements Cloneable, EntityResolver { |
|
|
* @param aDTD the DTDLocation instance to be aded to the catalog |
|
|
* @param aDTD the DTDLocation instance to be aded to the catalog |
|
|
*/ |
|
|
*/ |
|
|
private void addElement(DTDLocation aDTD) { |
|
|
private void addElement(DTDLocation aDTD) { |
|
|
getElements().add(aDTD); |
|
|
|
|
|
|
|
|
getElements().addElement(aDTD); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@@ -139,7 +139,7 @@ public class XMLCatalog extends DataType implements Cloneable, EntityResolver { |
|
|
if (isReference()) { |
|
|
if (isReference()) { |
|
|
throw noChildrenAllowed(); |
|
|
throw noChildrenAllowed(); |
|
|
} |
|
|
} |
|
|
getElements().add(dtd); |
|
|
|
|
|
|
|
|
getElements().addElement(dtd); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@@ -250,10 +250,10 @@ public class XMLCatalog extends DataType implements Cloneable, EntityResolver { |
|
|
* of the DTD or null if no such information is available |
|
|
* of the DTD or null if no such information is available |
|
|
*/ |
|
|
*/ |
|
|
private DTDLocation findMatchingDTD(String publicId) { |
|
|
private DTDLocation findMatchingDTD(String publicId) { |
|
|
Iterator elements = getElements().iterator(); |
|
|
|
|
|
|
|
|
Enumeration elements = getElements().elements(); |
|
|
DTDLocation element = null; |
|
|
DTDLocation element = null; |
|
|
while (elements.hasNext()) { |
|
|
|
|
|
element = (DTDLocation)elements.next(); |
|
|
|
|
|
|
|
|
while (elements.hasMoreElements()) { |
|
|
|
|
|
element = (DTDLocation)elements.nextElement(); |
|
|
if (element.getPublicId().equals(publicId)) { |
|
|
if (element.getPublicId().equals(publicId)) { |
|
|
return element; |
|
|
return element; |
|
|
} |
|
|
} |
|
|