|
|
mapArr.add(null); | mapArr.add(null); |
} | } |
| |
Enumeration enum = readerMap.keys(); |
Enumeration enum1 = readerMap.keys(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
String mimeType = (String) enum.nextElement(); |
String mimeType = (String) enum1.nextElement(); |
Integer pos = (Integer) readerMap.get(mimeType); | Integer pos = (Integer) readerMap.get(mimeType); |
mapArr.set(pos.intValue(), mimeType); | mapArr.set(pos.intValue(), mimeType); |
} | } |
|
|
} | } |
| |
// Parse all the DELEGATE catalogs | // Parse all the DELEGATE catalogs |
Enumeration enum = catalogEntries.elements(); |
Enumeration enum1 = catalogEntries.elements(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
if (e.getEntryType() == DELEGATE_PUBLIC | if (e.getEntryType() == DELEGATE_PUBLIC |
|| e.getEntryType() == DELEGATE_SYSTEM | || e.getEntryType() == DELEGATE_SYSTEM |
|| e.getEntryType() == DELEGATE_URI) { | || e.getEntryType() == DELEGATE_URI) { |
|
|
| |
// If there's a DOCTYPE entry in this catalog, use it | // If there's a DOCTYPE entry in this catalog, use it |
boolean over = default_override; | boolean over = default_override; |
Enumeration enum = catalogEntries.elements(); |
Enumeration enum1 = catalogEntries.elements(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
if (e.getEntryType() == OVERRIDE) { | if (e.getEntryType() == OVERRIDE) { |
over = e.getEntryArg(0).equalsIgnoreCase("YES"); | over = e.getEntryArg(0).equalsIgnoreCase("YES"); |
continue; | continue; |
|
|
| |
Debug.message(3, "resolveDocument"); | Debug.message(3, "resolveDocument"); |
| |
Enumeration enum = catalogEntries.elements(); |
Enumeration enum1 = catalogEntries.elements(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
if (e.getEntryType() == DOCUMENT) { | if (e.getEntryType() == DOCUMENT) { |
return e.getEntryArg(1); //FIXME check this | return e.getEntryArg(1); //FIXME check this |
} | } |
|
|
| |
// If there's a ENTITY entry in this catalog, use it | // If there's a ENTITY entry in this catalog, use it |
boolean over = default_override; | boolean over = default_override; |
Enumeration enum = catalogEntries.elements(); |
Enumeration enum1 = catalogEntries.elements(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
if (e.getEntryType() == OVERRIDE) { | if (e.getEntryType() == OVERRIDE) { |
over = e.getEntryArg(0).equalsIgnoreCase("YES"); | over = e.getEntryArg(0).equalsIgnoreCase("YES"); |
continue; | continue; |
|
|
| |
// If there's a NOTATION entry in this catalog, use it | // If there's a NOTATION entry in this catalog, use it |
boolean over = default_override; | boolean over = default_override; |
Enumeration enum = catalogEntries.elements(); |
Enumeration enum1 = catalogEntries.elements(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
if (e.getEntryType() == OVERRIDE) { | if (e.getEntryType() == OVERRIDE) { |
over = e.getEntryArg(0).equalsIgnoreCase("YES"); | over = e.getEntryArg(0).equalsIgnoreCase("YES"); |
continue; | continue; |
|
|
| |
// If there's a PUBLIC entry in this catalog, use it | // If there's a PUBLIC entry in this catalog, use it |
boolean over = default_override; | boolean over = default_override; |
Enumeration enum = catalogEntries.elements(); |
Enumeration enum1 = catalogEntries.elements(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
if (e.getEntryType() == OVERRIDE) { | if (e.getEntryType() == OVERRIDE) { |
over = e.getEntryArg(0).equalsIgnoreCase("YES"); | over = e.getEntryArg(0).equalsIgnoreCase("YES"); |
continue; | continue; |
|
|
| |
// If there's a DELEGATE_PUBLIC entry in this catalog, use it | // If there's a DELEGATE_PUBLIC entry in this catalog, use it |
over = default_override; | over = default_override; |
enum = catalogEntries.elements(); |
enum1 = catalogEntries.elements(); |
Vector delCats = new Vector(); | Vector delCats = new Vector(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
if (e.getEntryType() == OVERRIDE) { | if (e.getEntryType() == OVERRIDE) { |
over = e.getEntryArg(0).equalsIgnoreCase("YES"); | over = e.getEntryArg(0).equalsIgnoreCase("YES"); |
continue; | continue; |
|
|
| |
String osname = System.getProperty("os.name"); | String osname = System.getProperty("os.name"); |
boolean windows = (osname.indexOf("Windows") >= 0); | boolean windows = (osname.indexOf("Windows") >= 0); |
Enumeration enum = catalogEntries.elements(); |
Enumeration enum1 = catalogEntries.elements(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
if (e.getEntryType() == SYSTEM | if (e.getEntryType() == SYSTEM |
&& (e.getEntryArg(0).equals(systemId) | && (e.getEntryArg(0).equals(systemId) |
|| (windows | || (windows |
|
|
} | } |
| |
// If there's a REWRITE_SYSTEM entry in this catalog, use it | // If there's a REWRITE_SYSTEM entry in this catalog, use it |
enum = catalogEntries.elements(); |
enum1 = catalogEntries.elements(); |
String startString = null; | String startString = null; |
String prefix = null; | String prefix = null; |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
| |
if (e.getEntryType() == REWRITE_SYSTEM) { | if (e.getEntryType() == REWRITE_SYSTEM) { |
String p = (String) e.getEntryArg(0); | String p = (String) e.getEntryArg(0); |
|
|
} | } |
| |
// If there's a DELEGATE_SYSTEM entry in this catalog, use it | // If there's a DELEGATE_SYSTEM entry in this catalog, use it |
enum = catalogEntries.elements(); |
enum1 = catalogEntries.elements(); |
Vector delCats = new Vector(); | Vector delCats = new Vector(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
| |
if (e.getEntryType() == DELEGATE_SYSTEM) { | if (e.getEntryType() == DELEGATE_SYSTEM) { |
String p = (String) e.getEntryArg(0); | String p = (String) e.getEntryArg(0); |
|
|
*/ | */ |
protected String resolveLocalURI(String uri) | protected String resolveLocalURI(String uri) |
throws MalformedURLException, IOException { | throws MalformedURLException, IOException { |
Enumeration enum = catalogEntries.elements(); |
Enumeration enum1 = catalogEntries.elements(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
if (e.getEntryType() == URI | if (e.getEntryType() == URI |
&& (e.getEntryArg(0).equals(uri))) { | && (e.getEntryArg(0).equals(uri))) { |
return e.getEntryArg(1); | return e.getEntryArg(1); |
|
|
} | } |
| |
// If there's a REWRITE_URI entry in this catalog, use it | // If there's a REWRITE_URI entry in this catalog, use it |
enum = catalogEntries.elements(); |
enum1 = catalogEntries.elements(); |
String startString = null; | String startString = null; |
String prefix = null; | String prefix = null; |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
| |
if (e.getEntryType() == REWRITE_URI) { | if (e.getEntryType() == REWRITE_URI) { |
String p = (String) e.getEntryArg(0); | String p = (String) e.getEntryArg(0); |
|
|
} | } |
| |
// If there's a DELEGATE_URI entry in this catalog, use it | // If there's a DELEGATE_URI entry in this catalog, use it |
enum = catalogEntries.elements(); |
enum1 = catalogEntries.elements(); |
Vector delCats = new Vector(); | Vector delCats = new Vector(); |
while (enum.hasMoreElements()) { |
while (enum1.hasMoreElements()) { |
CatalogEntry e = (CatalogEntry) enum.nextElement(); |
CatalogEntry e = (CatalogEntry) enum1.nextElement(); |
| |
if (e.getEntryType() == DELEGATE_URI) { | if (e.getEntryType() == DELEGATE_URI) { |
String p = (String) e.getEntryArg(0); | String p = (String) e.getEntryArg(0); |