src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLFilter.java

Print this page

        

@@ -1,19 +1,13 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-// ResolvingXMLFilter.java - An XMLFilter that performs catalog resolution
-
-/*
- * Copyright 2001-2004 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

@@ -59,11 +53,11 @@
   /**
    * Suppress explanatory message?
    *
    * @see #parse(InputSource)
    */
-  public static boolean suppressExplanation = false;
+  private static boolean suppressExplanation = false;
 
   /** The manager for the underlying resolver. */
   CatalogManager catalogManager = CatalogManager.getStaticManager();
 
   /** The underlying catalog resolver. */

@@ -73,13 +67,10 @@
   private CatalogResolver piCatalogResolver = null;
 
   /** Are we in the prolog? Is an oasis-xml-catalog PI valid now? */
   private boolean allowXMLCatalogPI = false;
 
-  /** Has an oasis-xml-catalog PI been seen? */
-  private boolean oasisXMLCatalogPI = false;
-
   /** The base URI of the input document, if known. */
   private URL baseURL = null;
 
   /** Construct an empty XML Filter with no parent. */
   public ResolvingXMLFilter() {

@@ -200,11 +191,14 @@
         InputStream iStream = url.openStream();
         iSource.setByteStream(iStream);
 
         return iSource;
       } catch (Exception e) {
-        catalogManager.debug.message(1, "Failed to create InputSource", resolved);
+        catalogManager.debug.message(1,
+                                     "Failed to create InputSource ("
+                                     + e.toString()
+                                     + ")", resolved);
         return null;
       }
     } else {
       return null;
     }

@@ -287,11 +281,10 @@
           catalogManager.debug.message(4,"oasis-xml-catalog PI", pidata);
 
           if (catalog != null) {
             try {
               catalogManager.debug.message(4,"oasis-xml-catalog", catalog.toString());
-              oasisXMLCatalogPI = true;
 
               if (piCatalogResolver == null) {
                 piCatalogResolver = new CatalogResolver(true);
               }