View | Details | Raw Unified
Collapse All | Expand All

(-) xml-commons-1.0.b2.orig/java/src/org/apache/env/Which.java (-7 / +7 lines)
 Lines 289-300    Link Here 
        if (null == hash)
        if (null == hash)
            return;
            return;
        Enumeration enum = hash.keys();
        Enumeration enum1 = hash.keys();
        Vector v = new Vector();
        Vector v = new Vector();
        while (enum.hasMoreElements())
        while (enum1.hasMoreElements())
        {
        {
            Object key = enum.nextElement();
            Object key = enum1.nextElement();
            String keyStr = key.toString();
            String keyStr = key.toString();
            Object item = hash.get(key);
            Object item = hash.get(key);
 Lines 311-322    Link Here 
            }
            }
        }
        }
        enum = v.elements();
        enum1 = v.elements();
        while (enum.hasMoreElements())
        while (enum1.hasMoreElements())
        {
        {
            String n = (String) enum.nextElement();
            String n = (String) enum1.nextElement();
            Hashtable h = (Hashtable) enum.nextElement();
            Hashtable h = (Hashtable) enum1.nextElement();
            reportHashtable(h, n, out);
            reportHashtable(h, n, out);
        }
        }
(-) xml-commons-1.0.b2.orig/java/src/org/apache/xml/resolver/Catalog.java (-42 / +42 lines)
 Lines 451-459    Link Here 
      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);
    }
    }
 Lines 1064-1072    Link Here 
    }
    }
    // 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) {
 Lines 1140-1148    Link Here 
    // 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;
 Lines 1178-1186    Link Here 
    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
      }
      }
 Lines 1253-1261    Link Here 
    // 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;
 Lines 1339-1347    Link Here 
    // 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;
 Lines 1498-1506    Link Here 
    // 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;
 Lines 1516-1525    Link Here 
    // 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;
 Lines 1624-1632    Link Here 
    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
 Lines 1636-1646    Link Here 
    }
    }
    // 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);
 Lines 1662-1671    Link Here 
    }
    }
    // 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);
 Lines 1759-1767    Link Here 
   */
   */
  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);
 Lines 1769-1779    Link Here 
    }
    }
    // 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);
 Lines 1795-1804    Link Here 
    }
    }
    // 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);
(-) xml-commons-1.0.b2.orig/java/src/org/apache/xml/resolver/Resolver.java (-15 / +15 lines)
 Lines 215-223    Link Here 
      return resolved;
      return resolved;
    }
    }
    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() == RESOLVER) {
      if (e.getEntryType() == RESOLVER) {
	resolved = resolveExternalSystem(uri, e.getEntryArg(0));
	resolved = resolveExternalSystem(uri, e.getEntryArg(0));
	if (resolved != null) {
	if (resolved != null) {
 Lines 272-280    Link Here 
      return resolved;
      return resolved;
    }
    }
    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() == RESOLVER) {
      if (e.getEntryType() == RESOLVER) {
	resolved = resolveExternalSystem(systemId, e.getEntryArg(0));
	resolved = resolveExternalSystem(systemId, e.getEntryArg(0));
	if (resolved != null) {
	if (resolved != null) {
 Lines 334-342    Link Here 
      return resolved;
      return resolved;
    }
    }
    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() == RESOLVER) {
      if (e.getEntryType() == RESOLVER) {
	if (systemId != null) {
	if (systemId != null) {
	  resolved = resolveExternalSystem(systemId,
	  resolved = resolveExternalSystem(systemId,
 Lines 575-583    Link Here 
	Vector map = new Vector();
	Vector map = new Vector();
	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
 Lines 603-611    Link Here 
	Vector map = new Vector();
	Vector map = new Vector();
	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(1).equals(systemId)
		&& (e.getEntryArg(1).equals(systemId)
		    || (windows
		    || (windows