Revision 2447
Added by sgarg about 19 years ago
Catalog.java | ||
---|---|---|
449 | 449 |
try { |
450 | 450 |
base = new URL("file:///" + fixSlashes(fileName)); |
451 | 451 |
} catch (MalformedURLException e2) { |
452 |
debug(1, "Malformed URL on catalog filename",
|
|
452 |
debug(1, "Malformed URL on catalog filename", |
|
453 | 453 |
fixSlashes(fileName)); |
454 | 454 |
base = null; |
455 | 455 |
} |
... | ... | |
684 | 684 |
} |
685 | 685 |
|
686 | 686 |
// Parse all the DELEGATE catalogs |
687 |
Enumeration enum = catalogEntries.elements();
|
|
688 |
while (enum.hasMoreElements()) {
|
|
689 |
CatalogEntry e = (CatalogEntry) enum.nextElement();
|
|
687 |
Enumeration catalogEnum = catalogEntries.elements();
|
|
688 |
while (catalogEnum.hasMoreElements()) {
|
|
689 |
CatalogEntry e = (CatalogEntry) catalogEnum.nextElement();
|
|
690 | 690 |
if (e.entryType() == CatalogEntry.DELEGATE) { |
691 | 691 |
Catalog dcat = new Catalog(); |
692 | 692 |
dcat.setParserClass(parserClass); |
... | ... | |
740 | 740 |
|
741 | 741 |
// If there's a DOCTYPE entry in this catalog, use it |
742 | 742 |
boolean over = default_override; |
743 |
Enumeration enum = catalogEntries.elements();
|
|
744 |
while (enum.hasMoreElements()) {
|
|
745 |
CatalogEntry e = (CatalogEntry) enum.nextElement();
|
|
743 |
Enumeration catalogEnum = catalogEntries.elements();
|
|
744 |
while (catalogEnum.hasMoreElements()) {
|
|
745 |
CatalogEntry e = (CatalogEntry) catalogEnum.nextElement();
|
|
746 | 746 |
if (e.entryType() == CatalogEntry.OVERRIDE) { |
747 | 747 |
over = e.yes_or_no().equalsIgnoreCase("YES"); |
748 | 748 |
continue; |
... | ... | |
775 | 775 |
public String resolveDocument() |
776 | 776 |
throws MalformedURLException, IOException { |
777 | 777 |
// If there's a DOCUMENT entry, return it |
778 |
Enumeration enum = catalogEntries.elements();
|
|
779 |
while (enum.hasMoreElements()) {
|
|
780 |
CatalogEntry e = (CatalogEntry) enum.nextElement();
|
|
778 |
Enumeration catalogEnum = catalogEntries.elements();
|
|
779 |
while (catalogEnum.hasMoreElements()) {
|
|
780 |
CatalogEntry e = (CatalogEntry) catalogEnum.nextElement();
|
|
781 | 781 |
if (e.entryType() == CatalogEntry.DOCUMENT) { |
782 | 782 |
return e.formalSystemIdentifier(); |
783 | 783 |
} |
... | ... | |
830 | 830 |
|
831 | 831 |
// If there's a ENTITY entry in this catalog, use it |
832 | 832 |
boolean over = default_override; |
833 |
Enumeration enum = catalogEntries.elements();
|
|
834 |
while (enum.hasMoreElements()) {
|
|
835 |
CatalogEntry e = (CatalogEntry) enum.nextElement();
|
|
833 |
Enumeration catalogEnum = catalogEntries.elements();
|
|
834 |
while (catalogEnum.hasMoreElements()) {
|
|
835 |
CatalogEntry e = (CatalogEntry) catalogEnum.nextElement();
|
|
836 | 836 |
if (e.entryType() == CatalogEntry.OVERRIDE) { |
837 | 837 |
over = e.yes_or_no().equalsIgnoreCase("YES"); |
838 | 838 |
continue; |
... | ... | |
896 | 896 |
|
897 | 897 |
// If there's a NOTATION entry in this catalog, use it |
898 | 898 |
boolean over = default_override; |
899 |
Enumeration enum = catalogEntries.elements();
|
|
900 |
while (enum.hasMoreElements()) {
|
|
901 |
CatalogEntry e = (CatalogEntry) enum.nextElement();
|
|
899 |
Enumeration catalogEnum = catalogEntries.elements();
|
|
900 |
while (catalogEnum.hasMoreElements()) {
|
|
901 |
CatalogEntry e = (CatalogEntry) catalogEnum.nextElement();
|
|
902 | 902 |
if (e.entryType() == CatalogEntry.OVERRIDE) { |
903 | 903 |
over = e.yes_or_no().equalsIgnoreCase("YES"); |
904 | 904 |
continue; |
... | ... | |
942 | 942 |
* match is not found in the catalog, instead null is returned |
943 | 943 |
* to indicate that no match was found. |
944 | 944 |
*/ |
945 |
public String resolvePublic(String publicId, String systemId)
|
|
945 |
public String resolvePublic(String publicId, String systemId) |
|
946 | 946 |
throws MalformedURLException, IOException { |
947 | 947 |
|
948 | 948 |
// If there's a SYSTEM entry in this catalog, use it |
... | ... | |
1036 | 1036 |
|
1037 | 1037 |
// If there's a PUBLIC entry in this catalog, use it |
1038 | 1038 |
boolean over = default_override; |
1039 |
Enumeration enum = catalogEntries.elements();
|
|
1040 |
while (enum.hasMoreElements()) {
|
|
1041 |
CatalogEntry e = (CatalogEntry) enum.nextElement();
|
|
1039 |
Enumeration catalogEnum = catalogEntries.elements();
|
|
1040 |
while (catalogEnum.hasMoreElements()) {
|
|
1041 |
CatalogEntry e = (CatalogEntry) catalogEnum.nextElement();
|
|
1042 | 1042 |
if (e.entryType() == CatalogEntry.OVERRIDE) { |
1043 | 1043 |
over = e.yes_or_no().equalsIgnoreCase("YES"); |
1044 | 1044 |
continue; |
... | ... | |
1054 | 1054 |
|
1055 | 1055 |
// If there's a DELEGATE entry in this catalog, use it |
1056 | 1056 |
over = default_override; |
1057 |
enum = catalogEntries.elements();
|
|
1057 |
catalogEnum = catalogEntries.elements();
|
|
1058 | 1058 |
Vector delCats = new Vector(); |
1059 |
while (enum.hasMoreElements()) {
|
|
1060 |
CatalogEntry e = (CatalogEntry) enum.nextElement();
|
|
1059 |
while (catalogEnum.hasMoreElements()) {
|
|
1060 |
CatalogEntry e = (CatalogEntry) catalogEnum.nextElement();
|
|
1061 | 1061 |
if (e.entryType() == CatalogEntry.OVERRIDE) { |
1062 | 1062 |
over = e.yes_or_no().equalsIgnoreCase("YES"); |
1063 | 1063 |
continue; |
Also available in: Unified diff
Removed occurence of enum which is a keyword in Java 1.5