dleslie     00/02/25 06:15:01

  Modified:    src/org/apache/xalan/xpath/xdom XercesLiaison.java
  Log:
  javadoc cleanup
  
  Revision  Changes    Path
  1.9       +52 -51    
xml-xalan/src/org/apache/xalan/xpath/xdom/XercesLiaison.java
  
  Index: XercesLiaison.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/src/org/apache/xalan/xpath/xdom/XercesLiaison.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XercesLiaison.java        2000/02/23 15:16:16     1.8
  +++ XercesLiaison.java        2000/02/25 14:15:00     1.9
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    if any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
  @@ -26,7 +26,7 @@
    *
    * 4. The names "XSLT4J" and "Apache Software Foundation" must
    *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact [EMAIL PROTECTED]
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -65,13 +65,14 @@
   import org.xml.sax.*;
   import org.w3c.dom.*;
   import org.apache.xalan.xpath.xml.*;
  -import org.apache.xalan.xpath.*; 
  +import org.apache.xalan.xpath.*;
   
   /**
  - * A class that handles interfacing IBM's XML4J2 to the 
  - * XSLT4J XSLT Processor.
  + * Provides XSLTProcessor an interface to the Xerces XML parser.
  + * @see org.apache.xalan.xslt.XSLTProcessor
  + * @see org.apache.xml.parsers
    */
  -public class XercesLiaison extends XMLParserLiaisonDefault implements 
XPathSupport 
  +public class XercesLiaison extends XMLParserLiaisonDefault implements 
