xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject cvs commit: xml-commons/java/src/org/apache/xml/resolver/apps resolver.java xparse.java xread.java
Date Wed, 13 Nov 2002 20:55:47 GMT
ndw         2002/11/13 12:55:47

  Modified:    java/src/org/apache/xml/resolver/apps resolver.java
                        xparse.java xread.java
  Log:
  These apps still use the static CatalogManager by default; so make sure we use that manager's
debug object for messages
  
  Revision  Changes    Path
  1.2       +9 -7      xml-commons/java/src/org/apache/xml/resolver/apps/resolver.java
  
  Index: resolver.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/src/org/apache/xml/resolver/apps/resolver.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- resolver.java	30 Jan 2002 12:24:59 -0000	1.1
  +++ resolver.java	13 Nov 2002 20:55:47 -0000	1.2
  @@ -75,7 +75,7 @@
   import javax.xml.transform.sax.SAXSource;
   
   import org.apache.xml.resolver.Catalog;
  -import org.apache.xml.resolver.tools.CatalogResolver;
  +import org.apache.xml.resolver.CatalogManager;
   import org.apache.xml.resolver.helpers.Debug;
   import org.apache.xml.resolver.tools.CatalogResolver;
   
  @@ -120,11 +120,13 @@
    *
    * @version 1.0 */
   public class resolver {
  +  private static Debug debug = CatalogManager.getStaticManager().debug;
  +
     /** The main entry point */
     public static void main (String[] args)
       throws FileNotFoundException, IOException {
   
  -    int     debug        = 0;
  +    int     debuglevel   = 0;
       Vector  catalogFiles = new Vector();
       int     resType      = 0;
       String  resTypeStr   = null;
  @@ -174,9 +176,9 @@
   	++i;
   	String debugstr = args[i];
   	try {
  -	  debug = Integer.parseInt(debugstr);
  -	  if (debug >= 0) {
  -	    Debug.setDebug(debug);
  +	  debuglevel = Integer.parseInt(debugstr);
  +	  if (debuglevel > 0) {
  +	    debug.setDebug(debuglevel);
   	  }
   	} catch (Exception e) {
   	  // nop
  @@ -247,7 +249,7 @@
         } catch (MalformedURLException e) {
   	String userdir = System.getProperty("user.dir");
   	userdir.replace('\\', '/');
  -	Debug.message(1, "Malformed URL on cwd", userdir);
  +	debug.message(1, "Malformed URL on cwd", userdir);
   	base = null;
         }
   
  @@ -258,7 +260,7 @@
   	try {
   	  sysid = new URL("file:///" + systemId);
   	} catch (MalformedURLException e2) {
  -	  Debug.message(1, "Malformed URL on system id", systemId);
  +	  debug.message(1, "Malformed URL on system id", systemId);
   	}
         }
       }
  
  
  
  1.2       +10 -8     xml-commons/java/src/org/apache/xml/resolver/apps/xparse.java
  
  Index: xparse.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/src/org/apache/xml/resolver/apps/xparse.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xparse.java	30 Jan 2002 12:24:59 -0000	1.1
  +++ xparse.java	13 Nov 2002 20:55:47 -0000	1.2
  @@ -72,6 +72,7 @@
   
   import org.apache.xml.resolver.tools.ResolvingParser;
   import org.apache.xml.resolver.Catalog;
  +import org.apache.xml.resolver.CatalogManager;
   import org.apache.xml.resolver.helpers.Debug;
   
   /**
  @@ -116,18 +117,19 @@
    *
    * @version 1.0
    */
  -public class xparse
  -{
  +public class xparse {
  +  private static Debug debug = CatalogManager.getStaticManager().debug;
  +
     /** The main entry point */
     public static void main (String[] args)
       throws FileNotFoundException, IOException {
   
       String  xmlfile    = null;
  -    int     debug      = 0;
  +    int     debuglevel = 0;
       int     maxErrs    = 10;
       boolean nsAware    = true;
       boolean validating = true;
  -    boolean showWarnings = (debug > 2);
  +    boolean showWarnings = (debuglevel > 2);
       boolean showErrors = true;
       Vector catalogFiles = new Vector();
   
  @@ -162,10 +164,10 @@
   	++i;
   	String debugstr = args[i];
   	try {
  -	  debug = Integer.parseInt(debugstr);
  -	  if (debug >= 0) {
  -	    Debug.setDebug(debug);
  -	    showWarnings = (debug > 2);
  +	  debuglevel = Integer.parseInt(debugstr);
  +	  if (debuglevel >= 0) {
  +	    debug.setDebug(debuglevel);
  +	    showWarnings = (debuglevel > 2);
   	  }
   	} catch (Exception e) {
   	  // nop
  
  
  
  1.2       +9 -6      xml-commons/java/src/org/apache/xml/resolver/apps/xread.java
  
  Index: xread.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/src/org/apache/xml/resolver/apps/xread.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xread.java	30 Jan 2002 12:24:59 -0000	1.1
  +++ xread.java	13 Nov 2002 20:55:47 -0000	1.2
  @@ -72,6 +72,7 @@
   
   import org.apache.xml.resolver.tools.ResolvingXMLReader;
   import org.apache.xml.resolver.Catalog;
  +import org.apache.xml.resolver.CatalogManager;
   import org.apache.xml.resolver.helpers.Debug;
   
   /**
  @@ -115,16 +116,18 @@
    */
   public class xread
   {
  +  private static Debug debug = CatalogManager.getStaticManager().debug;
  +
     /** The main entry point */
     public static void main (String[] args)
       throws FileNotFoundException, IOException {
   
       String  xmlfile    = null;
  -    int     debug      = 0;
  +    int     debuglevel = 0;
       int     maxErrs    = 10;
       boolean nsAware    = true;
       boolean validating = true;
  -    boolean showWarnings = (debug > 2);
  +    boolean showWarnings = (debuglevel > 2);
       boolean showErrors = true;
       Vector catalogFiles = new Vector();
   
  @@ -159,10 +162,10 @@
   	++i;
   	String debugstr = args[i];
   	try {
  -	  debug = Integer.parseInt(debugstr);
  -	  if (debug >= 0) {
  -	    Debug.setDebug(debug);
  -	    showWarnings = (debug > 2);
  +	  debuglevel = Integer.parseInt(debugstr);
  +	  if (debuglevel >= 0) {
  +	    debug.setDebug(debuglevel);
  +	    showWarnings = (debuglevel > 2);
   	  }
   	} catch (Exception e) {
   	  // nop
  
  
  

Mime
View raw message