XPathSupport
   {
     /**
      * Return a string suitible for telling the user what parser is being used.
  @@ -81,13 +82,13 @@
       return "XML4J Version "+ getXML4JVersionString();
     }
   
  -  public static final String XML4J_VERSION = "XML4J 2.0.15";    
  -    
  +  public static final String XML4J_VERSION = "XML4J 2.0.15";
  +
     /**
      * Flag to make sure we only do the version check once.
      */
     transient private boolean m_didVersionCheck = false;
  -    
  +
     /**
     * Constructor that takes SAX ErrorHandler as an argument. The error handler
     * is registered with the XML Parser. Any XML-related errors will be 
reported
  @@ -99,7 +100,7 @@
     {
       m_errorHandler = errorHandler;
     }
  -  
  +
     /**
      * Construct an instance.
      */
  @@ -107,14 +108,14 @@
     {
       m_envSupport = envSupport;
     }
  -  
  +
     /**
      * Construct an instance.
      */
     public XercesLiaison()
     {
     }
  -  
  +
     /**
      * Check node to see if it matches this liaison.
      */
  @@ -125,18 +126,18 @@
          throw new SAXException("XercesLiaison can not handle nodes of type"
           +((Object)node).getClass());
     }
  -  
  +
     /**
  -   * Returns true that this implementation does support 
  +   * Returns true that this implementation does support
      * the SAX DocumentHandler interface.
      */
     public boolean supportsSAX()
     {
       return true;
     }
  -  
  +
     /**
  -   * Get XML4J's version field... we have to do this 'cause 
  +   * Get Xerces version field... we have to do this 'cause
      * the "public static final" fields seem to get bound
      * at compile time otherwise.
      */
  @@ -154,14 +155,14 @@
       }
       return version;
     }
  -  
  +
     private static final int MAJOR = 1;
     private static final int MINOR = 2;
     private static final int SUBMINOR = 3;
   
     /**
  -   * Get one of the XML4J's version numbers... 
  -   * we have to do this 'cause the "public static final" 
  +   * Get one of the Xerces version numbers...
  +   * we have to do this 'cause the "public static final"
      * fields seem to get bound at compile time otherwise.
      */
     private int getXML4JVersionNum(int field)
  @@ -179,10 +180,10 @@
       }
       return versionNum;
     }
  -  
  +
   
     /**
  -   * Check the XML4J version number
  +   * Check the Xerces version number
      */
     public void checkXML4JVersion()
     {
  @@ -192,11 +193,11 @@
       {
         if(!getXML4JVersionString().equals(XML4J_VERSION))
         {
  -        if(((getXML4JVersionNum(MAJOR) == 2) 
  -            && (getXML4JVersionNum(MINOR) == 0) 
  +        if(((getXML4JVersionNum(MAJOR) == 2)
  +            && (getXML4JVersionNum(MINOR) == 0)
               && (getXML4JVersionNum(SUBMINOR) >= 14))
              ||
  -           ((getXML4JVersionNum(MAJOR) == 2) 
  +           ((getXML4JVersionNum(MAJOR) == 2)
               && (getXML4JVersionNum(MINOR) > 0))
              ||
              (getXML4JVersionNum(MAJOR) > 2))
  @@ -215,7 +216,7 @@
         m_didVersionCheck = true;
       }
     }
  -  
  +
     /**
       * Parse an XML document.
       *
  @@ -271,7 +272,7 @@
       }
       if(getUseValidation())
         parser.setFeature("http://xml.org/sax/features/validation";, true);
  -    
  +
       try
       {
         
parser.setFeature("http://apache.org/xml/features/allow-java-encodings";, true);
  @@ -286,16 +287,16 @@
                          ? "Input XSL" : source.getSystemId();
           parser.setErrorHandler(new 
org.apache.xalan.xpath.xml.DefaultErrorHandler(ident));
         }
  -      
  +
         if(null != m_entityResolver)
         {
           // System.out.println("Setting the entity resolver.");
           parser.setEntityResolver(m_entityResolver);
         }
  -      
  +
         if(null != m_locale)
           parser.setLocale(m_locale);
  -      
  +
         parser.parse(source);
         if(isDomParser)
         {
  @@ -315,9 +316,9 @@
           throw new SAXException("XercesLiaison.parse error", e);
       }
     }
  -  
  +
     /**
  -   * Create an empty DOM Document.  Mainly used for creating an 
  +   * Create an empty DOM Document.  Mainly used for creating an
      * output document.  Implementation of XMLParserLiaison
      * interface method.
      */
  @@ -326,7 +327,7 @@
       org.apache.xerces.dom.DocumentImpl doc = new 
org.apache.xerces.dom.DocumentImpl();
       return doc;
     }
  -  
  +
     /**
      * Given an ID, return the element.
      */
  @@ -334,8 +335,8 @@
     {
       return ((DocumentImpl)doc).getIdentifier(id);
     }
  -  
  -  /** 
  +
  +  /**
      * Tell if the node is ignorable whitespace.
      */
     public boolean isIgnorableWhitespace(Text node)
  @@ -351,14 +352,14 @@
       }
       return isIgnorable;
     }
  -  
  +
     /*
     public String getNamespaceOfNode(Node n)
     {
       return ((org.apache.xerces.dom.NodeImpl)n).getNamespaceURI();
     }
     */
  -  
  +
     /**
      * Returns the local name of the given node.
      */
  @@ -373,7 +374,7 @@
      // public String getExpandedElementName(Element elem)
      // {
       //  String namespace = getNamespaceOfNode(elem);
  -   //   return (null != namespace) ? namespace+":"+ getLocalNameOfNode(elem) 
  +   //   return (null != namespace) ? namespace+":"+ getLocalNameOfNode(elem)
      //                                : getLocalNameOfNode(elem);
      // }
   
  @@ -383,10 +384,10 @@
      // public String getExpandedAttributeName(Attr attr)
      // {
       //  String namespace = getNamespaceOfNode(attr);
  -   //   return (null != namespace) ? namespace+":"+ getLocalNameOfNode(attr) 
  +   //   return (null != namespace) ? namespace+":"+ getLocalNameOfNode(attr)
       //                               : getLocalNameOfNode(attr);
      // }
  -  
  +
     /**
      * Get the parent of a node.
      */
  @@ -399,21 +400,21 @@
   
     class NullSchemaValidator extends 
org.apache.xerces.validators.schema.XSchemaValidator
     {
  -    public NullSchemaValidator(org.apache.xerces.utils.StringPool 
stringPool, 
  -                               org.apache.xerces.framework.XMLErrorReporter 
errorReporter, 
  -                               org.apache.xerces.readers.XMLEntityHandler 
entityHandler) 
  +    public NullSchemaValidator(org.apache.xerces.utils.StringPool stringPool,
  +                               org.apache.xerces.framework.XMLErrorReporter 
errorReporter,
  +                               org.apache.xerces.readers.XMLEntityHandler 
entityHandler)
       {
           super(stringPool, errorReporter, entityHandler);
       }
  -  
  +
       public final void loadSchema(String uri) {}
     }
  -  
  +
     class MyParser extends DOMParser
     {
  -    
  +
       /** Returns the XML Schema validator. */
  -    protected org.apache.xerces.validators.schema.XSchemaValidator 
getSchemaValidator() 
  +    protected org.apache.xerces.validators.schema.XSchemaValidator 
getSchemaValidator()
       {
         if(getUseValidation())
         {
  @@ -429,12 +430,12 @@
     }
   
     /**
  -   * Command line interfact to transform the XML according to 
  +   * Command line interfact to transform the XML according to
      * the instructions found in the XSL document.
      */
     /*
  -  public static void main( String argv[] )    
  -  {    
  +  public static void main( String argv[] )
  +  {
       String[] argv2 = new String[argv.length+2];
       argv2[0] = "-PARSER";
       argv2[1] = "org.apache.xalan.xslt.xml4j2dom.XercesLiaison";
  
  
  

Reply via email to