You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2001/10/10 20:08:29 UTC

cvs commit: xml-xalan/java/src/javax/xml/transform/stream StreamResult.java StreamSource.java package.html

curcuru     01/10/10 11:08:29

  Modified:    java/src/javax/xml/parsers DocumentBuilder.java
                        DocumentBuilderFactory.java
                        FactoryConfigurationError.java
                        ParserConfigurationException.java SAXParser.java
                        SAXParserFactory.java package.html
               java/src/javax/xml/transform ErrorListener.java
                        OutputKeys.java Result.java Source.java
                        SourceLocator.java Templates.java Transformer.java
                        TransformerConfigurationException.java
                        TransformerException.java TransformerFactory.java
                        TransformerFactoryConfigurationError.java
                        URIResolver.java overview.html package.html
               java/src/javax/xml/transform/dom DOMLocator.java
                        DOMResult.java DOMSource.java package.html
               java/src/javax/xml/transform/sax SAXResult.java
                        SAXSource.java SAXTransformerFactory.java
                        TemplatesHandler.java TransformerHandler.java
                        package.html
               java/src/javax/xml/transform/stream StreamResult.java
                        StreamSource.java package.html
  Added:       java/src/javax/xml/parsers FactoryFinder.java
               java/src/javax/xml/transform FactoryFinder.java
  Log:
  Checkin xml-commons versions of DOM/JAXP/SAX files to xml-xalan tree;
  previous Xalan copies were tagged 'before-commons'
  
  Revision  Changes    Path
  1.4       +66 -39    xml-xalan/java/src/javax/xml/parsers/DocumentBuilder.java
  
  Index: DocumentBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/parsers/DocumentBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DocumentBuilder.java	2000/12/20 04:55:17	1.3
  +++ DocumentBuilder.java	2001/10/10 18:08:28	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -49,14 +48,10 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  + * originally based on software copyright (c) 1999-2001, Sun Microsystems,
  + * Inc., http://www.sun.com.  For more information on the Apache Software
  + * Foundation, please see <http://www.apache.org/>.
    */
  -/**
  - * $Id: DocumentBuilder.java,v 1.3 2000/12/20 04:55:17 sboag Exp $
  - */
   package javax.xml.parsers;
   
   import java.io.InputStream;
  @@ -74,20 +69,28 @@
   /**
    * Defines the API to obtain DOM Document instances from an XML
    * document. Using this class, an application programmer can obtain a
  - * <code>org.w3c.dom.Document</code> from XML.<p>
  + * {@link org.w3c.dom.Document} from XML.<p>
    *
    * An instance of this class can be obtained from the
  - * <code>DocumentBuilderFactory.newDocumentBuilder</code> method. Once
  + * {@link javax.xml.parsers.DocumentBuilderFactory#newDocumentBuilder()
  + * DocumentBuilderFactory.newDocumentBuilder} method. Once
    * an instance of this class is obtained, XML can be parsed from a
    * variety of input sources. These input sources are InputStreams,
    * Files, URLs, and SAX InputSources.<p>
    *
    * Note that this class reuses several classes from the SAX API. This
    * does not require that the implementor of the underlying DOM
  - * implmenetation use a SAX parser to parse XML document into a
  + * implementation use a SAX parser to parse XML document into a
    * <code>Document</code>. It merely requires that the implementation
  - * communicate with the application using these existing APIs.
  + * communicate with the application using these existing APIs. <p>
    *
  + * An implementation of <code>DocumentBuilder</code> is <em>NOT</em> 
  + * guaranteed to behave as per the specification if it is used concurrently by 
  + * two or more threads. It is recommended to have one instance of the
  + * <code>DocumentBuilder</code> per thread or it is upto the application to 
  + * make sure about the use of <code>DocumentBuilder</code> from more than one
  + * thread.
  + *
    * @since JAXP 1.0
    * @version 1.0
    */
  @@ -98,8 +101,8 @@
       }
   
       /**
  -     * Parse the content of the given InputStream as an XML document
  -     * and return a new DOM Document object.
  +     * Parse the content of the given <code>InputStream</code> as an XML 
  +     * document and return a new DOM {@link org.w3c.dom.Document} object.
        *
        * @param is InputStream containing the content to be parsed.
        * @exception IOException If any IO errors occur.
  @@ -120,15 +123,16 @@
       }
   
       /**
  -     * Parse the content of the given InputStream as an XML document
  -     * and return a new DOM Document object.
  +     * Parse the content of the given <code>InputStream</code> as an XML 
  +     * document and return a new DOM {@link org.w3c.dom.Document} object.
        *
        * @param is InputStream containing the content to be parsed.
  -     * @param systemId Provide a base for resolving relative URIs. 
  +     * @param systemId Provide a base for resolving relative URIs.
        * @exception IOException If any IO errors occur.
        * @exception SAXException If any parse errors occur.
  -     * @exception IllegalArgumentException If the InputStream is null
  +     * @exception IllegalArgumentException If the InputStream is null.
        * @see org.xml.sax.DocumentHandler
  +     * @return A new DOM Document object.
        */
       
       public Document parse(InputStream is, String systemId)
  @@ -139,19 +143,20 @@
           }
           
           InputSource in = new InputSource(is);
  -        in.setSystemId(systemId);
  +    in.setSystemId(systemId);
           return parse(in);
       }
   
       /**
        * Parse the content of the given URI as an XML document
  -     * and return a new DOM Document object.
  +     * and return a new DOM {@link org.w3c.dom.Document} object.
        *
        * @param uri The location of the content to be parsed.
        * @exception IOException If any IO errors occur.
        * @exception SAXException If any parse errors occur.
  -     * @exception IllegalArgumentException If the URI is null
  +     * @exception IllegalArgumentException If the URI is null.
        * @see org.xml.sax.DocumentHandler
  +     * @return A new DOM Document object.
        */
       
       public Document parse(String uri)
  @@ -167,13 +172,14 @@
   
       /**
        * Parse the content of the given file as an XML document
  -     * and return a new DOM Document object.
  +     * and return a new DOM {@link org.w3c.dom.Document} object.
        *
  -     * @param f The file containing the XML to parse
  +     * @param f The file containing the XML to parse.
        * @exception IOException If any IO errors occur.
        * @exception SAXException If any parse errors occur.
  -     * @exception IllegalArgumentException If the file is null
  +     * @exception IllegalArgumentException If the file is null.
        * @see org.xml.sax.DocumentHandler
  +     * @return A new DOM Document object.
        */
       
       public Document parse(File f)
  @@ -184,22 +190,23 @@
           }
           
           String uri = "file:" + f.getAbsolutePath();
  -        if (File.separatorChar == '\\') {
  -            uri = uri.replace('\\', '/');
  -        }
  +    if (File.separatorChar == '\\') {
  +        uri = uri.replace('\\', '/');
  +    }
           InputSource in = new InputSource(uri);
           return parse(in);
       }
   
       /**
        * Parse the content of the given input source as an XML document
  -     * and return a new DOM Document object.
  +     * and return a new DOM {@link org.w3c.dom.Document} object.
        *
        * @param is InputSource containing the content to be parsed.
        * @exception IOException If any IO errors occur.
        * @exception SAXException If any parse errors occur.
  -     * @exception IllegalArgumentException If the InputSource is null
  +     * @exception IllegalArgumentException If the InputSource is null.
        * @see org.xml.sax.DocumentHandler
  +     * @return A new DOM Document object.
        */
       
       public abstract Document parse(InputSource is)
  @@ -209,6 +216,9 @@
       /**
        * Indicates whether or not this parser is configured to
        * understand namespaces.
  +     *
  +     * @return true if this parser is configured to understand
  +     *         namespaces; false otherwise.
        */
   
       public abstract boolean isNamespaceAware();
  @@ -216,39 +226,56 @@
       /**
        * Indicates whether or not this parser is configured to
        * validate XML documents.
  +     *
  +     * @return true if this parser is configured to validate
  +     *         XML documents; false otherwise.
        */
       
       public abstract boolean isValidating();
   
       /**
  -     * Specify the <code>EntityResolver</code> to be used to resolve
  +     * Specify the {@link org.xml.sax.EntityResolver} to be used to resolve
        * entities present in the XML document to be parsed. Setting
        * this to <code>null</code> will result in the underlying
        * implementation using it's own default implementation and
        * behavior.
  +     *
  +     * @param er The <code>EntityResolver</code> to be used to resolve entities
  +     *           present in the XML document to be parsed.
        */
   
       public abstract void setEntityResolver(org.xml.sax.EntityResolver er);
   
       /**
  -     * Specify the <code>ErrorHandler</code> to be used to resolve
  -     * entities present in the XML document to be parsed. Setting
  +     * Specify the {@link org.xml.sax.ErrorHandler} to be used to report 
  +     * errors present in the XML document to be parsed. Setting
        * this to <code>null</code> will result in the underlying
        * implementation using it's own default implementation and
        * behavior.
  +     *
  +     * @param eh The <code>ErrorHandler</code> to be used to report errors
  +     *           present in the XML document to be parsed.
        */
   
       public abstract void setErrorHandler(org.xml.sax.ErrorHandler eh);
   
       /**
  -     * Obtain a new instance of a DOM Document object to build a DOM
  -     * tree with.
  +     * Obtain a new instance of a DOM {@link org.w3c.dom.Document} object
  +     * to build a DOM tree with.  An alternative way to create a DOM
  +     * Document object is to use the
  +     * {@link #getDOMImplementation() getDOMImplementation}
  +     * method to get a DOM Level 2 DOMImplementation object and then use
  +     * DOM Level 2 methods on that object to create a DOM Document object.
  +     *
  +     * @return A new instance of a DOM Document object.
        */
       
       public abstract Document newDocument();
   
       /**
  -     * Obtain an instance of a DOMImplementation object.
  +     * Obtain an instance of a {@link org.w3c.dom.DOMImplementation} object.
  +     *
  +     * @return A new instance of a <code>DOMImplementation</code>.
        */
   
       public abstract DOMImplementation getDOMImplementation();
  
  
  
  1.6       +90 -197   xml-xalan/java/src/javax/xml/parsers/DocumentBuilderFactory.java
  
  Index: DocumentBuilderFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/parsers/DocumentBuilderFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DocumentBuilderFactory.java	2001/05/15 21:18:14	1.5
  +++ DocumentBuilderFactory.java	2001/10/10 18:08:28	1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -49,13 +48,11 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  + * originally based on software copyright (c) 1999-2001, Sun Microsystems,
  + * Inc., http://www.sun.com.  For more information on the Apache Software
  + * Foundation, please see <http://www.apache.org/>.
    */
   
  -
   package javax.xml.parsers;
   
   import java.io.InputStream;
  @@ -71,17 +68,20 @@
    * Defines a factory API that enables applications to obtain a
    * parser that produces DOM object trees from XML documents.
    *
  + * An implementation of the <code>DocumentBuilderFactory</code> class is
  + * <em>NOT</em> guaranteed to be thread safe. It is up to the user application 
  + * to make sure about the use of the <code>DocumentBuilderFactory</code> from 
  + * more than one thread. Alternatively the application can have one instance 
  + * of the <code>DocumentBuilderFactory</code> per thread.
  + * An application can use the same instance of the factory to obtain one or 
  + * more instances of the <code>DocumentBuilder</code> provided the instance
  + * of the factory isn't being used in more than one thread at a time.
  + *
    * @since JAXP 1.0
    * @version 1.0
  - * @author Rajiv Mordani
  - * @author James Davidson
    */
   
   public abstract class DocumentBuilderFactory {
  -    /** The default property name according to the JAXP spec */
  -    private static final String defaultPropName =
  -        "javax.xml.parsers.DocumentBuilderFactory";
  -
       private boolean validating = false;
       private boolean namespaceAware = false;
       private boolean whitespace = false;
  @@ -106,13 +106,14 @@
        * property.
        * </li>
        * <li>
  -     * Use the JAVA_HOME(the parent directory where jdk is
  -     * installed)/lib/jaxp.properties for a property file that contains the
  -     * name of the implementation class keyed on the same value as the
  -     * system property defined above.
  +     * Use the properties file "lib/jaxp.properties" in the JRE directory.
  +     * This configuration file is in standard <code>java.util.Properties
  +     * </code> format and contains the fully qualified name of the
  +     * implementation class with the key being the system property defined
  +     * above.
        * </li>
        * <li>
  -     * Use the Services API (as detailed in teh JAR specification), if
  +     * Use the Services API (as detailed in the JAR specification), if
        * available, to determine the classname. The Services API will look
        * for a classname in the file
        * <code>META-INF/services/javax.xml.parsers.DocumentBuilderFactory</code>
  @@ -129,73 +130,30 @@
        *
        * @exception FactoryConfigurationError if the implementation is not
        * available or cannot be instantiated.
  -     */    
  +     */
       
  -    public static DocumentBuilderFactory newInstance() {
  -        String factoryImplName = findFactory(defaultPropName,
  -                                             "org.apache.crimson.jaxp.DocumentBuilderFactoryImpl");
  -        // the default can be removed after services are tested well enough
  -
  -        if (factoryImplName == null) {
  -            throw new FactoryConfigurationError(
  -                "No default implementation found");
  -        }
  -
  -        DocumentBuilderFactory factoryImpl;
  +    public static DocumentBuilderFactory newInstance()
  +        throws FactoryConfigurationError
  +    {
           try {
  -            Class clazz = getClassForName(factoryImplName);
  -            factoryImpl = (DocumentBuilderFactory)clazz.newInstance();
  -        } catch  (ClassNotFoundException cnfe) {
  -            throw new FactoryConfigurationError(cnfe);
  -        } catch (IllegalAccessException iae) {
  -            throw new FactoryConfigurationError(iae);
  -        } catch (InstantiationException ie) {
  -            throw new FactoryConfigurationError(ie);
  +            return (DocumentBuilderFactory) FactoryFinder.find(
  +                /* The default property name according to the JAXP spec */
  +                "javax.xml.parsers.DocumentBuilderFactory",
  +                /* The fallback implementation class name */
  +                "org.apache.crimson.jaxp.DocumentBuilderFactoryImpl");
  +        } catch (FactoryFinder.ConfigurationError e) {
  +            throw new FactoryConfigurationError(e.getException(),
  +                                                e.getMessage());
           }
  -        return factoryImpl;
  -    }
  -
  -    /** a zero length Object array used in getClassForName() */
  -    private static final Object NO_OBJS[] = new Object[0];
  -    /** the Method object for getContextClassLoader */
  -    private static java.lang.reflect.Method getCCL;
  -    
  -    static {
  -	try { 
  -	    getCCL = Thread.class.getMethod("getContextClassLoader",
  -					    new Class[0]);
  -	} catch (Exception e) {
  -	    getCCL = null;
  -	}
       }
       
  -    private static Class getClassForName(String className )
  -        throws ClassNotFoundException
  -    {
  -	if (getCCL != null) {
  -	    try {
  -		ClassLoader contextClassLoader =
  -		    (ClassLoader) getCCL.invoke(Thread.currentThread(),
  -						NO_OBJS);
  -		return contextClassLoader.loadClass(className);
  -	    } catch (ClassNotFoundException cnfe) {
  -		// nothing, try again with Class.forName 
  -	    } catch (Exception e) {
  -		getCCL = null; // don't try again
  -		// fallback
  -	    }
  -	}
  -	
  -	return Class.forName(className);
  -    }
  -
  -    
       /**
  -     * Creates a new instance of a DocumentBuilder using the
  -     * currently configured parameters.
  +     * Creates a new instance of a {@link javax.xml.parsers.DocumentBuilder}
  +     * using the currently configured parameters.
        *
        * @exception ParserConfigurationException if a DocumentBuilder
  -     * cannot be created which satisfies the configuration requested
  +     * cannot be created which satisfies the configuration requested.
  +     * @return A new instance of a DocumentBuilder.
        */
       
       public abstract DocumentBuilder newDocumentBuilder()
  @@ -204,8 +162,11 @@
       
       /**
        * Specifies that the parser produced by this code will
  -     * provide support for XML namespaces. By default the value of this is set 
  +     * provide support for XML namespaces. By default the value of this is set
        * to <code>false</code>
  +     *
  +     * @param awareness true if the parser produced will provide support
  +     *                  for XML namespaces; false otherwise.
        */
       
       public void setNamespaceAware(boolean awareness) {
  @@ -215,7 +176,10 @@
       /**
        * Specifies that the parser produced by this code will
        * validate documents as they are parsed. By default the value of this
  -     * is set to <code>false</code>
  +     * is set to <code>false</code>.
  +     *
  +     * @param validating true if the parser produced will validate documents
  +     *                   as they are parsed; false otherwise.
        */
       
       public void setValidating(boolean validating) {
  @@ -224,13 +188,17 @@
   
       /**
        * Specifies that the parsers created by this  factory must eliminate
  -     * whitespace in element content (sometimes known loosely as 
  +     * whitespace in element content (sometimes known loosely as
        * 'ignorable whitespace') when parsing XML documents (see XML Rec
        * 2.10). Note that only whitespace which is directly contained within
        * element content that has an element only content model (see XML
        * Rec 3.2.1) will be eliminated. Due to reliance on the content model
  -     * this setting requires the parser to be in validating mode. By default 
  -     * the value of this is set to <code>false</code>
  +     * this setting requires the parser to be in validating mode. By default
  +     * the value of this is set to <code>false</code>.
  +     *
  +     * @param whitespace true if the parser created must eliminate whitespace
  +     *                   in the element content when parsing XML documents;
  +     *                   false otherwise.
        */
   
       public void setIgnoringElementContentWhitespace(boolean whitespace) {
  @@ -239,8 +207,11 @@
   
       /**
        * Specifies that the parser produced by this code will
  -     * expand entity reference nodes. By default the value of this is set to 
  +     * expand entity reference nodes. By default the value of this is set to
        * <code>true</code>
  +     *
  +     * @param expandEntityRef true if the parser produced will expand entity
  +     *                        reference nodes; false otherwise.
        */
       
       public void setExpandEntityReferences(boolean expandEntityRef) {
  @@ -259,9 +230,13 @@
   
       /**
        * Specifies that the parser produced by this code will
  -     * convert CDATA nodes to Text nodes and append it to the 
  -     * adjacent (if any) text node. By default the value of this is set to 
  +     * convert CDATA nodes to Text nodes and append it to the
  +     * adjacent (if any) text node. By default the value of this is set to
        * <code>false</code>
  +     *
  +     * @param coalescing  true if the parser produced will convert CDATA nodes
  +     *                    to Text nodes and append it to the adjacent (if any)
  +     *                    text node; false otherwise.
        */
       
       public void setCoalescing(boolean coalescing) {
  @@ -271,6 +246,9 @@
       /**
        * Indicates whether or not the factory is configured to produce
        * parsers which are namespace aware.
  +     *
  +     * @return  true if the factory is configured to produce parsers which
  +     *          are namespace aware; false otherwise.
        */
       
       public boolean isNamespaceAware() {
  @@ -280,6 +258,9 @@
       /**
        * Indicates whether or not the factory is configured to produce
        * parsers which validate the XML content during parse.
  +     *
  +     * @return  true if the factory is configured to produce parsers
  +     *          which validate the XML content during parse; false otherwise.
        */
       
       public boolean isValidating() {
  @@ -289,6 +270,10 @@
       /**
        * Indicates whether or not the factory is configured to produce
        * parsers which ignore ignorable whitespace in element content.
  +     *
  +     * @return  true if the factory is configured to produce parsers
  +     *          which ignore ignorable whitespace in element content;
  +     *          false otherwise.
        */
       
       public boolean isIgnoringElementContentWhitespace() {
  @@ -298,6 +283,9 @@
       /**
        * Indicates whether or not the factory is configured to produce
        * parsers which expand entity reference nodes.
  +     *
  +     * @return  true if the factory is configured to produce parsers
  +     *          which expand entity reference nodes; false otherwise.
        */
       
       public boolean isExpandEntityReferences() {
  @@ -307,6 +295,9 @@
       /**
        * Indicates whether or not the factory is configured to produce
        * parsers which ignores comments.
  +     *
  +     * @return  true if the factory is configured to produce parsers
  +     *          which ignores comments; false otherwise.
        */
       
       public boolean isIgnoringComments() {
  @@ -317,6 +308,10 @@
        * Indicates whether or not the factory is configured to produce
        * parsers which converts CDATA nodes to Text nodes and appends it to
        * the adjacent (if any) Text node.
  +     *
  +     * @return  true if the factory is configured to produce parsers
  +     *          which converts CDATA nodes to Text nodes and appends it to
  +     *          the adjacent (if any) Text node; false otherwise.
        */
       
       public boolean isCoalescing() {
  @@ -324,126 +319,24 @@
       }
   
       /**
  -     * Allows the user to set specific attributes on the underlying 
  +     * Allows the user to set specific attributes on the underlying
        * implementation.
        * @param name The name of the attribute.
        * @param value The value of the attribute.
  -     * @exception IllegalArgumentException thrown if the underlying 
  +     * @exception IllegalArgumentException thrown if the underlying
        * implementation doesn't recognize the attribute.
        */
  -    public abstract void setAttribute(String name, Object value) 
  -                        throws IllegalArgumentException;
  +    public abstract void setAttribute(String name, Object value)
  +                throws IllegalArgumentException;
   
       /**
  -     * Allows the user to retrieve specific attributes on the underlying 
  +     * Allows the user to retrieve specific attributes on the underlying
        * implementation.
        * @param name The name of the attribute.
        * @return value The value of the attribute.
  -     * @exception IllegalArgumentException thrown if the underlying 
  +     * @exception IllegalArgumentException thrown if the underlying
        * implementation doesn't recognize the attribute.
        */
       public abstract Object getAttribute(String name)
  -                        throws IllegalArgumentException;
  -    
  -    // -------------------- private methods --------------------
  -    // This code is duplicated in all factories.
  -    // Keep it in sync or move it to a common place 
  -    // Because it's small probably it's easier to keep it here
  -    /** Avoid reading all the files when the findFactory
  -        method is called the second time ( cache the result of
  -        finding the default impl )
  -    */
  -    private static String foundFactory=null;
  -
  -    /** Temp debug code - this will be removed after we test everything
  -     */
  -    private static boolean debug=false;
  -    static {
  -	try {
  -	    debug=System.getProperty( "jaxp.debug" ) != null;
  -	} catch(SecurityException se ) {}
  -    }
  -
  -    /** Private implementation method - will find the implementation
  -        class in the specified order.
  -        @param factoryId   Name of the factory interface
  -        @param xmlProperties Name of the properties file based on JAVA/lib
  -        @param defaultFactory Default implementation, if nothing else is found
  -    */
  -    private static String findFactory(String factoryId, 
  -                                      String defaultFactory)
  -    {
  -        // Use the system property first
  -        try {
  -            String systemProp =
  -                System.getProperty( factoryId );
  -            if( systemProp!=null) {
  -                if( debug ) 
  -                    System.err.println("JAXP: found system property" +
  -                                       systemProp );
  -                return systemProp;
  -            }
  -            
  -        }catch (SecurityException se) {
  -        }
  -
  -        if( foundFactory!=null)
  -            return foundFactory;
  -        
  -        // try to read from $java.home/lib/xml.properties
  -        try {
  -            String javah=System.getProperty( "java.home" );
  -            String configFile = javah + File.separator +
  -                "lib" + File.separator + "jaxp.properties";
  -            File f=new File( configFile );
  -            if( f.exists()) {
  -                Properties props=new Properties();
  -                props.load( new FileInputStream(f));
  -                foundFactory=props.getProperty( factoryId );
  -                if( debug )
  -                    System.err.println("JAXP: found java.home property " +
  -                                       foundFactory );
  -                if(foundFactory!=null )
  -                    return foundFactory;
  -            }
  -        } catch(Exception ex ) {
  -            if( debug ) ex.printStackTrace();
  -        }
  -
  -        String serviceId = "META-INF/services/" + factoryId;
  -        // try to find services in CLASSPATH
  -        try {
  -            ClassLoader cl=DocumentBuilderFactory.class.getClassLoader();
  -            InputStream is=null;
  -            if( cl == null ) {
  -                is=ClassLoader.getSystemResourceAsStream( serviceId );
  -            } else {
  -                is=cl.getResourceAsStream( serviceId );
  -            }
  -            
  -            if( is!=null ) {
  -                if( debug )
  -                    System.err.println("JAXP: found  " +
  -                                       serviceId);
  -                BufferedReader rd=new BufferedReader( new
  -                    InputStreamReader(is));
  -                
  -                foundFactory=rd.readLine();
  -                rd.close();
  -
  -                if( debug )
  -                    System.err.println("JAXP: loaded from services: " +
  -                                       foundFactory );
  -                if( foundFactory != null &&
  -                    !  "".equals( foundFactory) ) {
  -                    return foundFactory;
  -                }
  -            }
  -        } catch( Exception ex ) {
  -            if( debug ) ex.printStackTrace();
  -        }
  -
  -        return defaultFactory;
  -    }
  -
  +                throws IllegalArgumentException;
   }
  
  
  
  1.6       +11 -13    xml-xalan/java/src/javax/xml/parsers/FactoryConfigurationError.java
  
  Index: FactoryConfigurationError.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/parsers/FactoryConfigurationError.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FactoryConfigurationError.java	2001/01/24 19:47:11	1.5
  +++ FactoryConfigurationError.java	2001/10/10 18:08:28	1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -49,13 +48,11 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  + * originally based on software copyright (c) 1999-2001, Sun Microsystems,
  + * Inc., http://www.sun.com.  For more information on the Apache Software
  + * Foundation, please see <http://www.apache.org/>.
    */
   
  -
   package javax.xml.parsers;
   
   /**
  @@ -70,7 +67,6 @@
   
   public class FactoryConfigurationError extends Error {
   
  -    /** @serial */
       private Exception exception;
   
       /**
  @@ -80,7 +76,7 @@
   
        public FactoryConfigurationError() {
            super();
  -         this.exception = null; 
  +    	 this.exception = null; 
        }
   
       /**
  @@ -128,7 +124,9 @@
       /**
        * Return the message (if any) for this error . If there is no
        * message for the exception and there is an encapsulated
  -     * exception then the message of that exception will be returned.
  +     * exception then the message of that exception, if it exists will be 
  +     * returned. Else the name of the encapsulated exception will be
  +     * returned.
        *
        * @return The error message.
        */
  
  
  
  1.4       +8 -11     xml-xalan/java/src/javax/xml/parsers/ParserConfigurationException.java
  
  Index: ParserConfigurationException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/parsers/ParserConfigurationException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ParserConfigurationException.java	2000/12/20 04:55:18	1.3
  +++ ParserConfigurationException.java	2001/10/10 18:08:28	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -49,13 +48,11 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  + * originally based on software copyright (c) 1999-2001, Sun Microsystems,
  + * Inc., http://www.sun.com.  For more information on the Apache Software
  + * Foundation, please see <http://www.apache.org/>.
    */
   
  -
   package javax.xml.parsers;
   
   /**
  @@ -78,7 +75,7 @@
   
       /**
        * Create a new <code>ParserConfigurationException</code> with
  -     * the <code>String </code> specified as an error message.
  +     * the <code>String</code> specified as an error message.
        *
        * @param msg The error message for the exception.
        */
  
  
  
  1.4       +95 -72    xml-xalan/java/src/javax/xml/parsers/SAXParser.java
  
  Index: SAXParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/parsers/SAXParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SAXParser.java	2000/12/20 04:55:18	1.3
  +++ SAXParser.java	2001/10/10 18:08:28	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -49,14 +48,12 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  + * originally based on software copyright (c) 1999-2001, Sun Microsystems,
  + * Inc., http://www.sun.com.  For more information on the Apache Software
  + * Foundation, please see <http://www.apache.org/>.
    */
   
   
  -
   package javax.xml.parsers;
   
   import java.io.InputStream;
  @@ -74,37 +71,36 @@
   
   
   /**
  - * Defines the API that wraps an <code>org.xml.sax.XMLReader</code>
  - * implementation class. In JAXP 1.0, this class wrapped the <code>
  - * org.xml.sax.Parser</code> interface, however this interface was
  - * replaced by the <code>XMLReader</code>. For ease
  + * Defines the API that wraps an {@link org.xml.sax.XMLReader}
  + * implementation class. In JAXP 1.0, this class wrapped the
  + * {@link org.xml.sax.Parser} interface, however this interface was
  + * replaced by the {@link org.xml.sax.XMLReader}. For ease
    * of transition, this class continues to support the same name
    * and interface as well as supporting new methods.
    *
    * An instance of this class can be obtained from the
  - * <code>SAXParserFactory.newSAXParser</code> method. Once an instance
  - * of this class is obtained, XML can be parsed from a variety of
  - * input sources. These input sources are InputStreams, Files, URLs,
  - * and SAX InputSources.<p>
  - * This static method creates a new factory instance based
  - * on a system property setting or uses the platform default
  - * if no property has been defined.<p>
  - *
  - * The system property that controls which Factory implementation
  - * to create is named &quot;javax.xml.parsers.SAXParserFactory&quot;.
  - * This property names a class that is a concrete subclass of this
  - * abstract class. If no property is defined, a platform default
  - * will be used.</p>
  + * {@link javax.xml.parsers.SAXParserFactory#newSAXParser()} method.
  + * Once an instance of this class is obtained, XML can be parsed from
  + * a variety of input sources. These input sources are InputStreams,
  + * Files, URLs, and SAX InputSources.<p>
  + *
    *
    * As the content is parsed by the underlying parser, methods of the
  - * given <code>HandlerBase</code> or the <code>DefaultHandler</code> are 
  - * called.<p>
  + * given {@link org.xml.sax.HandlerBase} or the
  + * {@link org.xml.sax.helpers.DefaultHandler} are called.<p>
    *
  - * Implementors of this class which wrap an underlaying implementation
  - * can consider using the <code>org.xml.sax.helpers.ParserAdapter</code>
  + * Implementors of this class which wrap an underlying implementation
  + * can consider using the {@link org.xml.sax.helpers.ParserAdapter}
    * class to initially adapt their SAX1 impelemntation to work under
  - * this revised class.
  + * this revised class.<p>
    *
  + * An implementation of <code>SAXParser</code> is <em>NOT</em> 
  + * guaranteed to behave as per the specification if it is used concurrently by 
  + * two or more threads. It is recommended to have one instance of the
  + * <code>SAXParser</code> per thread or it is upto the application to 
  + * make sure about the use of <code>SAXParser</code> from more than one
  + * thread.
  + *
    * @since JAXP 1.0
    * @version 1.0
    */
  @@ -116,16 +112,17 @@
       }
   
       /**
  -     * Parse the content of the given <code>java.io.InputStream</code>
  -     * instance as XML using the specified
  -     * <code>org.xml.sax.HandlerBase</code>. 
  -     * <i> Use of the DefaultHandler version of this method is recommended as 
  +     * Parse the content of the given {@link java.io.InputStream}
  +     * instance as XML using the specified {@link org.xml.sax.HandlerBase}.
  +     * <i> Use of the DefaultHandler version of this method is recommended as
        * the HandlerBase class has been deprecated in SAX 2.0</i>
        *
        * @param is InputStream containing the content to be parsed.
        * @param hb The SAX HandlerBase to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the given InputStream is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -141,10 +138,9 @@
       }
   
       /**
  -     * Parse the content of the given <code>java.io.InputStream</code>
  -     * instance as XML using the specified
  -     * <code>org.xml.sax.HandlerBase</code>.
  -     * <i> Use of the DefaultHandler version of this method is recommended as 
  +     * Parse the content of the given {@link java.io.InputStream}
  +     * instance as XML using the specified {@link org.xml.sax.HandlerBase}.
  +     * <i> Use of the DefaultHandler version of this method is recommended as
        * the HandlerBase class has been deprecated in SAX 2.0</i>
        *
        * @param is InputStream containing the content to be parsed.
  @@ -152,6 +148,8 @@
        * @param systemId The systemId which is needed for resolving relative URIs.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the given InputStream is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        * version of this method instead.
        */
  @@ -169,14 +167,16 @@
       }
      
       /**
  -     * Parse the content of the given <code>java.io.InputStream</code>
  +     * Parse the content of the given {@link java.io.InputStream}
        * instance as XML using the specified
  -     * <code>org.xml.sax.helpers.DefaultHandler</code>.
  +     * {@link org.xml.sax.helpers.DefaultHandler}.
        *
        * @param is InputStream containing the content to be parsed.
        * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the given InputStream is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -189,18 +189,20 @@
           
           InputSource input = new InputSource(is);
           this.parse(input, dh);
  -    } 
  +    }
   
       /**
  -     * Parse the content of the given <code>java.io.InputStream</code>
  +     * Parse the content of the given {@link java.io.InputStream}
        * instance as XML using the specified
  -     * <code>org.xml.sax.helpers.DefaultHandler</code>.
  +     * {@link org.xml.sax.helpers.DefaultHandler}.
        *
        * @param is InputStream containing the content to be parsed.
        * @param dh The SAX DefaultHandler to use.
        * @param systemId The systemId which is needed for resolving relative URIs.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the given InputStream is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        * version of this method instead.
        */
  @@ -215,19 +217,21 @@
           InputSource input = new InputSource(is);
           input.setSystemId(systemId);
           this.parse(input, dh);
  -    } 
  +    }
   
       /**
        * Parse the content described by the giving Uniform Resource
        * Identifier (URI) as XML using the specified
  -     * <code>org.xml.sax.HandlerBase</code>.
  -     * <i> Use of the DefaultHandler version of this method is recommended as 
  -     * the HandlerBase class has been deprecated in SAX 2.0</i>
  +     * {@link org.xml.sax.HandlerBase}.
  +     * <i> Use of the DefaultHandler version of this method is recommended as
  +     * the <code>HandlerBase</code> class has been deprecated in SAX 2.0</i>
        *
        * @param uri The location of the content to be parsed.
        * @param hb The SAX HandlerBase to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the uri is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -245,12 +249,14 @@
       /**
        * Parse the content described by the giving Uniform Resource
        * Identifier (URI) as XML using the specified
  -     * <code>org.xml.sax.helpers.DefaultHandler</code>.
  +     * {@link org.xml.sax.helpers.DefaultHandler}.
        *
        * @param uri The location of the content to be parsed.
        * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the uri is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -267,8 +273,8 @@
       
       /**
        * Parse the content of the file specified as XML using the
  -     * specified <code>org.xml.sax.HandlerBase</code>.
  -     * <i> Use of the DefaultHandler version of this method is recommended as 
  +     * specified {@link org.xml.sax.HandlerBase}.
  +     * <i> Use of the DefaultHandler version of this method is recommended as
        * the HandlerBase class has been deprecated in SAX 2.0</i>
        *
        * @param f The file containing the XML to parse
  @@ -276,6 +282,8 @@
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the File object is null.
        * @see org.xml.sax.DocumentHandler
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        */
   
       public void parse(File f, HandlerBase hb)
  @@ -295,12 +303,14 @@
       
       /**
        * Parse the content of the file specified as XML using the
  -     * specified <code>org.xml.sax.helpers.DefaultHandler</code>.
  +     * specified {@link org.xml.sax.helpers.DefaultHandler}.
        *
        * @param f The file containing the XML to parse
        * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the File object is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
   
  @@ -320,16 +330,18 @@
       }
       
       /**
  -     * Parse the content given <code>org.xml.sax.InputSource</code>
  +     * Parse the content given {@link org.xml.sax.InputSource}
        * as XML using the specified
  -     * <code>org.xml.sax.HandlerBase</code>.
  -     * <i> Use of the DefaultHandler version of this method is recommended as 
  +     * {@link org.xml.sax.HandlerBase}.
  +     * <i> Use of the DefaultHandler version of this method is recommended as
        * the HandlerBase class has been deprecated in SAX 2.0</i>
        *
        * @param is The InputSource containing the content to be parsed.
        * @param hb The SAX HandlerBase to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the InputSource is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -351,14 +363,16 @@
       }
       
       /**
  -     * Parse the content given <code>org.xml.sax.InputSource</code>
  +     * Parse the content given {@link org.xml.sax.InputSource}
        * as XML using the specified
  -     * <code>org.xml.sax.helpers.DefaultHandler</code>.
  +     * {@link org.xml.sax.helpers.DefaultHandler}.
        *
        * @param is The InputSource containing the content to be parsed.
        * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the InputSource is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -382,13 +396,19 @@
       /**
        * Returns the SAX parser that is encapsultated by the
        * implementation of this class.
  +     *
  +     * @return The SAX parser that is encapsultated by the
  +     *         implementation of this class.
        */
       
       public abstract org.xml.sax.Parser getParser() throws SAXException;
   
       /**
  -     * Returns the XMLReader that is encapsulated by the
  +     * Returns the {@link org.xml.sax.XMLReader} that is encapsulated by the
        * implementation of this class.
  +     *
  +     * @return The XMLReader that is encapsulated by the
  +     *         implementation of this class.
        */
   
       public abstract org.xml.sax.XMLReader getXMLReader() throws SAXException;
  @@ -396,6 +416,9 @@
       /**
        * Indicates whether or not this parser is configured to
        * understand namespaces.
  +     *
  +     * @return true if this parser is configured to
  +     *         understand namespaces; false otherwise.
        */
       
       public abstract boolean isNamespaceAware();
  @@ -403,22 +426,25 @@
       /**
        * Indicates whether or not this parser is configured to
        * validate XML documents.
  +     *
  +     * @return true if this parser is configured to
  +     *         validate XML documents; false otherwise.
        */
       
       public abstract boolean isValidating();
   
       /**
  -     * Sets the particular property in the underlying implementation of 
  -     * org.xml.sax.XMLReader.
  -     * A list of the core features and properties can be found at 
  +     * Sets the particular property in the underlying implementation of
  +     * {@link org.xml.sax.XMLReader}.
  +     * A list of the core features and properties can be found at
        * <a href="http://www.megginson.com/SAX/Java/features.html"> http://www.megginson.com/SAX/Java/features.html </a>
        *
        * @param name The name of the property to be set.
        * @param value The value of the property to be set.
  -     * @exception SAXNotRecognizedException When the underlying XMLReader does 
  +     * @exception SAXNotRecognizedException When the underlying XMLReader does
        *            not recognize the property name.
        *
  -     * @exception SAXNotSupportedException When the underlying XMLReader 
  +     * @exception SAXNotSupportedException When the underlying XMLReader
        *            recognizes the property name but doesn't support the
        *            property.
        *
  @@ -429,24 +455,21 @@
   
       /**
        *
  -     * returns the particular property requested for in the underlying 
  -     * implementation of org.xml.sax.XMLReader.
  +     * Returns the particular property requested for in the underlying
  +     * implementation of {@link org.xml.sax.XMLReader}.
        *
        * @param name The name of the property to be retrieved.
        * @return Value of the requested property.
        *
  -     * @exception SAXNotRecognizedException When the underlying XMLReader does 
  +     * @exception SAXNotRecognizedException When the underlying XMLReader does
        *            not recognize the property name.
        *
  -     * @exception SAXNotSupportedException When the underlying XMLReader 
  +     * @exception SAXNotSupportedException When the underlying XMLReader
        *            recognizes the property name but doesn't support the
        *            property.
        *
        * @see org.xml.sax.XMLReader#getProperty
        */
  -    public abstract Object getProperty(String name) 
  +    public abstract Object getProperty(String name)
           throws SAXNotRecognizedException, SAXNotSupportedException;
  -
  -
  -
   }
  
  
  
  1.8       +69 -206   xml-xalan/java/src/javax/xml/parsers/SAXParserFactory.java
  
  Index: SAXParserFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/parsers/SAXParserFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SAXParserFactory.java	2001/06/14 20:26:17	1.7
  +++ SAXParserFactory.java	2001/10/10 18:08:28	1.8
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -49,13 +48,11 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  + * originally based on software copyright (c) 1999-2001, Sun Microsystems,
  + * Inc., http://www.sun.com.  For more information on the Apache Software
  + * Foundation, please see <http://www.apache.org/>.
    */
   
  -
   package javax.xml.parsers;
   
   import org.xml.sax.Parser;
  @@ -63,31 +60,27 @@
   import org.xml.sax.SAXNotRecognizedException;
   import org.xml.sax.SAXNotSupportedException;
   
  -import java.io.InputStream;
  -import java.io.IOException;
  -import java.io.File;
  -import java.io.FileInputStream;
  -import java.util.Locale;
  -
  -import java.util.Properties;
  -import java.io.BufferedReader;
  -import java.io.InputStreamReader;
  -
   /**
    * Defines a factory API that enables applications to configure and
  - * obtain a SAX based parser to parse XML documents. 
  + * obtain a SAX based parser to parse XML documents.<p>
  + * An implementation of the <code>SAXParserFactory</code> class is
  + * <em>NOT</em> guaranteed to be thread safe. It is up to the user application 
  + * to make sure about the use of the <code>SAXParserFactory</code> from 
  + * more than one thread. Alternatively the application can have one instance 
  + * of the <code>SAXParserFactory</code> per thread.
  + * An application can use the same instance of the factory to obtain one or 
  + * more instances of the <code>SAXParser</code> provided the instance
  + * of the factory isn't being used in more than one thread at a time.
  + * <p>
  + *
  + * The static <code>newInstance</code> method returns a new concrete 
  + * implementation of this class.
    *
    * @since JAXP 1.0
    * @version 1.0
  - * @author Rajiv Mordani
  - * @author James Davidson
    */
   
   public abstract class SAXParserFactory {
  -    /** The default property name according to the JAXP spec */
  -    private static final String defaultPropName =
  -        "javax.xml.parsers.SAXParserFactory";
  -
       private boolean validating = false;
       private boolean namespaceAware= false;
       
  @@ -97,7 +90,7 @@
   
       /**
        * Obtain a new instance of a <code>SAXParserFactory</code>. This
  -     * static method creates a new factory instance 
  +     * static method creates a new factory instance
        * This method uses the following ordered lookup procedure to determine
        * the <code>SAXParserFactory</code> implementation class to
        * load:
  @@ -107,13 +100,14 @@
        * property.
        * </li>
        * <li>
  -     * Use the JAVA_HOME(the parent directory where jdk is
  -     * installed)/lib/jaxp.properties for a property file that contains the
  -     * name of the implementation class keyed on the same value as the
  -     * system property defined above.
  +     * Use the properties file "lib/jaxp.properties" in the JRE directory.
  +     * This configuration file is in standard <code>java.util.Properties
  +     * </code> format and contains the fully qualified name of the
  +     * implementation class with the key being the system property defined
  +     * above.
        * </li>
        * <li>
  -     * Use the Services API (as detailed in teh JAR specification), if
  +     * Use the Services API (as detailed in the JAR specification), if
        * available, to determine the classname. The Services API will look
        * for a classname in the file
        * <code>META-INF/services/javax.xml.parsers.SAXParserFactory</code>
  @@ -128,73 +122,33 @@
        * <code>SAXParserFactory</code> it can use the factory to
        * configure and obtain parser instances.
        *
  +     * @return A new instance of a SAXParserFactory.
  +     *
        * @exception FactoryConfigurationError if the implementation is
        * not available or cannot be instantiated.
        */
   
  -    public static SAXParserFactory newInstance() {
  -        String factoryImplName = findFactory(defaultPropName,
  -                                             "org.apache.crimson.jaxp.SAXParserFactoryImpl");
  -        // the default can be removed after services are tested well enough
  -        
  -        if (factoryImplName == null) {
  -            throw new FactoryConfigurationError(
  -                "No default implementation found");
  -        }
  -
  -        SAXParserFactory factoryImpl = null;
  +    public static SAXParserFactory newInstance()
  +        throws FactoryConfigurationError
  +    {
           try {
  -            Class clazz = getClassForName(factoryImplName);
  -            factoryImpl = (SAXParserFactory)clazz.newInstance();
  -        } catch  (ClassNotFoundException cnfe) {
  -            throw new FactoryConfigurationError(cnfe);
  -        } catch (IllegalAccessException iae) {
  -            throw new FactoryConfigurationError(iae);
  -        } catch (InstantiationException ie) {
  -            throw new FactoryConfigurationError(ie);
  +            return (SAXParserFactory) FactoryFinder.find(
  +                /* The default property name according to the JAXP spec */
  +                "javax.xml.parsers.SAXParserFactory",
  +                /* The fallback implementation class name */
  +                "org.apache.crimson.jaxp.SAXParserFactoryImpl");
  +        } catch (FactoryFinder.ConfigurationError e) {
  +            throw new FactoryConfigurationError(e.getException(),
  +                                                e.getMessage());
           }
  -        return factoryImpl;
  -    }
  -
  -    /** a zero length Object array used in getClassForName() */
  -    private static final Object NO_OBJS[] = new Object[0];
  -    /** the Method object for getContextClassLoader */
  -    private static java.lang.reflect.Method getCCL;
  -    
  -    static {
  -	try { 
  -	    getCCL = Thread.class.getMethod("getContextClassLoader",
  -					    new Class[0]);
  -	} catch (Exception e) {
  -	    getCCL = null;
  -	}
       }
       
  -    private static Class getClassForName(String className )
  -        throws ClassNotFoundException
  -    {
  -	if (getCCL != null) {
  -	    try {
  -		ClassLoader contextClassLoader =
  -		    (ClassLoader) getCCL.invoke(Thread.currentThread(),
  -						NO_OBJS);
  -		return contextClassLoader.loadClass(className);
  -	    } catch (ClassNotFoundException cnfe) {
  -		// nothing, try again with Class.forName 
  -	    } catch (Exception e) {
  -		getCCL = null; // don't try again
  -		// fallback
  -	    }
  -	}
  -	
  -	return Class.forName(className);
  -    }
  -
  -  
       /**
        * Creates a new instance of a SAXParser using the currently
        * configured factory parameters.
        *
  +     * @return A new instance of a SAXParser.
  +     *
        * @exception ParserConfigurationException if a parser cannot
        * be created which satisfies the requested configuration.
        */
  @@ -205,22 +159,28 @@
       
       /**
        * Specifies that the parser produced by this code will
  -     * provide support for XML namespaces. By default the value of this is set 
  -     * to <code>false</code>
  +     * provide support for XML namespaces. By default the value of this is set
  +     * to <code>false</code>.
  +     *
  +     * @param awareness true if the parser produced by this code will
  +     *                  provide support for XML namespaces; false otherwise.
        */
       
  -    public void setNamespaceAware(boolean awareness) 
  +    public void setNamespaceAware(boolean awareness)
       {
           this.namespaceAware = awareness;
       }
   
       /**
        * Specifies that the parser produced by this code will
  -     * validate documents as they are parsed. By default the value of this is 
  -     * set to <code>false</code>
  +     * validate documents as they are parsed. By default the value of this is
  +     * set to <code>false</code>.
  +     *
  +     * @param validating true if the parser produced by this code will
  +     *                   validate documents as they are parsed; false otherwise.
        */
       
  -    public void setValidating(boolean validating) 
  +    public void setValidating(boolean validating)
       {
           this.validating = validating;
       }
  @@ -228,6 +188,9 @@
       /**
        * Indicates whether or not the factory is configured to produce
        * parsers which are namespace aware.
  +     *
  +     * @return true if the factory is configured to produce
  +     *         parsers which are namespace aware; false otherwise.
        */
       
       public boolean isNamespaceAware() {
  @@ -237,6 +200,9 @@
       /**
        * Indicates whether or not the factory is configured to produce
        * parsers which validate the XML content during parse.
  +     *
  +     * @return true if the factory is configured to produce parsers which validate
  +     *         the XML content during parse; false otherwise.
        */
       
       public boolean isValidating() {
  @@ -245,17 +211,17 @@
   
       /**
        *
  -     * Sets the particular feature in the underlying implementation of 
  +     * Sets the particular feature in the underlying implementation of
        * org.xml.sax.XMLReader.
  -     * A list of the core features and properties can be found at 
  +     * A list of the core features and properties can be found at
        * <a href="http://www.megginson.com/SAX/Java/features.html"> http://www.megginson.com/SAX/Java/features.html </a>
        *
        * @param name The name of the feature to be set.
        * @param value The value of the feature to be set.
  -     * @exception SAXNotRecognizedException When the underlying XMLReader does 
  +     * @exception SAXNotRecognizedException When the underlying XMLReader does
        *            not recognize the property name.
        *
  -     * @exception SAXNotSupportedException When the underlying XMLReader 
  +     * @exception SAXNotSupportedException When the underlying XMLReader
        *            recognizes the property name but doesn't support the
        *            property.
        *
  @@ -263,20 +229,20 @@
        */
       public abstract void setFeature(String name, boolean value)
           throws ParserConfigurationException, SAXNotRecognizedException,
  -                    SAXNotSupportedException;
  +                SAXNotSupportedException;
   
       /**
        *
  -     * returns the particular property requested for in the underlying 
  +     * Returns the particular property requested for in the underlying
        * implementation of org.xml.sax.XMLReader.
        *
        * @param name The name of the property to be retrieved.
        * @return Value of the requested property.
        *
  -     * @exception SAXNotRecognizedException When the underlying XMLReader does 
  +     * @exception SAXNotRecognizedException When the underlying XMLReader does
        *            not recognize the property name.
        *
  -     * @exception SAXNotSupportedException When the underlying XMLReader 
  +     * @exception SAXNotSupportedException When the underlying XMLReader
        *            recognizes the property name but doesn't support the
        *            property.
        *
  @@ -284,108 +250,5 @@
        */
       public abstract boolean getFeature(String name)
           throws ParserConfigurationException, SAXNotRecognizedException,
  -                    SAXNotSupportedException;
  -
  -
  -    // -------------------- private methods --------------------
  -    // This code is duplicated in all factories.
  -    // Keep it in sync or move it to a common place 
  -    // Because it's small probably it's easier to keep it here
  -    /** Avoid reading all the files when the findFactory
  -        method is called the second time ( cache the result of
  -        finding the default impl )
  -    */
  -    private static String foundFactory=null;
  -
  -    /** Temp debug code - this will be removed after we test everything
  -     */
  -    private static boolean debug=false;
  -    static {
  -	try {
  -	    debug= System.getProperty( "jaxp.debug" ) != null;
  -	} catch(SecurityException ex ) {}
  -    } 
  -
  -    /** Private implementation method - will find the implementation
  -        class in the specified order.
  -        @param factoryId   Name of the factory interface
  -        @param xmlProperties Name of the properties file based on JAVA/lib
  -        @param defaultFactory Default implementation, if nothing else is found
  -    */
  -    private static String findFactory(String factoryId,
  -                                      String defaultFactory)
  -    {
  -        // Use the system property first
  -        try {
  -            foundFactory =
  -                System.getProperty( factoryId );
  -            if( foundFactory!=null) {
  -                if( debug ) 
  -                    System.err.println("JAXP: found system property" +
  -                                       foundFactory );
  -                return foundFactory;
  -            }
  -            
  -        }catch (SecurityException se) {
  -        }
  -
  -        // Then try the previously found one (fix Bugzilla 1490 13-Jun-01 -sc)
  -        if( foundFactory!=null)
  -            return foundFactory;
  -
  -        // try to read from $java.home/lib/jaxp.properties
  -        try {
  -            String javah=System.getProperty( "java.home" );
  -            String configFile = javah + File.separator +
  -                "lib" + File.separator + "jaxp.properties";
  -            File f=new File( configFile );
  -            if( f.exists()) {
  -                Properties props=new Properties();
  -                props.load( new FileInputStream(f));
  -                foundFactory=props.getProperty( factoryId );
  -                if( debug )
  -                    System.err.println("JAXP: found java.home property " +
  -                                       foundFactory );
  -                if(foundFactory!=null )
  -                    return foundFactory;
  -            }
  -        } catch(Exception ex ) {
  -            if( debug ) ex.printStackTrace();
  -        }
  -
  -        String serviceId = "META-INF/services/" + factoryId;
  -        // try to find services in CLASSPATH
  -        try {
  -            ClassLoader cl=SAXParserFactory.class.getClassLoader();
  -            InputStream is=null;
  -            if( cl == null ) {
  -                is=ClassLoader.getSystemResourceAsStream( serviceId );
  -            } else {
  -                is=cl.getResourceAsStream( serviceId );
  -            }
  -            
  -            if( is!=null ) {
  -                if( debug )
  -                    System.err.println("JAXP: found  " +
  -                                       serviceId);
  -                BufferedReader rd=new BufferedReader( new
  -                    InputStreamReader(is));
  -                
  -                foundFactory=rd.readLine();
  -                rd.close();
  -
  -                if( debug )
  -                    System.err.println("JAXP: loaded from services: " +
  -                                       foundFactory );
  -                if( foundFactory != null &&
  -                    !  "".equals( foundFactory) ) {
  -                    return foundFactory;
  -                }
  -            }
  -        } catch( Exception ex ) {
  -            if( debug ) ex.printStackTrace();
  -        }
  -
  -        return defaultFactory;
  -    }
  +                SAXNotSupportedException;
   }
  
  
  
  1.6       +1 -18     xml-xalan/java/src/javax/xml/parsers/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/parsers/package.html,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- package.html	2000/12/20 04:55:18	1.5
  +++ package.html	2001/10/10 18:08:28	1.6
  @@ -1,26 +1,9 @@
   <HTML><HEAD>
  -<!--
  -    $Id: package.html,v 1.5 2000/12/20 04:55:18 sboag Exp $
   
  - This software is the confidential and proprietary information of Sun
  - Microsystems, Inc. ("Confidential Information").  You shall not
  - disclose such Confidential Information and shall use it only in
  - accordance with the terms of the license agreement you entered into
  - with Sun.
  - 
  - SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  - SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  - IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  - PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  - SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  - THIS SOFTWARE OR ITS DERIVATIVES.
  - Copyright 1998-1999 by Sun Microsystems Inc.  All rights reserved.
  --->
  -
   </HEAD><BODY>
   
   Provides classes allowing the processing of XML documents. Two types
  -of pluggable parsers are supported:
  +of plugable parsers are supported:
   <ul>
   <li>SAX (Simple API for XML)
   <li>DOM (Document Object Model)
  
  
  
  1.1                  xml-xalan/java/src/javax/xml/parsers/FactoryFinder.java
  
  Index: FactoryFinder.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    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
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    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,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The name "Apache Software Foundation" must not be used to endorse or
   *    promote products derived from this software without prior written
   *    permission. For written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999-2001, Sun Microsystems,
   * Inc., http://www.sun.com.  For more information on the Apache Software
   * Foundation, please see <http://www.apache.org/>.
   */
  
  package javax.xml.parsers;
  
  import java.io.InputStream;
  import java.io.IOException;
  import java.io.File;
  import java.io.FileInputStream;
  
  import java.util.Properties;
  import java.io.BufferedReader;
  import java.io.InputStreamReader;
  
  /**
   * This class is duplicated for each JAXP subpackage so keep it in
   * sync.  It is package private.
   *
   * This code is designed to implement the JAXP 1.1 spec pluggability
   * feature and is designed to run on JDK version 1.1 and later including
   * JVMs that perform early linking like the Microsoft JVM in IE 5.  Note
   * however that it must be compiled on a JDK version 1.2 or later system
   * since it calls Thread#getContextClassLoader().  The code also runs both
   * as part of an unbundled jar file and when bundled as part of the JDK.
   */
  class FactoryFinder {
      /** Temp debug code - this will be removed after we test everything
       */
      private static boolean debug = false;
      static {
          // Use try/catch block to support applets
          try {
              debug = System.getProperty("jaxp.debug") != null;
          } catch (Exception x) {
          }
      }
  
      private static void debugPrintln(String msg) {
          if (debug) {
              System.err.println("JAXP: " + msg);
          }
      }
  
      /**
       * Figure out which ClassLoader to use.  For JDK 1.2 and later use the
       * context ClassLoader if possible.  Note: we defer linking the class
       * that calls an API only in JDK 1.2 until runtime so that we can catch
       * LinkageError so that this code will run in older non-Sun JVMs such
       * as the Microsoft JVM in IE.
       */
      private static ClassLoader findClassLoader()
          throws ConfigurationError
      {
          ClassLoader classLoader;
          try {
              // Construct the name of the concrete class to instantiate
              Class clazz = Class.forName(FactoryFinder.class.getName()
                                          + "$ClassLoaderFinderConcrete");
              ClassLoaderFinder clf = (ClassLoaderFinder) clazz.newInstance();
              classLoader = clf.getContextClassLoader();
          } catch (LinkageError le) {
              // Assume that we are running JDK 1.1, use the current ClassLoader
              classLoader = FactoryFinder.class.getClassLoader();
          } catch (ClassNotFoundException x) {
              // This case should not normally happen.  MS IE can throw this
              // instead of a LinkageError the second time Class.forName() is
              // called so assume that we are running JDK 1.1 and use the
              // current ClassLoader
              classLoader = FactoryFinder.class.getClassLoader();
          } catch (Exception x) {
              // Something abnormal happened so throw an error
              throw new ConfigurationError(x.toString(), x);
          }
          return classLoader;
      }
  
      /**
       * Create an instance of a class using the specified ClassLoader
       */
      private static Object newInstance(String className,
                                        ClassLoader classLoader)
          throws ConfigurationError
      {
          try {
              Class spiClass;
              if (classLoader == null) {
                  spiClass = Class.forName(className);
              } else {
                  spiClass = classLoader.loadClass(className);
              }
              return spiClass.newInstance();
          } catch (ClassNotFoundException x) {
              throw new ConfigurationError(
                  "Provider " + className + " not found", x);
          } catch (Exception x) {
              throw new ConfigurationError(
                  "Provider " + className + " could not be instantiated: " + x,
                  x);
          }
      }
  
      /**
       * Finds the implementation Class object in the specified order.  Main
       * entry point.
       * @return Class object of factory, never null
       *
       * @param factoryId             Name of the factory to find, same as
       *                              a property name
       * @param fallbackClassName     Implementation class name, if nothing else
       *                              is found.  Use null to mean no fallback.
       *
       * Package private so this code can be shared.
       */
      static Object find(String factoryId, String fallbackClassName)
          throws ConfigurationError
      {
          ClassLoader classLoader = findClassLoader();
  
          // Use the system property first
          try {
              String systemProp =
                  System.getProperty( factoryId );
              if( systemProp!=null) {
                  debugPrintln("found system property" + systemProp);
                  return newInstance(systemProp, classLoader);
              }
          } catch (SecurityException se) {
          }
  
          // try to read from $java.home/lib/xml.properties
          try {
              String javah=System.getProperty( "java.home" );
              String configFile = javah + File.separator +
                  "lib" + File.separator + "jaxp.properties";
              File f=new File( configFile );
              if( f.exists()) {
                  Properties props=new Properties();
                  props.load( new FileInputStream(f));
                  String factoryClassName = props.getProperty(factoryId);
                  debugPrintln("found java.home property " + factoryClassName);
                  return newInstance(factoryClassName, classLoader);
              }
          } catch(Exception ex ) {
              if( debug ) ex.printStackTrace();
          }
  
          String serviceId = "META-INF/services/" + factoryId;
          // try to find services in CLASSPATH
          try {
              InputStream is=null;
              if (classLoader == null) {
                  is=ClassLoader.getSystemResourceAsStream( serviceId );
              } else {
                  is=classLoader.getResourceAsStream( serviceId );
              }
          
              if( is!=null ) {
                  debugPrintln("found " + serviceId);
                  BufferedReader rd =
                      new BufferedReader(new InputStreamReader(is, "UTF-8"));
          
                  String factoryClassName = rd.readLine();
                  rd.close();
  
                  if (factoryClassName != null &&
                      ! "".equals(factoryClassName)) {
                      debugPrintln("loaded from services: " + factoryClassName);
                      return newInstance(factoryClassName, classLoader);
                  }
              }
          } catch( Exception ex ) {
              if( debug ) ex.printStackTrace();
          }
  
          if (fallbackClassName == null) {
              throw new ConfigurationError(
                  "Provider for " + factoryId + " cannot be found", null);
          }
  
          debugPrintln("loaded from fallback value: " + fallbackClassName);
          return newInstance(fallbackClassName, classLoader);
      }
  
      static class ConfigurationError extends Error {
          private Exception exception;
  
          /**
           * Construct a new instance with the specified detail string and
           * exception.
           */
          ConfigurationError(String msg, Exception x) {
              super(msg);
              this.exception = x;
          }
  
          Exception getException() {
              return exception;
          }
      }
  
      /*
       * The following nested classes allow getContextClassLoader() to be
       * called only on JDK 1.2 and yet run in older JDK 1.1 JVMs
       */
  
      private static abstract class ClassLoaderFinder {
          abstract ClassLoader getContextClassLoader();
      }
  
      static class ClassLoaderFinderConcrete extends ClassLoaderFinder {
          ClassLoader getContextClassLoader() {
              return Thread.currentThread().getContextClassLoader();
          }
      }
  }
  
  
  
  1.6       +13 -18    xml-xalan/java/src/javax/xml/transform/ErrorListener.java
  
  Index: ErrorListener.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/ErrorListener.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ErrorListener.java	2001/01/03 09:57:47	1.5
  +++ ErrorListener.java	2001/10/10 18:08:28	1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,21 +47,17 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: ErrorListener.java,v 1.5 2001/01/03 09:57:47 sboag Exp $
  - */
   package javax.xml.transform;
   
   /**
    * <p>To provide customized error handling, implement this interface and
    * use the setErrorListener method to register an instance of the implmentation
  - * with the Transformer. The Transformer then reports all errors and warnings through this interface.</p>
  + * with the {@link javax.xml.transform.Transformer}. The Transformer then reports
  + * all errors and warnings through this interface.</p>
    *
    * <p>If an application does <em>not</em>
    * register an ErrorListener, errors are reported to System.err.</p>
  @@ -81,9 +76,9 @@
       /**
        * Receive notification of a warning.
        *
  -     * <p>Transformers can use this method to report conditions that
  -     * are not errors or fatal errors.  The default behaviour is to
  -     * take no action.</p>
  +     * <p>{@link javax.xml.transform.Transformer} can use this method to report
  +     * conditions that are not errors or fatal errors.  The default behaviour
  +     * is to take no action.</p>
        *
        * <p>After invoking this method, the Transformer must continue with
        * the transformation. It should still be possible for the
  @@ -105,7 +100,7 @@
        *
        * <p>The transformer must continue to try and provide normal transformation
        * after invoking this method.  It should still be possible for the
  -     * application to process the document through to the end if no other errors 
  +     * application to process the document through to the end if no other errors
        * are encountered.</p>
        *
        * @param exception The error information encapsulated in a
  @@ -124,8 +119,8 @@
        *
        * <p>The transformer must continue to try and provide normal transformation
        * after invoking this method.  It should still be possible for the
  -     * application to process the document through to the end if no other errors 
  -     * are encountered, but there is no guarantee that the output will be 
  +     * application to process the document through to the end if no other errors
  +     * are encountered, but there is no guarantee that the output will be
        * useable.</p>
        *
        * @param exception The error information encapsulated in a
  
  
  
  1.8       +5 -11     xml-xalan/java/src/javax/xml/transform/OutputKeys.java
  
  Index: OutputKeys.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/OutputKeys.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- OutputKeys.java	2000/12/20 04:55:19	1.7
  +++ OutputKeys.java	2001/10/10 18:08:28	1.8
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: OutputKeys.java,v 1.7 2000/12/20 04:55:19 sboag Exp $
    */
   package javax.xml.transform;
   
  
  
  
  1.6       +5 -11     xml-xalan/java/src/javax/xml/transform/Result.java
  
  Index: Result.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/Result.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Result.java	2001/01/05 18:24:44	1.5
  +++ Result.java	2001/10/10 18:08:28	1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: Result.java,v 1.5 2001/01/05 18:24:44 sboag Exp $
    */
   package javax.xml.transform;
   
  
  
  
  1.5       +5 -11     xml-xalan/java/src/javax/xml/transform/Source.java
  
  Index: Source.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/Source.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Source.java	2000/12/20 04:55:19	1.4
  +++ Source.java	2001/10/10 18:08:28	1.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: Source.java,v 1.4 2000/12/20 04:55:19 sboag Exp $
    */
   package javax.xml.transform;
   
  
  
  
  1.5       +5 -11     xml-xalan/java/src/javax/xml/transform/SourceLocator.java
  
  Index: SourceLocator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/SourceLocator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SourceLocator.java	2000/12/20 04:55:19	1.4
  +++ SourceLocator.java	2001/10/10 18:08:28	1.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: SourceLocator.java,v 1.4 2000/12/20 04:55:19 sboag Exp $
    */
   package javax.xml.transform;
   
  
  
  
  1.7       +5 -11     xml-xalan/java/src/javax/xml/transform/Templates.java
  
  Index: Templates.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/Templates.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Templates.java	2000/12/20 04:55:19	1.6
  +++ Templates.java	2001/10/10 18:08:28	1.7
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: Templates.java,v 1.6 2000/12/20 04:55:19 sboag Exp $
    */
   package javax.xml.transform;
   
  
  
  
  1.14      +12 -18    xml-xalan/java/src/javax/xml/transform/Transformer.java
  
  Index: Transformer.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/Transformer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Transformer.java	2001/01/11 05:06:26	1.13
  +++ Transformer.java	2001/10/10 18:08:28	1.14
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,34 +47,30 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: Transformer.java,v 1.13 2001/01/11 05:06:26 sboag Exp $
  - */
   package javax.xml.transform;
   
   import java.util.Properties;
   
   
   /**
  - * An instace of this abstract class can transform a
  + * An instance of this abstract class can transform a
    * source tree into a result tree.
    *
    * <p>An instance of this class can be obtained with the <code>
  - * TransformerFactory.newTransformer</code> method. This instance may
  - * then be used to process XML from a variety of sources and write
  - * the transformation output to a variety of sinks.</p>
  + * {@link TransformerFactory#newTransformer TransformerFactory.newTransformer}
  + * method. This instance may then be used to process XML from a
  + * variety of sources and write the transformation output to a
  + * variety of sinks.</p>
    *
    * <p>An object of this class may not be used in multiple threads
    * running concurrently.  Different Transformers may be used
    * concurrently by different threads.</p>
    *
  - * <p>A Transformer may be used multiple times.  Parameters and
  + * <p>A <code>Transformer</code> may be used multiple times.  Parameters and
    * output properties are preserved across transformations.</p>
    */
   public abstract class Transformer {
  @@ -125,8 +120,7 @@
        * cannot be determined until the node context is evaluated during
        * the transformation process.
        *
  -     * @return A parameter that has been set with setParameter, or null if 
  -     * a parameter with the given name was not found.
  +     * @return A parameter that has been set with setParameter.
        */
       public abstract Object getParameter(String name);
   
  
  
  
  1.5       +5 -11     xml-xalan/java/src/javax/xml/transform/TransformerConfigurationException.java
  
  Index: TransformerConfigurationException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/TransformerConfigurationException.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TransformerConfigurationException.java	2000/12/20 04:55:20	1.4
  +++ TransformerConfigurationException.java	2001/10/10 18:08:28	1.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/*
  - * $Id: TransformerConfigurationException.java,v 1.4 2000/12/20 04:55:20 sboag Exp $
    */
   package javax.xml.transform;
   
  
  
  
  1.14      +14 -20    xml-xalan/java/src/javax/xml/transform/TransformerException.java
  
  Index: TransformerException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/TransformerException.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TransformerException.java	2001/01/26 02:25:51	1.13
  +++ TransformerException.java	2001/10/10 18:08:28	1.14
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,15 +47,10 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: TransformerException.java,v 1.13 2001/01/26 02:25:51 sboag Exp $
  - */
   package javax.xml.transform;
   
   import java.lang.reflect.Method;
  @@ -72,8 +66,7 @@
    */
   public class TransformerException extends Exception {
   
  -    /** Field locator specifies where the error occured.
  -     *  @serial */
  +    /** Field locator specifies where the error occured */
       SourceLocator locator;
   
       /**
  @@ -96,8 +89,7 @@
           locator = location;
       }
   
  -    /** Field containedException specifies a wrapped exception.  May be null.
  -     *  @serial */
  +    /** Field containedException specifies a wrapped exception.  May be null. */
       Throwable containedException;
   
       /**
  @@ -148,7 +140,7 @@
        */
       public synchronized Throwable initCause(Throwable cause) {
   
  -        if ((this.containedException == null) && (cause != null)) {
  +        if (this.containedException != null) {
               throw new IllegalStateException("Can't overwrite cause");
           }
   
  @@ -182,7 +174,7 @@
        */
       public TransformerException(Throwable e) {
   
  -        super(e.getMessage());
  +        super(e.toString());
   
           this.containedException = e;
           this.locator            = null;
  @@ -201,7 +193,7 @@
       public TransformerException(String message, Throwable e) {
   
           super(((message == null) || (message.length() == 0))
  -              ? e.getMessage()
  +              ? e.toString()
                 : message);
   
           this.containedException = e;
  @@ -246,6 +238,9 @@
       /**
        * Get the error message with location information
        * appended.
  +     *
  +     * @return A <code>String</code> representing the error message with
  +     *         location information appended.
        */
       public String getMessageAndLocation() {
   
  @@ -341,7 +336,6 @@
        * @param s The writer where the dump will be sent to.
        */
       public void printStackTrace(java.io.PrintWriter s) {
  -
           if (s == null) {
               s = new java.io.PrintWriter(System.err, true);
           }
  @@ -352,7 +346,6 @@
               if (null != locInfo) {
                   s.println(locInfo);
               }
  -
               super.printStackTrace(s);
           } catch (Throwable e) {}
   
  @@ -401,5 +394,6 @@
                   exception = null;
               }
           }
  +	s.flush();
       }
   }
  
  
  
  1.17      +41 -212   xml-xalan/java/src/javax/xml/transform/TransformerFactory.java
  
  Index: TransformerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/TransformerFactory.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TransformerFactory.java	2001/09/13 18:32:41	1.16
  +++ TransformerFactory.java	2001/10/10 18:08:28	1.17
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,15 +47,10 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: TransformerFactory.java,v 1.16 2001/09/13 18:32:41 curcuru Exp $
  - */
   package javax.xml.transform;
   
   import java.io.IOException;
  @@ -69,22 +63,31 @@
   import java.util.Properties;
   import java.util.Enumeration;
   
  +import java.lang.reflect.Method;
  +import java.lang.reflect.InvocationTargetException;
   
   /**
  - * A TransformerFactory instance can be used to create Transformer and Template
  - * objects.
  + * A TransformerFactory instance can be used to create
  + * {@link javax.xml.transform.Transformer} and
  + * {@link javax.xml.transform.Templates} objects.
  + *
  + * <p>The system property that determines which Factory implementation to
  + * create is named <code>"javax.xml.transform.TransformerFactory"</code>.
  + * This property names a concrete subclass of the
  + * <code>TransformerFactory</code> abstract class. If the property is not
  + * defined, a platform default is be used.</p>
    *
  - * <p>The system property that determines which Factory implementation
  - * to create is named "javax.xml.transform.TransformerFactory". This
  - * property names a concrete subclass of the TransformerFactory abstract
  - *  class. If the property is not defined, a platform default is be used.</p>
  + * An implementation of the <code>TransformerFactory</code> class is
  + * <em>NOT</em> guaranteed to be thread safe. It is up to the user application 
  + * to make sure about the use of the <code>TransformerFactory</code> from 
  + * more than one thread. Alternatively the application can have one instance 
  + * of the <code>TransformerFactory</code> per thread.
  + * An application can use the same instance of the factory to obtain one or 
  + * more instances of a <code>Transformer</code> or <code>Templates</code> 
  + * provided the instance of the factory isn't being used in more than one 
  + * thread at a time.
    */
   public abstract class TransformerFactory {
  -
  -    /** The default property name according to the JAXP spec. */
  -    private static final String defaultPropName =
  -        "javax.xml.transform.TransformerFactory";
  -
       /**
        * Default constructor is protected on purpose.
        */
  @@ -92,7 +95,7 @@
   
       /**
        * Obtain a new instance of a <code>TransformerFactory</code>.
  -     * This static method creates a new factory instance 
  +     * This static method creates a new factory instance
        * This method uses the following ordered lookup procedure to determine
        * the <code>TransformerFactory</code> implementation class to
        * load:
  @@ -102,10 +105,11 @@
        * property.
        * </li>
        * <li>
  -     * Use the JAVA_HOME(the parent directory where jdk is
  -     * installed)/lib/jaxp.properties for a property file that contains the
  -     * name of the implementation class keyed on the same value as the
  -     * system property defined above.
  +     * Use the properties file "lib/jaxp.properties" in the JRE directory.
  +     * This configuration file is in standard <code>java.util.Properties
  +     * </code> format and contains the fully qualified name of the
  +     * implementation class with the key being the system property defined
  +     * above.
        * </li>
        * <li>
        * Use the Services API (as detailed in the JAR specification), if
  @@ -129,70 +133,20 @@
        * if the implmentation is not available or cannot be instantiated.
        */
       public static TransformerFactory newInstance()
  -            throws TransformerFactoryConfigurationError {
  -
  -        String classname =
  -            findFactory(defaultPropName,
  -                        "org.apache.xalan.processor.TransformerFactoryImpl");
  -
  -        if (classname == null) {
  -            throw new TransformerFactoryConfigurationError(
  -                "No default implementation found");
  -        }
  -
  -        TransformerFactory factoryImpl;
  -
  +        throws TransformerFactoryConfigurationError
  +    {
           try {
  -            Class clazz = getClassForName(classname);
  -
  -            factoryImpl = (TransformerFactory) clazz.newInstance();
  -        } catch (ClassNotFoundException cnfe) {
  -            throw new TransformerFactoryConfigurationError(cnfe);
  -        } catch (IllegalAccessException iae) {
  -            throw new TransformerFactoryConfigurationError(iae);
  -        } catch (InstantiationException ie) {
  -            throw new TransformerFactoryConfigurationError(ie);
  +            return (TransformerFactory) FactoryFinder.find(
  +                /* The default property name according to the JAXP spec */
  +                "javax.xml.transform.TransformerFactory",
  +                /* The fallback implementation class name */
  +                "org.apache.xalan.processor.TransformerFactoryImpl");
  +        } catch (FactoryFinder.ConfigurationError e) {
  +            throw new TransformerFactoryConfigurationError(e.getException(),
  +                                                           e.getMessage());
           }
  -
  -        return factoryImpl;
       }
   
  -
  -    
  -    /** a zero length Object array used in getClassForName() */
  -    private static final Object NO_OBJS[] = new Object[0];
  -    /** the Method object for getContextClassLoader */
  -    private static java.lang.reflect.Method getCCL;
  -    
  -    static {
  -	try { 
  -	    getCCL = Thread.class.getMethod("getContextClassLoader",
  -					    new Class[0]);
  -	} catch (Exception e) {
  -	    getCCL = null;
  -	}
  -    }
  -    
  -    private static Class getClassForName(String className )
  -        throws ClassNotFoundException
  -    {
  -	if (getCCL != null) {
  -	    try {
  -		ClassLoader contextClassLoader =
  -		    (ClassLoader) getCCL.invoke(Thread.currentThread(),
  -						NO_OBJS);
  -		return contextClassLoader.loadClass(className);
  -	    } catch (ClassNotFoundException cnfe) {
  -		// nothing, try again with Class.forName 
  -	    } catch (Exception e) {
  -		getCCL = null; // don't try again
  -		// fallback
  -	    }
  -	}
  -	
  -	return Class.forName(className);
  -    }
  -  
       /**
        * Process the Source into a Transformer object.  Care must
        * be given not to use this object in multiple threads running concurrently.
  @@ -337,129 +291,4 @@
        * @return The current error handler, which should never be null.
        */
       public abstract ErrorListener getErrorListener();
  -
  -    // -------------------- private methods --------------------
  -
  -    /**
  -     * Avoid reading all the files when the findFactory
  -     * method is called the second time (cache the result of
  -     * finding the default impl).
  -     */
  -    private static String foundFactory = null;
  -
  -    /**
  -     * Temp debug code - this will be removed after we test everything
  -     */
  -    private static boolean debug;
  -    static {
  -	try {
  -	    debug = System.getProperty("jaxp.debug") != null;
  -	} catch( SecurityException ex ) {}
  -    }
  -
  -    /**
  -     * Private implementation method - will find the implementation
  -     * class in the specified order.
  -     *
  -     * @param factoryId   Name of the factory interface.
  -     * @param xmlProperties Name of the properties file based on JAVA/lib.
  -     * @param defaultFactory Default implementation, if nothing else is found.
  -     *
  -     * @return The factory class name.
  -     */
  -    private static String findFactory(String factoryId,
  -                                      String defaultFactory) {
  -
  -        // Use the system property first
  -        try {
  -	    String systemProp = null;
  -	    try {
  -		systemProp = System.getProperty(factoryId);
  -	    } catch( SecurityException se ) {}
  -
  -            if (systemProp != null) {
  -                if (debug) {
  -                    System.err.println("JAXP: found system property"
  -                                       + systemProp);
  -                }
  -
  -                return systemProp;
  -            }
  -        } catch (SecurityException se) {}
  -
  -        if (foundFactory != null) {
  -            return foundFactory;
  -        }
  -
  -        // try to read from $java.home/lib/jaxp.properties
  -        try {
  -            String javah      = System.getProperty("java.home");
  -            String configFile = javah + File.separator + "lib"
  -                                + File.separator + "jaxp.properties";
  -            File   f          = new File(configFile);
  -
  -            if (f.exists()) {
  -                Properties props = new Properties();
  -
  -                props.load(new FileInputStream(f));
  -
  -                foundFactory = props.getProperty(factoryId);
  -
  -                if (debug) {
  -                    System.err.println("JAXP: found java.home property "
  -                                       + foundFactory);
  -                }
  -
  -                if (foundFactory != null) {
  -                    return foundFactory;
  -                }
  -            }
  -        } catch (Exception ex) {
  -            if (debug) {
  -                ex.printStackTrace();
  -            }
  -        }
  -
  -        String serviceId = "META-INF/services/" + factoryId;
  -
  -        // try to find services in CLASSPATH
  -        try {
  -            ClassLoader cl = TransformerFactory.class.getClassLoader();
  -            InputStream is = null;
  -
  -            if (cl == null) {
  -                is = ClassLoader.getSystemResourceAsStream(serviceId);
  -            } else {
  -                is = cl.getResourceAsStream(serviceId);
  -            }
  -
  -            if (is != null) {
  -                if (debug) {
  -                    System.err.println("JAXP: found  " + serviceId);
  -                }
  -
  -                BufferedReader rd =
  -                    new BufferedReader(new InputStreamReader(is));
  -
  -                foundFactory = rd.readLine();
  -
  -                rd.close();
  -
  -                if (debug) {
  -                    System.err.println("JAXP: loaded from services: "
  -                                       + foundFactory);
  -                }
  -
  -                if ((foundFactory != null) &&!"".equals(foundFactory)) {
  -                    return foundFactory;
  -                }
  -            }
  -        } catch (Exception ex) {
  -            if (debug) {
  -                ex.printStackTrace();
  -            }
  -        }
  -
  -        return defaultFactory;
  -    }
   }
  
  
  
  1.5       +6 -14     xml-xalan/java/src/javax/xml/transform/TransformerFactoryConfigurationError.java
  
  Index: TransformerFactoryConfigurationError.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/TransformerFactoryConfigurationError.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TransformerFactoryConfigurationError.java	2001/01/24 19:47:13	1.4
  +++ TransformerFactoryConfigurationError.java	2001/10/10 18:08:28	1.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,15 +47,10 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/*
  - * $Id: TransformerFactoryConfigurationError.java,v 1.4 2001/01/24 19:47:13 costin Exp $
  - */
   package javax.xml.transform;
   
   /**
  @@ -67,8 +61,6 @@
    */
   public class TransformerFactoryConfigurationError extends Error {
   
  -    /** The contained exception.  
  -     *  @serial */
       private Exception exception;
   
       /**
  @@ -84,7 +76,7 @@
   
       /**
        * Create a new <code>TransformerFactoryConfigurationError</code> with
  -     * the <code>String </code> specified as an error message.
  +     * the <code>String</code> specified as an error message.
        *
        * @param msg The error message for the exception.
        */
  
  
  
  1.5       +5 -11     xml-xalan/java/src/javax/xml/transform/URIResolver.java
  
  Index: URIResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/URIResolver.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- URIResolver.java	2000/12/20 04:55:20	1.4
  +++ URIResolver.java	2001/10/10 18:08:28	1.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: URIResolver.java,v 1.4 2000/12/20 04:55:20 sboag Exp $
    */
   package javax.xml.transform;
   
  
  
  
  1.6       +258 -258  xml-xalan/java/src/javax/xml/transform/overview.html
  
  Index: overview.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/overview.html,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- overview.html	2000/12/20 04:55:20	1.5
  +++ overview.html	2001/10/10 18:08:28	1.6
  @@ -1,258 +1,258 @@
  -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  -<html>
  -<head>
  -<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  -<title></title>
  -</head>
  -<body> 
  -  
  -<h2>Transformation API For XML </h2> 
  -  
  -  
  -<h3>Introduction</h3> 
  -  
  -<p>This overview describes the set of APIs contained in
  -	 javax.xml.transform. For the sake of brevity, these interfaces are referred to
  -	 as TrAX (Transformations for XML). </p> 
  -  
  -<p>There is a broad need for Java applications to be able to transform XML
  -	 and related tree-shaped data structures. In fact, XML is not normally very
  -	 useful to an application without going through some sort of transformation,
  -	 unless the semantic structure is used directly as data. Almost all XML-related
  -	 applications need to perform transformations. Transformations may be described
  -	 by Java code, Perl code, <A href="http://www.w3.org/TR/xslt">XSLT</A>
  -	 Stylesheets, other types of script, or by proprietary formats. The inputs, one
  -	 or multiple, to a transformation, may be a URL, XML stream, a DOM tree, SAX
  -	 Events, or a proprietary format or data structure. The output types are the
  -	 pretty much the same types as the inputs, but different inputs may need to be
  -	 combined with different outputs.</p> 
  -  
  -<p>The great challenge of a transformation API is how to deal with all the
  -	 possible combinations of inputs and outputs, without becoming specialized for
  -	 any of the given types.</p> 
  -  
  -<p>The Java community will greatly benefit from a common API that will
  -	 allow them to understand and apply a single model, write to consistent
  -	 interfaces, and apply the transformations polymorphically. TrAX attempts to
  -	 define a model that is clean and generic, yet fills general application
  -	 requirements across a wide variety of uses. </p> 
  -   
  -	 
  -<h3>General Terminology</h3> 
  -	 
  -<p>This section will explain some general terminology used in this
  -		document. Technical terminology will be explained in the Model section. In many
  -		cases, the general terminology overlaps with the technical terminology.</p> 
  -	 
  -<ul>
  -<li>
  -<p>
  -<b>Tree</b>
  -<br>This term, as used within this document, describes an
  -			 abstract structure that consists of nodes or events that may be produced by
  -			 XML. A Tree physically may be a DOM tree, a series of well balanced parse
  -			 events (such as those coming from a SAX2 ContentHander), a series of requests
  -			 (the result of which can describe a tree), or a stream of marked-up
  -			 characters.</p>
  -</li>
  -<li>
  -<p>
  -<b>Source Tree(s)</b>
  -<br>One or more trees that are the inputs to the
  -			 transformation.</p>
  -</li>
  -<li>
  -<p>
  -<b>Result Tree(s)</b>
  -<br>One or more trees that are the output of the
  -			 transformation.</p>
  -</li>
  -<li>
  -<p>
  -<b>Transformation</b>
  -<br>The processor of consuming a stream or tree to produce
  -			 another stream or tree.</p>
  -</li>
  -<li>
  -<p>
  -<b>Identity (or Copy) Transformation</b>
  -<br>The process of transformation from a source to a result,
  -			 making as few structural changes as possible and no informational changes. The
  -			 term is somewhat loosely used, as the process is really a copy. from one
  -			 "format" (such as a DOM tree, stream, or set of SAX events) to
  -			 another.</p>
  -</li>
  -<li>
  -<p>
  -<b>Serialization</b>
  -<br>The process of taking a tree and turning it into a stream. In
  -			 some sense, a serialization is a specialized transformation.</p>
  -</li>
  -<li>
  -<p>
  -<b>Parsing</b>
  -<br>The process of taking a stream and turning it into a tree. In
  -			 some sense, parsing is a specialized transformation.</p>
  -</li>
  -<li>
  -<p>
  -<b>Transformer</b>
  -<br>A Transformer is the object that executes the transformation.
  -			 </p>
  -</li>
  -<li>
  -<p>
  -<b>Transformation instructions</b>
  -<br>Describes the transformation. A form of code, script, or
  -			 simply a declaration or series of declarations.</p>
  -</li>
  -<li>
  -<p>
  -<b>Stylesheet</b>
  -<br>The same as "transformation instructions," except it is
  -			 likely to be used in conjunction with <A href="http://www.w3.org/TR/xslt">XSLT</A>.</p>
  -</li>
  -<li>
  -<p>
  -<b>Templates</b>
  -<br>Another form of "transformation instructions." In the TrAX
  -			 interface, this term is used to describe processed or compiled transformation
  -			 instructions. The Source flows through a Templates object to be formed into the
  -			 Result.</p>
  -</li>
  -<li>
  -<p>
  -<b>Processor</b>
  -<br>A general term for the thing that may both process the
  -			 transformation instructions, and perform the transformation.</p>
  -</li>
  -<li>
  -<p>
  -<b>DOM</b>
  -<br>Document Object Model, specifically referring to the
  -			 <A href="#http://www.w3.org/TR/DOM-Level-2%20">Document Object Model
  -			 (DOM) Level 2 Specification</A>.</p>
  -</li>
  -<li>
  -<p>
  -<b>SAX</b>
  -<br>Simple API for XML, specifically referring to the
  -			 <A href="#http://www.megginson.com/SAX/SAX2">SAX 2.0
  -			 release</A>.</p>
  -</li>
  -</ul> 
  -   
  -  
  -  
  -<h3>Model</h3> 
  -  
  -<p>The section defines the abstract model for TrAX, apart from the details
  -	 of the interfaces.</p> 
  -  
  -<p>A TRaX <A href="#pattern-TransformerFactory">TransformerFactory</A> is an object
  -	 that processes transformation instructions, and produces
  -	 <A href="#pattern-Templates">Templates</A> (in the technical
  -	 terminology). A <A href="#pattern-Templates">Templates</A>
  -	 object provides a <A href="#pattern-Transformer">Transformer</A>, which transforms one or
  -	 more <A href="#pattern-Source">Source</A>s into one or more
  -	 <A href="#pattern-Result">Result</A>s.</p> 
  -  
  -<p>To use the TRaX interface, you create a
  -	 <A href="#pattern-TransformerFactory">TransformerFactory</A>,
  -	 which may directly provide a <A href="#pattern-Transformers">Transformers</A>, or which can provide
  -	 <A href="#pattern-Templates">Templates</A> from a variety of
  -	 <A href="#pattern-Source">Source</A>s. The
  -	 <A href="#pattern-Templates">Templates</A> object is a processed
  -	 or compiled representation of the transformation instructions, and provides a
  -	 <A href="#pattern-Transformer">Transformer</A>. The
  -	 <A href="#pattern-Transformer">Transformer</A> processes a
  -	 <A href="#pattern-Transformer">Source</A> according to the
  -	 instructions found in the <A href="#pattern-Templates">Templates</A>, and produces a
  -	 <A href="#pattern-Result">Result</A>.</p> 
  -  
  -<p>The process of transformation from a tree, either in the form of an
  -	 object model, or in the form of parse events, into a stream, is known as
  -	 <code>serialization</code>. We believe this is the most suitable term for
  -	 this process, despite the overlap with Java object serialization.</p>
  -  
  -<H3>TRaX Patterns</H3>
  -<ul>
  -<p>
  -<b><a name="pattern-Processor">Processor</a></b>
  -<br>
  -<br>
  -<i>Intent: </i>Generic concept for the
  -  set of objects that implement the TrAX interfaces.<br>
  -<i>Responsibilities: </i>Create compiled transformation instructions, transform
  -  sources, and manage transformation parameters and
  -  properties.<br>
  -<i>Thread safety: </i>Only the Templates object can be
  -  used concurrently in multiple threads. The rest of the processor does not do
  -  synchronized blocking, and so may not be used to perform multiple concurrent
  -  operations. Different Processors can be used concurrently by different
  -  threads.</p>
  -<p>
  -<b><a name="pattern-TransformerFactory">TransformerFactory</a></b>
  -<br>
  -<br>
  -<i>Intent: </i>Serve as a vendor-neutral Processor interface for
  -  <A href="http://www.w3.org/TR/xslt">XSLT</A> and similar
  -  processors.<br>
  -<i>Responsibilities: </i>Serve as a factory for a concrete
  -  implementation of an TransformerFactory, serve as a direct factory for
  -  Transformer objects, serve as a factory for Templates objects, and manage
  -  processor specific features.<br>
  -<i>Thread safety: </i>A
  -  TransformerFactory may not perform mulitple concurrent
  -  operations.</p>
  -<p>
  -<b><a name="pattern-Templates">Templates</a></b>
  -<br>
  -<br>
  -<i>Intent: </i>The
  -  runtime representation of the transformation instructions.<br>
  -<i>Responsibilities: </i>A data bag for transformation instructions; act as a factory
  -  for Transformers.<br>
  -<i>Thread safety: </i>Threadsafe for concurrent
  -  usage over multiple threads once construction is complete.</p>
  -<p>
  -<b><a name="pattern-Transformer">Transformer</a></b>
  -<br>
  -<br>
  -<i>Intent: </i>Act as a per-thread
  -  execution context for transformations, act as an interface for performing the
  -  transformation.<br>
  -<i>Responsibilities: </i>Perform the
  -  transformation.<br>
  -<i>Thread safety: </i>Only one instance per thread
  -  is safe.<br>
  -<i>Notes: </i>The Transformer is bound to the Templates
  -  object that created it.</p>
  -<p>
  -<b><a name="pattern-Source">Source</a></b>
  -<br>
  -<br>
  -<i>Intent: </i>Serve as a
  -  single vendor-neutral object for multiple types of input.<br>
  -<i>Responsibilities: </i>Act as simple data holder for System IDs, DOM nodes, streams,
  -  etc.<br>
  -<i>Thread safety: </i>Threadsafe concurrently over multiple
  -  threads for read-only operations; must be synchronized for edit
  -  operations.</p>
  -<p>
  -<b><a name="pattern-Result">Result</a></b>
  -<br>
  -<br>
  -<i>Potential alternate name: </i>ResultTarget<br>
  -<i>Intent: </i>Serve
  -  as a single object for multiple types of output, so there can be simple process
  -  method signatures.<br>
  -<i>Responsibilities: </i>Act as simple data holder for
  -  output stream, DOM node, ContentHandler, etc.<br>
  -<i>Thread safety: </i>Threadsafe concurrently over multiple threads for read-only,
  -  must be synchronized for edit.</p>
  -</ul> 
  -  
  -
  -</body>
  -</html>
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  +<html>
  +<head>
  +<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  +<title></title>
  +</head>
  +<body> 
  +  
  +<h2>Transformation API For XML </h2> 
  +  
  +  
  +<h3>Introduction</h3> 
  +  
  +<p>This overview describes the set of APIs contained in
  +	 javax.xml.transform. For the sake of brevity, these interfaces are referred to
  +	 as TrAX (Transformations for XML). </p> 
  +  
  +<p>There is a broad need for Java applications to be able to transform XML
  +	 and related tree-shaped data structures. In fact, XML is not normally very
  +	 useful to an application without going through some sort of transformation,
  +	 unless the semantic structure is used directly as data. Almost all XML-related
  +	 applications need to perform transformations. Transformations may be described
  +	 by Java code, Perl code, <A href="http://www.w3.org/TR/xslt">XSLT</A>
  +	 Stylesheets, other types of script, or by proprietary formats. The inputs, one
  +	 or multiple, to a transformation, may be a URL, XML stream, a DOM tree, SAX
  +	 Events, or a proprietary format or data structure. The output types are the
  +	 pretty much the same types as the inputs, but different inputs may need to be
  +	 combined with different outputs.</p> 
  +  
  +<p>The great challenge of a transformation API is how to deal with all the
  +	 possible combinations of inputs and outputs, without becoming specialized for
  +	 any of the given types.</p> 
  +  
  +<p>The Java community will greatly benefit from a common API that will
  +	 allow them to understand and apply a single model, write to consistent
  +	 interfaces, and apply the transformations polymorphically. TrAX attempts to
  +	 define a model that is clean and generic, yet fills general application
  +	 requirements across a wide variety of uses. </p> 
  +   
  +	 
  +<h3>General Terminology</h3> 
  +	 
  +<p>This section will explain some general terminology used in this
  +		document. Technical terminology will be explained in the Model section. In many
  +		cases, the general terminology overlaps with the technical terminology.</p> 
  +	 
  +<ul>
  +<li>
  +<p>
  +<b>Tree</b>
  +<br>This term, as used within this document, describes an
  +			 abstract structure that consists of nodes or events that may be produced by
  +			 XML. A Tree physically may be a DOM tree, a series of well balanced parse
  +			 events (such as those coming from a SAX2 ContentHander), a series of requests
  +			 (the result of which can describe a tree), or a stream of marked-up
  +			 characters.</p>
  +</li>
  +<li>
  +<p>
  +<b>Source Tree(s)</b>
  +<br>One or more trees that are the inputs to the
  +			 transformation.</p>
  +</li>
  +<li>
  +<p>
  +<b>Result Tree(s)</b>
  +<br>One or more trees that are the output of the
  +			 transformation.</p>
  +</li>
  +<li>
  +<p>
  +<b>Transformation</b>
  +<br>The processor of consuming a stream or tree to produce
  +			 another stream or tree.</p>
  +</li>
  +<li>
  +<p>
  +<b>Identity (or Copy) Transformation</b>
  +<br>The process of transformation from a source to a result,
  +			 making as few structural changes as possible and no informational changes. The
  +			 term is somewhat loosely used, as the process is really a copy. from one
  +			 "format" (such as a DOM tree, stream, or set of SAX events) to
  +			 another.</p>
  +</li>
  +<li>
  +<p>
  +<b>Serialization</b>
  +<br>The process of taking a tree and turning it into a stream. In
  +			 some sense, a serialization is a specialized transformation.</p>
  +</li>
  +<li>
  +<p>
  +<b>Parsing</b>
  +<br>The process of taking a stream and turning it into a tree. In
  +			 some sense, parsing is a specialized transformation.</p>
  +</li>
  +<li>
  +<p>
  +<b>Transformer</b>
  +<br>A Transformer is the object that executes the transformation.
  +			 </p>
  +</li>
  +<li>
  +<p>
  +<b>Transformation instructions</b>
  +<br>Describes the transformation. A form of code, script, or
  +			 simply a declaration or series of declarations.</p>
  +</li>
  +<li>
  +<p>
  +<b>Stylesheet</b>
  +<br>The same as "transformation instructions," except it is
  +			 likely to be used in conjunction with <A href="http://www.w3.org/TR/xslt">XSLT</A>.</p>
  +</li>
  +<li>
  +<p>
  +<b>Templates</b>
  +<br>Another form of "transformation instructions." In the TrAX
  +			 interface, this term is used to describe processed or compiled transformation
  +			 instructions. The Source flows through a Templates object to be formed into the
  +			 Result.</p>
  +</li>
  +<li>
  +<p>
  +<b>Processor</b>
  +<br>A general term for the thing that may both process the
  +			 transformation instructions, and perform the transformation.</p>
  +</li>
  +<li>
  +<p>
  +<b>DOM</b>
  +<br>Document Object Model, specifically referring to the
  +			 <A href="#http://www.w3.org/TR/DOM-Level-2%20">Document Object Model
  +			 (DOM) Level 2 Specification</A>.</p>
  +</li>
  +<li>
  +<p>
  +<b>SAX</b>
  +<br>Simple API for XML, specifically referring to the
  +			 <A href="#http://www.megginson.com/SAX/SAX2">SAX 2.0
  +			 release</A>.</p>
  +</li>
  +</ul> 
  +   
  +  
  +  
  +<h3>Model</h3> 
  +  
  +<p>The section defines the abstract model for TrAX, apart from the details
  +	 of the interfaces.</p> 
  +  
  +<p>A TRaX <A href="#pattern-TransformerFactory">TransformerFactory</A> is an object
  +	 that processes transformation instructions, and produces
  +	 <A href="#pattern-Templates">Templates</A> (in the technical
  +	 terminology). A <A href="#pattern-Templates">Templates</A>
  +	 object provides a <A href="#pattern-Transformer">Transformer</A>, which transforms one or
  +	 more <A href="#pattern-Source">Source</A>s into one or more
  +	 <A href="#pattern-Result">Result</A>s.</p> 
  +  
  +<p>To use the TRaX interface, you create a
  +	 <A href="#pattern-TransformerFactory">TransformerFactory</A>,
  +	 which may directly provide a <A href="#pattern-Transformers">Transformers</A>, or which can provide
  +	 <A href="#pattern-Templates">Templates</A> from a variety of
  +	 <A href="#pattern-Source">Source</A>s. The
  +	 <A href="#pattern-Templates">Templates</A> object is a processed
  +	 or compiled representation of the transformation instructions, and provides a
  +	 <A href="#pattern-Transformer">Transformer</A>. The
  +	 <A href="#pattern-Transformer">Transformer</A> processes a
  +	 <A href="#pattern-Transformer">Source</A> according to the
  +	 instructions found in the <A href="#pattern-Templates">Templates</A>, and produces a
  +	 <A href="#pattern-Result">Result</A>.</p> 
  +  
  +<p>The process of transformation from a tree, either in the form of an
  +	 object model, or in the form of parse events, into a stream, is known as
  +	 <code>serialization</code>. We believe this is the most suitable term for
  +	 this process, despite the overlap with Java object serialization.</p>
  +  
  +<H3>TRaX Patterns</H3>
  +<ul>
  +<p>
  +<b><a name="pattern-Processor">Processor</a></b>
  +<br>
  +<br>
  +<i>Intent: </i>Generic concept for the
  +  set of objects that implement the TrAX interfaces.<br>
  +<i>Responsibilities: </i>Create compiled transformation instructions, transform
  +  sources, and manage transformation parameters and
  +  properties.<br>
  +<i>Thread safety: </i>Only the Templates object can be
  +  used concurrently in multiple threads. The rest of the processor does not do
  +  synchronized blocking, and so may not be used to perform multiple concurrent
  +  operations. Different Processors can be used concurrently by different
  +  threads.</p>
  +<p>
  +<b><a name="pattern-TransformerFactory">TransformerFactory</a></b>
  +<br>
  +<br>
  +<i>Intent: </i>Serve as a vendor-neutral Processor interface for
  +  <A href="http://www.w3.org/TR/xslt">XSLT</A> and similar
  +  processors.<br>
  +<i>Responsibilities: </i>Serve as a factory for a concrete
  +  implementation of an TransformerFactory, serve as a direct factory for
  +  Transformer objects, serve as a factory for Templates objects, and manage
  +  processor specific features.<br>
  +<i>Thread safety: </i>A
  +  TransformerFactory may not perform mulitple concurrent
  +  operations.</p>
  +<p>
  +<b><a name="pattern-Templates">Templates</a></b>
  +<br>
  +<br>
  +<i>Intent: </i>The
  +  runtime representation of the transformation instructions.<br>
  +<i>Responsibilities: </i>A data bag for transformation instructions; act as a factory
  +  for Transformers.<br>
  +<i>Thread safety: </i>Threadsafe for concurrent
  +  usage over multiple threads once construction is complete.</p>
  +<p>
  +<b><a name="pattern-Transformer">Transformer</a></b>
  +<br>
  +<br>
  +<i>Intent: </i>Act as a per-thread
  +  execution context for transformations, act as an interface for performing the
  +  transformation.<br>
  +<i>Responsibilities: </i>Perform the
  +  transformation.<br>
  +<i>Thread safety: </i>Only one instance per thread
  +  is safe.<br>
  +<i>Notes: </i>The Transformer is bound to the Templates
  +  object that created it.</p>
  +<p>
  +<b><a name="pattern-Source">Source</a></b>
  +<br>
  +<br>
  +<i>Intent: </i>Serve as a
  +  single vendor-neutral object for multiple types of input.<br>
  +<i>Responsibilities: </i>Act as simple data holder for System IDs, DOM nodes, streams,
  +  etc.<br>
  +<i>Thread safety: </i>Threadsafe concurrently over multiple
  +  threads for read-only operations; must be synchronized for edit
  +  operations.</p>
  +<p>
  +<b><a name="pattern-Result">Result</a></b>
  +<br>
  +<br>
  +<i>Potential alternate name: </i>ResultTarget<br>
  +<i>Intent: </i>Serve
  +  as a single object for multiple types of output, so there can be simple process
  +  method signatures.<br>
  +<i>Responsibilities: </i>Act as simple data holder for
  +  output stream, DOM node, ContentHandler, etc.<br>
  +<i>Thread safety: </i>Threadsafe concurrently over multiple threads for read-only,
  +  must be synchronized for edit.</p>
  +</ul> 
  +  
  +
  +</body>
  +</html>
  
  
  
  1.12      +135 -136  xml-xalan/java/src/javax/xml/transform/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/package.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- package.html	2001/04/26 18:56:30	1.11
  +++ package.html	2001/10/10 18:08:28	1.12
  @@ -5,49 +5,46 @@
   <title>javax.xml.transform</title>
   </head>
   <body>
  -<p>This package defines the generic APIs for processing transformation instructions,
  -		and performing a transformation from source to result. These 
  -		interfaces have no dependencies on SAX or the DOM standard, and try to make as
  -		few assumptions as possible about the details of the source and result of a
  -		transformation. The API achieves this by defining 
  -		{@link javax.xml.transform.Source} and 
  -		{@link javax.xml.transform.Result} interfaces.</p>
  +<p>This package defines the generic APIs for processing transformation
  +        instructions, and performing a transformation from source to result. These
  +        interfaces have no dependencies on SAX or the DOM standard, and try to make as
  +        few assumptions as possible about the details of the source and result of a
  +        transformation. It achieves this by defining
  +        {@link javax.xml.transform.Source} and
  +        {@link javax.xml.transform.Result} interfaces.</p>
   <p>To define concrete classes for the user, the API defines specializations
  -		of the interfaces found at the root level. These interfaces are found in 
  -		{@link javax.xml.transform.sax}, {@link javax.xml.transform.dom},
  -		and {@link javax.xml.transform.stream}.</p> 
  -		
  -<h3>Creating Objects</h3> 
  -		
  -<p>The API allows a concrete 
  -		  {@link javax.xml.transform.TransformerFactory} object to be created from
  -		  the static function 
  -		  {@link javax.xml.transform.TransformerFactory#newInstance}. The
  -		  "javax.xml.transform.TransformerFactory" system property determines which
  -		  factory implementation to instantiate. This property names a concrete subclass
  -		  of the TransformerFactory abstract class. If this system property is not
  -		  defined, a platform default is used.</p> 
  -	  
  -		
  -<h3>Specification of Inputs and Outputs</h3> 
  -		
  -<p>This API defines two interface objects called 
  -		  {@link javax.xml.transform.Source} and 
  -		  {@link javax.xml.transform.Result}. In order to pass Source and Result
  -		  objects to the interfaces, concrete classes must be used. The transformation API defines
  -		  three concrete representations for each of these objects: 
  -		  {@link javax.xml.transform.stream.StreamSource} and 
  -		  {@link javax.xml.transform.stream.StreamResult},
  -		  {@link javax.xml.transform.sax.SAXSource} and 
  -		  {@link javax.xml.transform.sax.SAXResult}, and 
  -		  {@link javax.xml.transform.dom.DOMSource} and 
  -		  {@link javax.xml.transform.dom.DOMResult}. Each of these objects defines
  -		  a FEATURE string (which is i the form of a URL), which can be passed into 
  -		  {@link javax.xml.transform.TransformerFactory#getFeature} to see if the
  -		  given type of Source or Result object is supported. For instance, to test if a
  -		  DOMSource and a StreamResult is supported, you can apply the following
  -		  test.</p> 
  -		
  +        of the interfaces found at the root level. These interfaces are found in
  +        {@link javax.xml.transform.sax}, {@link javax.xml.transform.dom},
  +        and {@link javax.xml.transform.stream}.</p>
  +        
  +<h3>Creating Objects</h3>
  +        
  +<p>The API allows a concrete
  +          {@link javax.xml.transform.TransformerFactory} object to be created from
  +          the static function
  +          {@link javax.xml.transform.TransformerFactory#newInstance}.
  +      
  +        
  +<h3>Specification of Inputs and Outputs</h3>
  +        
  +<p>This API defines two interface objects called
  +          {@link javax.xml.transform.Source} and
  +          {@link javax.xml.transform.Result}. In order to pass Source and Result
  +          objects to the interfaces, concrete classes must be used.
  +          Three concrete representations are defined for each of these
  +          objects:
  +          {@link javax.xml.transform.stream.StreamSource} and
  +          {@link javax.xml.transform.stream.StreamResult},
  +          {@link javax.xml.transform.sax.SAXSource} and
  +          {@link javax.xml.transform.sax.SAXResult}, and
  +          {@link javax.xml.transform.dom.DOMSource} and
  +          {@link javax.xml.transform.dom.DOMResult}. Each of these objects defines
  +          a FEATURE string (which is i the form of a URL), which can be passed into
  +          {@link javax.xml.transform.TransformerFactory#getFeature} to see if the
  +          given type of Source or Result object is supported. For instance, to test if a
  +          DOMSource and a StreamResult is supported, you can apply the following
  +          test.</p>
  +        
   <code>
   <pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
   
  @@ -57,122 +54,124 @@
       }</pre>
   </code>
      
  -	 
  +     
   <h3>
  -<a name="qname-delimiter">Qualified Name representation</a>
  -</h3> 
  -	 
  +<a name="qname-delimiter">Qualified Name Representation</a>
  +</h3>
  +     
   <p>
   <A href="http://www.w3.org/TR/REC-xml-names">Namespaces</A>
  -		present something of a problem area when dealing with XML objects. Qualified
  -		Names appear in XML markup as prefixed names. But the prefixes themselves do
  -		not hold identity. Rather, it is the URIs that they contextually map to that
  -		hold the identity. Therefore, when passing a Qualified Name like "xyz:foo"
  -		among Java programs, one must provide a means to map "xyz" to a namespace.
  -		</p> 
  -	 
  +        present something of a problem area when dealing with XML objects. Qualified
  +        Names appear in XML markup as prefixed names. But the prefixes themselves do
  +        not hold identity. Rather, it is the URIs that they contextually map to that
  +        hold the identity. Therefore, when passing a Qualified Name like "xyz:foo"
  +        among Java programs, one must provide a means to map "xyz" to a namespace.
  +        </p>
  +     
   <p>One solution has been to create a "QName" object that holds the
  -		namespace URI, as well as the prefix and local name, but this is not always an
  -		optimal solution, as when, for example, you want to use unique strings as keys
  -		in a dictionary object. Not having a string representation also makes it
  -		difficult to specify a namespaced identity outside the context of an XML
  -		document.</p> 
  -	 
  +        namespace URI, as well as the prefix and local name, but this is not always an
  +        optimal solution, as when, for example, you want to use unique strings as keys
  +        in a dictionary object. Not having a string representation also makes it
  +        difficult to specify a namespaced identity outside the context of an XML
  +        document.</p>
  +     
   <p>In order to pass namespaced values to transformations, for instance
  -		as a set of properties to the Serializer, this specification defines that a
  -		String "qname" object parameter be passed as two-part string, the namespace URI
  -		enclosed in curly braces ({}), followed by the local name. If the qname has a
  -		null URI, then the String object only contains the local name. An application
  -		can safely check for a non-null URI by testing to see if the first character of
  -		the name is a '{' character.</p> 
  -	 
  +        as a set of properties to the Serializer, this specification defines that a
  +        String "qname" object parameter be passed as two-part string, the namespace URI
  +        enclosed in curly braces ({}), followed by the local name. If the qname has a
  +        null URI, then the String object only contains the local name. An application
  +        can safely check for a non-null URI by testing to see if the first character of
  +        the name is a '{' character.</p>
  +     
   <p>For example, if a URI and local name were obtained from an element
  -		defined with &lt;xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/&gt;,
  -		then the transformation API Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo".
  -		Note that the prefix is lost.</p> 
  +        defined with &lt;xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/&gt;,
  +        then the Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo".
  +        Note that the prefix is lost.</p>
      
  -	 
  -<h3>Result Tree Serialization</h3> 
  -	 
  +     
  +<h3>Result Tree Serialization</h3>
  +     
   <p>Serialization of the result tree to a stream can be controlled with
  -		the {@link javax.xml.transform.Transformer#setOutputProperties} and the 
  -		{@link javax.xml.transform.Transformer#setOutputProperty} methods.
  -		Strings that match the <A href="http://www.w3.org/TR/xslt#output">XSLT
  -		specification for xsl:output attributes</A> can be referenced from the 
  -		{@link javax.xml.transform.OutputKeys} class. Other strings can be
  -		specified as well. If the transformer does not recognize an output key, a 
  -		{@link java.lang.IllegalArgumentException} is thrown, unless the 
  -		unless the key name is <A href="#qname-delimiter">namespace qualified</A>. Output key names that are
  -		qualified by a namespace are ignored or passed on to the serializer
  -		mechanism.</p> 
  -	 
  +        the {@link javax.xml.transform.Transformer#setOutputProperties} and the
  +        {@link javax.xml.transform.Transformer#setOutputProperty} methods.
  +        Strings that match the <A href="http://www.w3.org/TR/xslt#output">XSLT
  +        specification for xsl:output attributes</A> can be referenced from the
  +        {@link javax.xml.transform.OutputKeys} class. Other strings can be
  +        specified as well. If the transformer does not recognize an output key, a
  +        {@link java.lang.IllegalArgumentException} is thrown, unless the
  +        key name is <A href="#qname-delimiter">namespace qualified</A>. Output key names that are
  +        qualified by a namespace are ignored or passed on to the serializer
  +        mechanism.</p>
  +     
   <p>If all that is desired is the simple identity transformation of a
  -		source to a result, then {@link javax.xml.transform.TransformerFactory}
  -		provides a
  -		{@link javax.xml.transform.TransformerFactory#newTransformer()} method
  -		with no arguments. This method creates a Transformer that effectively copies
  -		the source to the result. This method may be used to create a DOM from SAX
  -		events or to create an XML or HTML stream from a DOM or SAX events.</p>
  +        source to a result, then {@link javax.xml.transform.TransformerFactory}
  +        provides a
  +        {@link javax.xml.transform.TransformerFactory#newTransformer()} method
  +        with no arguments. This method creates a Transformer that effectively copies
  +        the source to the result. This method may be used to create a DOM from SAX
  +        events or to create an XML or HTML stream from a DOM or SAX events.  </p>
  +     
    
     
  -<h3>Exceptions and Error Reporting</h3> 
  +<h3>Exceptions and Error Reporting</h3>
     
  -<p>The transformation API throws three types of specialized exceptions. A
  -	 {@link javax.xml.transform.TransformerFactoryConfigurationError} is parallel to
  -	 the {@link javax.xml.parsers.FactoryConfigurationError}, and is thrown
  -	 when a configuration problem with the TransformerFactory exists. This error
  -	 will typically be thrown when the transformation factory class specified with
  -	 the "javax.xml.transform.TransformerFactory" system property cannot be found or
  -	 instantiated.</p> 
  +<p>The transformation API throw three types of specialized exceptions. A
  +     {@link javax.xml.transform.TransformerFactoryConfigurationError} is parallel to
  +     the {@link javax.xml.parsers.FactoryConfigurationError}, and is thrown
  +     when a configuration problem with the TransformerFactory exists. This error
  +     will typically be thrown when the transformation factory class specified with
  +     the "javax.xml.transform.TransformerFactory" system property cannot be found or
  +     instantiated.</p>
     
   <p>A {@link javax.xml.transform.TransformerConfigurationException}
  -	 may be thrown if for any reason a Transformer can not be created. A
  -	 TransformerConfigurationException may be thrown if there is a syntax error in
  -	 the transformation instructions, for example when
  -	 {@link javax.xml.transform.TransformerFactory#newTransformer} is
  -	 called.</p> 
  +     may be thrown if for any reason a Transformer can not be created. A
  +     TransformerConfigurationException may be thrown if there is a syntax error in
  +     the transformation instructions, for example when
  +     {@link javax.xml.transform.TransformerFactory#newTransformer} is
  +     called.</p>
     
   <p>{@link javax.xml.transform.TransformerException} is a general
  -	 exception that occurs during the course of a transformation. A transformer
  -	 exception may wrap another exception, and if any of the
  -	 {@link javax.xml.transform.TransformerException#printStackTrace()}
  -	 methods are called on it, it will produce a list of stack dumps, starting from
  -	 the most recent. The transformer exception also provides a
  -	 {@link javax.xml.transform.SourceLocator} object which indicates where
  -	 in the source tree or transformation instructions the error occurred.
  -	 {@link javax.xml.transform.TransformerException#getMessageAndLocation()}
  -	 may be called to get an error message with location info, and
  -	 {@link javax.xml.transform.TransformerException#getLocationAsString()}
  -	 may be called to get just the location string.</p> 
  +     exception that occurs during the course of a transformation. A transformer
  +     exception may wrap another exception, and if any of the
  +     {@link javax.xml.transform.TransformerException#printStackTrace()}
  +     methods are called on it, it will produce a list of stack dumps, starting from
  +     the most recent. The transformer exception also provides a
  +     {@link javax.xml.transform.SourceLocator} object which indicates where
  +     in the source tree or transformation instructions the error occurred.
  +     {@link javax.xml.transform.TransformerException#getMessageAndLocation()}
  +     may be called to get an error message with location info, and
  +     {@link javax.xml.transform.TransformerException#getLocationAsString()}
  +     may be called to get just the location string.</p>
     
   <p>Transformation warnings and errors are normally first sent to a
  -	 {@link javax.xml.transform.ErrorListener}, at which point the
  -	 implementor may decide to report the error or warning, and may decide to throw
  -	 an exception for a non-fatal error. The error listener may be set via
  -	 {@link javax.xml.transform.TransformerFactory#setErrorListener} for
  -	 reporting errors that have to do with syntax errors in the transformation
  -	 instructions, or via
  -	 {@link javax.xml.transform.Transformer#setErrorListener} to report
  -	 errors that occur during the transformation. The error listener on both objects
  -	 should always be valid and non-null, whether set by the user or a default
  -	 implementation provided by the processor.</p> 
  +     {@link javax.xml.transform.ErrorListener}, at which point the
  +     implementor may decide to report the error or warning, and may decide to throw
  +     an exception for a non-fatal error. The error listener may be set via
  +     {@link javax.xml.transform.TransformerFactory#setErrorListener} for
  +     reporting errors that have to do with syntax errors in the transformation
  +     instructions, or via
  +     {@link javax.xml.transform.Transformer#setErrorListener} to report
  +     errors that occur during the transformation. The error listener on both objects
  +     should always be valid and non-null, whether set by the user or a default
  +     implementation provided by the processor.</p>
    
     
  -<h3>Resolution of URIs within a transformation</h3> 
  +<h3>Resolution of URIs within a transformation</h3>
     
   <p>The API provides a way for URIs referenced from within the stylesheet
  -	 instructions or within the transformation to be resolved by the calling
  -	 application. This can be done by creating a class that implements the
  -	 URIResolver interface, with its one method,
  -	 {@link javax.xml.transform.URIResolver#resolve}, and use this class to
  -	 set the URI resolution for the transformation instructions or transformation
  -	 with {@link javax.xml.transform.TransformerFactory#setURIResolver} or
  -	 {@link javax.xml.transform.Transformer#setURIResolver}. The
  -	 URIResolver.resolve method takes two String arguments, the URI found in the
  -	 stylesheet instructions or built as part of the transformation process, and the
  -	 base URI in effect when the URI passed as the first argument was encountered.
  -	 The returned {@link javax.xml.transform.Source} object must be usable by
  -	 the transformer, as specified in its implemented features.</p> 
  +     instructions or within the transformation to be resolved by the calling
  +     application. This can be done by creating a class that implements the
  +     {@link javax.xml.transform.URIResolver} interface, with its one method,
  +     {@link javax.xml.transform.URIResolver#resolve}, and use this class to
  +     set the URI resolution for the transformation instructions or transformation
  +     with {@link javax.xml.transform.TransformerFactory#setURIResolver} or
  +     {@link javax.xml.transform.Transformer#setURIResolver}. The
  +     <code>URIResolver.resolve</code> method takes two String arguments, the URI found in the
  +     stylesheet instructions or built as part of the transformation process, and the
  +     base URI in effect when the URI passed as the first argument was encountered.
  +     The returned {@link javax.xml.transform.Source} object must be usable by
  +     the transformer, as specified in its implemented features.</p>
  +  
   
   </body>
   </html>
  
  
  
  1.1                  xml-xalan/java/src/javax/xml/transform/FactoryFinder.java
  
  Index: FactoryFinder.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    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
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    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,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The name "Apache Software Foundation" must not be used to endorse or
   *    promote products derived from this software without prior written
   *    permission. For written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package javax.xml.transform;
  
  import java.io.InputStream;
  import java.io.IOException;
  import java.io.File;
  import java.io.FileInputStream;
  
  import java.util.Properties;
  import java.io.BufferedReader;
  import java.io.InputStreamReader;
  
  /**
   * This class is duplicated for each JAXP subpackage so keep it in
   * sync.  It is package private.
   *
   * This code is designed to implement the JAXP 1.1 spec pluggability
   * feature and is designed to run on JDK version 1.1 and later including
   * JVMs that perform early linking like the Microsoft JVM in IE 5.  Note
   * however that it must be compiled on a JDK version 1.2 or later system
   * since it calls Thread#getContextClassLoader().  The code also runs both
   * as part of an unbundled jar file and when bundled as part of the JDK.
   */
  class FactoryFinder {
      /** Temp debug code - this will be removed after we test everything
       */
      private static boolean debug = false;
      static {
          // Use try/catch block to support applets
          try {
              debug = System.getProperty("jaxp.debug") != null;
          } catch (Exception x) {
          }
      }
  
      private static void debugPrintln(String msg) {
          if (debug) {
              System.err.println("JAXP: " + msg);
          }
      }
  
      /**
       * Figure out which ClassLoader to use.  For JDK 1.2 and later use the
       * context ClassLoader if possible.  Note: we defer linking the class
       * that calls an API only in JDK 1.2 until runtime so that we can catch
       * LinkageError so that this code will run in older non-Sun JVMs such
       * as the Microsoft JVM in IE.
       */
      private static ClassLoader findClassLoader()
          throws ConfigurationError
      {
          ClassLoader classLoader;
          try {
              // Construct the name of the concrete class to instantiate
              Class clazz = Class.forName(FactoryFinder.class.getName()
                                          + "$ClassLoaderFinderConcrete");
              ClassLoaderFinder clf = (ClassLoaderFinder) clazz.newInstance();
              classLoader = clf.getContextClassLoader();
          } catch (LinkageError le) {
              // Assume that we are running JDK 1.1, use the current ClassLoader
              classLoader = FactoryFinder.class.getClassLoader();
          } catch (ClassNotFoundException x) {
              // This case should not normally happen.  MS IE can throw this
              // instead of a LinkageError the second time Class.forName() is
              // called so assume that we are running JDK 1.1 and use the
              // current ClassLoader
              classLoader = FactoryFinder.class.getClassLoader();
          } catch (Exception x) {
              // Something abnormal happened so throw an error
              throw new ConfigurationError(x.toString(), x);
          }
          return classLoader;
      }
  
      /**
       * Create an instance of a class using the specified ClassLoader
       */
      private static Object newInstance(String className,
                                        ClassLoader classLoader)
          throws ConfigurationError
      {
          try {
              Class spiClass;
              if (classLoader == null) {
                  spiClass = Class.forName(className);
              } else {
                  spiClass = classLoader.loadClass(className);
              }
              return spiClass.newInstance();
          } catch (ClassNotFoundException x) {
              throw new ConfigurationError(
                  "Provider " + className + " not found", x);
          } catch (Exception x) {
              throw new ConfigurationError(
                  "Provider " + className + " could not be instantiated: " + x,
                  x);
          }
      }
  
      /**
       * Finds the implementation Class object in the specified order.  Main
       * entry point.
       * @return Class object of factory, never null
       *
       * @param factoryId             Name of the factory to find, same as
       *                              a property name
       * @param fallbackClassName     Implementation class name, if nothing else
       *                              is found.  Use null to mean no fallback.
       *
       * Package private so this code can be shared.
       */
      static Object find(String factoryId, String fallbackClassName)
          throws ConfigurationError
      {
          ClassLoader classLoader = findClassLoader();
  
          // Use the system property first
          try {
              String systemProp =
                  System.getProperty( factoryId );
              if( systemProp!=null) {
                  debugPrintln("found system property" + systemProp);
                  return newInstance(systemProp, classLoader);
              }
          } catch (SecurityException se) {
          }
  
          // try to read from $java.home/lib/xml.properties
          try {
              String javah=System.getProperty( "java.home" );
              String configFile = javah + File.separator +
                  "lib" + File.separator + "jaxp.properties";
              File f=new File( configFile );
              if( f.exists()) {
                  Properties props=new Properties();
                  props.load( new FileInputStream(f));
                  String factoryClassName = props.getProperty(factoryId);
                  debugPrintln("found java.home property " + factoryClassName);
                  return newInstance(factoryClassName, classLoader);
              }
          } catch(Exception ex ) {
              if( debug ) ex.printStackTrace();
          }
  
          String serviceId = "META-INF/services/" + factoryId;
          // try to find services in CLASSPATH
          try {
              InputStream is=null;
              if (classLoader == null) {
                  is=ClassLoader.getSystemResourceAsStream( serviceId );
              } else {
                  is=classLoader.getResourceAsStream( serviceId );
              }
          
              if( is!=null ) {
                  debugPrintln("found " + serviceId);
                  BufferedReader rd =
                      new BufferedReader(new InputStreamReader(is, "UTF-8"));
          
                  String factoryClassName = rd.readLine();
                  rd.close();
  
                  if (factoryClassName != null &&
                      ! "".equals(factoryClassName)) {
                      debugPrintln("loaded from services: " + factoryClassName);
                      return newInstance(factoryClassName, classLoader);
                  }
              }
          } catch( Exception ex ) {
              if( debug ) ex.printStackTrace();
          }
  
          if (fallbackClassName == null) {
              throw new ConfigurationError(
                  "Provider for " + factoryId + " cannot be found", null);
          }
  
          debugPrintln("loaded from fallback value: " + fallbackClassName);
          return newInstance(fallbackClassName, classLoader);
      }
  
      static class ConfigurationError extends Error {
          private Exception exception;
  
          /**
           * Construct a new instance with the specified detail string and
           * exception.
           */
          ConfigurationError(String msg, Exception x) {
              super(msg);
              this.exception = x;
          }
  
          Exception getException() {
              return exception;
          }
      }
  
      /*
       * The following nested classes allow getContextClassLoader() to be
       * called only on JDK 1.2 and yet run in older JDK 1.1 JVMs
       */
  
      private static abstract class ClassLoaderFinder {
          abstract ClassLoader getContextClassLoader();
      }
  
      static class ClassLoaderFinderConcrete extends ClassLoaderFinder {
          ClassLoader getContextClassLoader() {
              return Thread.currentThread().getContextClassLoader();
          }
      }
  }
  
  
  
  1.7       +10 -14    xml-xalan/java/src/javax/xml/transform/dom/DOMLocator.java
  
  Index: DOMLocator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/dom/DOMLocator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DOMLocator.java	2000/12/20 04:55:24	1.6
  +++ DOMLocator.java	2001/10/10 18:08:29	1.7
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,15 +47,10 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: DOMLocator.java,v 1.6 2000/12/20 04:55:24 sboag Exp $
  - */
   package javax.xml.transform.dom;
   
   import javax.xml.transform.SourceLocator;
  @@ -67,9 +61,10 @@
   /**
    * Indicates the position of a node in a source DOM, intended
    * primarily for error reporting.  To use a DOMLocator, the receiver of an
  - * error must downcast the SourceLocator object returned by an exception.
  - * A Transformer may use this object for  purposes other than error reporting,
  - * for instance, to indicate the source node that originated a result node.
  + * error must downcast the {@link javax.xml.transform.SourceLocator}
  + * object returned by an exception. A {@link javax.xml.transform.Transformer}
  + * may use this object for purposes other than error reporting, for instance,
  + * to indicate the source node that originated a result node.
    */
   public interface DOMLocator extends SourceLocator {
   
  @@ -80,3 +75,4 @@
        */
       public Node getOriginatingNode();
   }
  +
  
  
  
  1.10      +5 -11     xml-xalan/java/src/javax/xml/transform/dom/DOMResult.java
  
  Index: DOMResult.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/dom/DOMResult.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DOMResult.java	2000/12/20 04:55:24	1.9
  +++ DOMResult.java	2001/10/10 18:08:29	1.10
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: DOMResult.java,v 1.9 2000/12/20 04:55:24 sboag Exp $
    */
   package javax.xml.transform.dom;
   
  
  
  
  1.10      +5 -11     xml-xalan/java/src/javax/xml/transform/dom/DOMSource.java
  
  Index: DOMSource.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/dom/DOMSource.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DOMSource.java	2000/12/20 04:55:24	1.9
  +++ DOMSource.java	2001/10/10 18:08:29	1.10
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: DOMSource.java,v 1.9 2000/12/20 04:55:24 sboag Exp $
    */
   package javax.xml.transform.dom;
   
  
  
  
  1.10      +36 -36    xml-xalan/java/src/javax/xml/transform/dom/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/dom/package.html,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- package.html	2001/04/26 18:56:30	1.9
  +++ package.html	2001/10/10 18:08:29	1.10
  @@ -1,36 +1,36 @@
  -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  -<html>
  -<head>
  -<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  -<title>javax.xml.transform.dom</title>
  -</head>
  -<body>
  -<p>This package implements DOM-specific transformation APIs.</p>
  -<p>The {@link javax.xml.transform.dom.DOMSource} class allows the
  -client of the implementation of this API to specify a DOM
  -{@link org.w3c.dom.Node} as the source of the input tree. The model of
  -how the Transformer deals with the DOM tree in terms of mismatches with the
  -<A href="http://www.w3.org/TR/xslt#data-model">XSLT data model</A> or
  -other data models is beyond the scope of this document. Any of the nodes
  -derived from {@link org.w3c.dom.Node} are legal input.</p>
  -<p>The {@link javax.xml.transform.dom.DOMResult} class allows a
  -{@link org.w3c.dom.Node} to be specified to which result DOM nodes will
  -be appended. If an output node is not specified, the transformer will use 
  -{@link javax.xml.parsers.DocumentBuilder#newDocument} to create an
  -output {@link org.w3c.dom.Document} node. If a node is specified, it
  -should be one of the following: {@link org.w3c.dom.Document}, 
  -{@link org.w3c.dom.Element}, or 
  -{@link org.w3c.dom.DocumentFragment}. Specification of any other node
  -type is implementation dependent and undefined by this API. If the result is a 
  -{@link org.w3c.dom.Document}, the output of the transformation must have
  -a single element root to set as the document element.</p>
  -<p>The {@link javax.xml.transform.dom.DOMLocator} node may be passed
  -to {@link javax.xml.transform.TransformerException} objects, and
  -retrieved by trying to cast the result of
  -the {@link javax.xml.transform.TransformerException#getLocator()} method.
  -The implementation has no responsibility to use a DOMLocator instead of
  -a {@link javax.xml.transform.SourceLocator} (though line numbers and the
  -like do not make much sense for a DOM), so the result of getLocator must always
  -be tested with an instanceof. </p>
  -</body>
  -</html>
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  +<html>
  +<head>
  +<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  +<title>javax.xml.transform.dom</title>
  +</head>
  +<body>
  +<p>This package implements DOM-specific transformation APIs.</p>
  +<p>The {@link javax.xml.transform.dom.DOMSource} class allows the
  +client of the implementation of this API to specify a DOM
  +{@link org.w3c.dom.Node} as the source of the input tree. The model of
  +how the Transformer deals with the DOM tree in terms of mismatches with the
  +<A href="http://www.w3.org/TR/xslt#data-model">XSLT data model</A> or
  +other data models is beyond the scope of this document. Any of the nodes
  +derived from {@link org.w3c.dom.Node} are legal input.</p>
  +<p>The {@link javax.xml.transform.dom.DOMResult} class allows
  +a {@link org.w3c.dom.Node} to be specified to which result DOM nodes will
  +be appended. If an output node is not specified, the transformer will use
  +{@link javax.xml.parsers.DocumentBuilder#newDocument} to create an
  +output {@link org.w3c.dom.Document} node. If a node is specified, it
  +should be one of the following: {@link org.w3c.dom.Document},
  +{@link org.w3c.dom.Element}, or
  +{@link org.w3c.dom.DocumentFragment}. Specification of any other node
  +type is implementation dependent and undefined by this API. If the result is a
  +{@link org.w3c.dom.Document}, the output of the transformation must have
  +a single element root to set as the document element.</p>
  +<p>The {@link javax.xml.transform.dom.DOMLocator} node may be passed
  +to {@link javax.xml.transform.TransformerException} objects, and
  +retrieved by trying to cast the result of the
  +{@link javax.xml.transform.TransformerException#getLocator()} method.
  +The implementation has no responsibility to use a DOMLocator instead of a
  +{@link javax.xml.transform.SourceLocator} (though line numbers and the
  +like do not make much sense for a DOM), so the result of getLocator must always
  +be tested with an instanceof. </p>
  +</body>
  +</html>
  
  
  
  1.10      +17 -21    xml-xalan/java/src/javax/xml/transform/sax/SAXResult.java
  
  Index: SAXResult.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/SAXResult.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SAXResult.java	2001/01/05 18:27:17	1.9
  +++ SAXResult.java	2001/10/10 18:08:29	1.10
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,15 +47,10 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: SAXResult.java,v 1.9 2001/01/05 18:27:17 sboag Exp $
  - */
   package javax.xml.transform.sax;
   
   import javax.xml.transform.*;
  @@ -76,7 +70,8 @@
    */
   public class SAXResult implements Result {
   
  -    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +    /**
  +     * If {@link javax.xml.transform.TransformerFactory#getFeature}
        * returns true when passed this value as an argument,
        * the Transformer supports Result output of this type.
        */
  @@ -89,7 +84,7 @@
       public SAXResult() {}
   
       /**
  -     * Create a SAXResult that targets a SAX2 ContentHandler.
  +     * Create a SAXResult that targets a SAX2 {@link org.xml.sax.ContentHandler}.
        *
        * @param handler Must be a non-null ContentHandler reference.
        */
  @@ -98,7 +93,7 @@
       }
   
       /**
  -     * Set the target to be a SAX2 ContentHandler.
  +     * Set the target to be a SAX2 {@link org.xml.sax.ContentHandler}.
        *
        * @param handler Must be a non-null ContentHandler reference.
        */
  @@ -107,7 +102,7 @@
       }
   
       /**
  -     * Get the ContentHandler that is the Result.
  +     * Get the {@link org.xml.sax.ContentHandler} that is the Result.
        *
        * @return The ContentHandler that is to be transformation output.
        */
  @@ -116,13 +111,14 @@
       }
   
       /**
  -     * Set the SAX2 LexicalHandler for the output.
  +     * Set the SAX2 {@link org.xml.sax.ext.LexicalHandler} for the output.
        *
        * <p>This is needed to handle XML comments and the like.  If the
        * lexical handler is not set, an attempt should be made by the
  -     * transformer to cast the ContentHandler to a LexicalHandler.</p>
  +     * transformer to cast the {@link org.xml.sax.ContentHandler} to a
  +     * <code>LexicalHandler</code>.</p>
        *
  -     * @param handler A non-null LexicalHandler for
  +     * @param handler A non-null <code>LexicalHandler</code> for
        * handling lexical parse events.
        */
       public void setLexicalHandler(LexicalHandler handler) {
  @@ -130,9 +126,9 @@
       }
   
       /**
  -     * Get a SAX2 LexicalHandler for the output.
  +     * Get a SAX2 {@link org.xml.sax.ext.LexicalHandler} for the output.
        *
  -     * @return A LexicalHandler, or null.
  +     * @return A <code>LexicalHandler</code>, or null.
        */
       public LexicalHandler getLexicalHandler() {
           return lexhandler;
  @@ -140,7 +136,7 @@
   
       /**
        * Method setSystemId Set the systemID that may be used in association
  -     * with the ContentHandler.
  +     * with the {@link org.xml.sax.ContentHandler}.
        *
        * @param systemId The system identifier as a URI string.
        */
  
  
  
  1.9       +19 -20    xml-xalan/java/src/javax/xml/transform/sax/SAXSource.java
  
  Index: SAXSource.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/SAXSource.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SAXSource.java	2000/12/20 04:55:25	1.8
  +++ SAXSource.java	2001/10/10 18:08:29	1.9
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,15 +47,10 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: SAXSource.java,v 1.8 2000/12/20 04:55:25 sboag Exp $
  - */
   package javax.xml.transform.sax;
   
   import javax.xml.transform.Source;
  @@ -78,7 +72,8 @@
    */
   public class SAXSource implements Source {
   
  -    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +    /**
  +     * If {@link javax.xml.transform.TransformerFactory#getFeature}
        * returns true when passed this value as an argument,
        * the Transformer supports Source input of this type.
        */
  @@ -87,15 +82,17 @@
   
       /**
        * Zero-argument default constructor.  If this constructor
  -     * is used, and no other method is called, the Transformer
  +     * is used, and no other method is called, the
  +     * {@link javax.xml.transform.Transformer}
        * assumes an empty input tree, with a default root node.
        */
       public SAXSource() {}
   
       /**
  -     * Create a SAXSource, using an XMLReader and a SAX InputSource.
  -     * The Transformer or SAXTransformerFactory will set itself
  -     * to be the reader's ContentHandler, and then will call
  +     * Create a <code>SAXSource</code>, using an {@link org.xml.sax.XMLReader}
  +     * and a SAX InputSource. The {@link javax.xml.transform.Transformer}
  +     * or {@link javax.xml.transform.sax.SAXTransformerFactory} will set itself
  +     * to be the reader's {@link org.xml.sax.ContentHandler}, and then will call
        * reader.parse(inputSource).
        *
        * @param reader An XMLReader to be used for the parse.
  @@ -108,11 +105,12 @@
       }
   
       /**
  -     * Create a SAXSource, using a SAX InputSource.
  -     * The Transformer or SAXTransformerFactory creates a
  -     * reader via org.xml.sax.helpers.XMLReaderFactory
  +     * Create a <code>SAXSource</code>, using a SAX <code>InputSource</code>.
  +     * The {@link javax.xml.transform.Transformer} or
  +     * {@link javax.xml.transform.sax.SAXTransformerFactory} creates a
  +     * reader via {@link org.xml.sax.helpers.XMLReaderFactory}
        * (if setXMLReader is not used), sets itself as
  -     * the reader's ContentHandler, and calls
  +     * the reader's {@link org.xml.sax.ContentHandler}, and calls
        * reader.parse(inputSource).
        *
        * @param inputSource An input source reference that must be non-null
  @@ -226,3 +224,4 @@
           }
       }
   }
  +
  
  
  
  1.9       +5 -11     xml-xalan/java/src/javax/xml/transform/sax/SAXTransformerFactory.java
  
  Index: SAXTransformerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/SAXTransformerFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SAXTransformerFactory.java	2000/12/20 04:55:26	1.8
  +++ SAXTransformerFactory.java	2001/10/10 18:08:29	1.9
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: SAXTransformerFactory.java,v 1.8 2000/12/20 04:55:26 sboag Exp $
    */
   package javax.xml.transform.sax;
   
  
  
  
  1.9       +5 -12     xml-xalan/java/src/javax/xml/transform/sax/TemplatesHandler.java
  
  Index: TemplatesHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/TemplatesHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TemplatesHandler.java	2000/12/20 04:55:28	1.8
  +++ TemplatesHandler.java	2001/10/10 18:08:29	1.9
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,15 +47,10 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: TemplatesHandler.java,v 1.8 2000/12/20 04:55:28 sboag Exp $
  - */
   package javax.xml.transform.sax;
   
   import javax.xml.transform.*;
  @@ -82,7 +76,6 @@
        * the SAX event process, or null if no Templates object has
        * been created.
        *
  -     * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
        */
       public Templates getTemplates();
   
  
  
  
  1.9       +5 -11     xml-xalan/java/src/javax/xml/transform/sax/TransformerHandler.java
  
  Index: TransformerHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/TransformerHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TransformerHandler.java	2000/12/20 04:55:29	1.8
  +++ TransformerHandler.java	2001/10/10 18:08:29	1.9
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,14 +47,9 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */
  -/**
  - * $Id: TransformerHandler.java,v 1.8 2000/12/20 04:55:29 sboag Exp $
    */
   package javax.xml.transform.sax;
   
  
  
  
  1.10      +69 -67    xml-xalan/java/src/javax/xml/transform/sax/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/package.html,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- package.html	2001/04/26 18:56:30	1.9
  +++ package.html	2001/10/10 18:08:29	1.10
  @@ -1,67 +1,69 @@
  -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  -<html>
  -<head>
  -<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  -<title>javax.xml.transform.sax</title>
  -</head>
  -<body>
  -<p>This package implements SAX2-specific transformation APIs. It provides
  -  classes which allow input from {@link org.xml.sax.ContentHandler}
  -  events, and also classes that produce org.xml.sax.ContentHandler events. It
  -  also provides methods to set the input source as an
  -  {@link org.xml.sax.XMLReader}, or to use a
  -  {@link org.xml.sax.InputSource} as the source. It also allows the
  -  creation of a {@link org.xml.sax.XMLFilter}, which enables
  -  transformations to "pull" from other transformations, and lets the transformer
  -  to be used polymorphically as an {@link org.xml.sax.XMLReader}.</p>
  -<p>The {@link javax.xml.transform.sax.SAXSource} class allows the
  -  setting of an {@link org.xml.sax.XMLReader} to be used for "pulling"
  -  parse events, and an {@link org.xml.sax.InputSource} that may be used to
  -  specify the SAX source.</p>
  -<p>The {@link javax.xml.transform.sax.SAXResult} class allows the
  -  setting of a {@link org.xml.sax.ContentHandler} to be the receiver of
  -  SAX2 events from the transformation.</p>
  -<p>The {@link javax.xml.transform.sax.SAXTransformerFactory} extends
  -  {@link javax.xml.transform.TransformerFactory} to provide factory
  -  methods for creating {@link javax.xml.transform.sax.TemplatesHandler},
  -  {@link javax.xml.transform.sax.TransformerHandler}, and
  -  {@link org.xml.sax.XMLReader} instances.</p>
  -<p>To obtain a {@link javax.xml.transform.sax.SAXTransformerFactory},
  -  the caller must cast the {@link javax.xml.transform.TransformerFactory}
  -  instance returned from
  -  {@link javax.xml.transform.TransformerFactory#newInstance}.</p>
  -<p>The {@link javax.xml.transform.sax.TransformerHandler} interface
  -  allows a transformation to be created from SAX2 parse events, which is a "push"
  -  model rather than the "pull" model that normally occurs for a transformation.
  -  Normal parse events are received through the
  -  {@link org.xml.sax.ContentHandler} interface, lexical events such as
  -  startCDATA and endCDATA are received through the
  -  {@link org.xml.sax.ext.LexicalHandler} interface, and events that signal
  -  the start or end of disabling output escaping are received via
  -  {@link org.xml.sax.ContentHandler#processingInstruction}, with the
  -  target parameter being
  -  {@link javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING} and
  -  {@link javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING}. If
  -  parameters, output properties, or other features need to be set on the
  -  Transformer handler, a {@link javax.xml.transform.Transformer} reference
  -  will need to be obtained from
  -  {@link javax.xml.transform.sax.TransformerHandler#getTransformer}, and
  -  the methods invoked from that reference.</p>
  -<p>The {@link javax.xml.transform.sax.TemplatesHandler} interface
  -  allows the creation of {@link javax.xml.transform.Templates} objects
  -  from SAX2 parse events. Once the {@link org.xml.sax.ContentHandler}
  -  events are complete, the Templates object may be obtained from
  -  {@link javax.xml.transform.sax.TemplatesHandler#getTemplates}. Note that 
  -  {@link javax.xml.transform.sax.TemplatesHandler#setSystemId} should
  -  normally be called in order to establish a base system ID from which relative
  -  URLs may be resolved.</p>
  -<p>The
  -  {@link javax.xml.transform.sax.SAXTransformerFactory#newXMLFilter}
  -  method allows the creation of a {@link org.xml.sax.XMLFilter}, which
  -  encapsulates the SAX2 notion of a "pull" transformation. The following
  -  illustrates several transformations chained together. Each filter points to a
  -  parent {@link org.xml.sax.XMLReader}, and the final transformation is
  -  caused by invoking {@link org.xml.sax.XMLReader#parse} on the final
  -  reader in the chain.</p>
  -</body>
  -</html>
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  +<html>
  +<head>
  +<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  +<title>javax.xml.transform.sax</title>
  +</head>
  +<body>
  +<p>This package implements SAX2-specific transformation APIs. It provides
  +  classes which allow input from {@link org.xml.sax.ContentHandler}
  +  events, and also classes that produce org.xml.sax.ContentHandler events. It
  +  also provides methods to set the input source as an
  +  {@link org.xml.sax.XMLReader}, or to use a
  +  {@link org.xml.sax.InputSource} as the source. It also allows the
  +  creation of a {@link org.xml.sax.XMLFilter}, which enables
  +  transformations to "pull" from other transformations, and lets the transformer
  +  to be used polymorphically as an {@link org.xml.sax.XMLReader}.</p>
  +<p>The {@link javax.xml.transform.sax.SAXSource} class allows the
  +  setting of an {@link org.xml.sax.XMLReader} to be used for "pulling"
  +  parse events, and an {@link org.xml.sax.InputSource} that may be used to
  +  specify the SAX source.</p>
  +<p>The {@link javax.xml.transform.sax.SAXResult} class allows the
  +  setting of a {@link org.xml.sax.ContentHandler} to be the receiver of
  +  SAX2 events from the transformation. 
  +<p>The {@link javax.xml.transform.sax.SAXTransformerFactory} extends
  +  {@link javax.xml.transform.TransformerFactory} to provide factory
  +  methods for creating {@link javax.xml.transform.sax.TemplatesHandler},
  +  {@link javax.xml.transform.sax.TransformerHandler}, and
  +  {@link org.xml.sax.XMLReader} instances.</p>
  +<p>To obtain a {@link javax.xml.transform.sax.SAXTransformerFactory},
  +  the caller must cast the {@link javax.xml.transform.TransformerFactory}
  +  instance returned from
  +  {@link javax.xml.transform.TransformerFactory#newInstance}. 
  +
  +<p>The {@link javax.xml.transform.sax.TransformerHandler} interface
  +  allows a transformation to be created from SAX2 parse events, which is a "push"
  +  model rather than the "pull" model that normally occurs for a transformation.
  +  Normal parse events are received through the
  +  {@link org.xml.sax.ContentHandler} interface, lexical events such as
  +  startCDATA and endCDATA are received through the
  +  {@link org.xml.sax.ext.LexicalHandler} interface, and events that signal
  +  the start or end of disabling output escaping are received via
  +  {@link org.xml.sax.ContentHandler#processingInstruction}, with the
  +  target parameter being
  +  {@link javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING} and
  +  {@link javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING}. If
  +  parameters, output properties, or other features need to be set on the
  +  Transformer handler, a {@link javax.xml.transform.Transformer} reference
  +  will need to be obtained from
  +  {@link javax.xml.transform.sax.TransformerHandler#getTransformer}, and
  +  the methods invoked from that reference. 
  +
  +<p>The {@link javax.xml.transform.sax.TemplatesHandler} interface
  +  allows the creation of {@link javax.xml.transform.Templates} objects
  +  from SAX2 parse events. Once the {@link org.xml.sax.ContentHandler}
  +  events are complete, the Templates object may be obtained from
  +  {@link javax.xml.transform.sax.TemplatesHandler#getTemplates}. Note that
  +  {@link javax.xml.transform.sax.TemplatesHandler#setSystemId} should
  +  normally be called in order to establish a base system ID from which relative
  +  URLs may be resolved. 
  +<p>The
  +  {@link javax.xml.transform.sax.SAXTransformerFactory#newXMLFilter}
  +  method allows the creation of a {@link org.xml.sax.XMLFilter}, which
  +  encapsulates the SAX2 notion of a "pull" transformation. The following
  +  illustrates several transformations chained together. Each filter points to a
  +  parent {@link org.xml.sax.XMLReader}, and the final transformation is
  +  caused by invoking {@link org.xml.sax.XMLReader#parse} on the final
  +  reader in the chain.</p>
  +</body>
  +</html>
  
  
  
  1.9       +8 -13     xml-xalan/java/src/javax/xml/transform/stream/StreamResult.java
  
  Index: StreamResult.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/stream/StreamResult.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StreamResult.java	2001/05/03 23:00:24	1.8
  +++ StreamResult.java	2001/10/10 18:08:29	1.9
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,15 +47,10 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: StreamResult.java,v 1.8 2001/05/03 23:00:24 costin Exp $
  - */
   package javax.xml.transform.stream;
   
   import javax.xml.transform.*;
  @@ -72,8 +66,6 @@
    * Acts as an holder for a transformation result,
    * which may be XML, plain Text, HTML, or some other form of markup.
    *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public class StreamResult implements Result {
   
  @@ -197,6 +189,9 @@
        */
       public void setSystemId(File f) {
           String fpath=f.getAbsolutePath();
  +	if (File.separatorChar != '/') {
  +	    fpath = fpath.replace(File.separatorChar, '/');
  +	}
           if( fpath.startsWith("/"))
   	  this.systemId= "file://" + fpath;
   	else
  
  
  
  1.9       +9 -14     xml-xalan/java/src/javax/xml/transform/stream/StreamSource.java
  
  Index: StreamSource.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/stream/StreamSource.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StreamSource.java	2001/05/03 23:00:25	1.8
  +++ StreamSource.java	2001/10/10 18:08:29	1.9
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -24,10 +24,9 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xalan" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  + * 4. The name "Apache Software Foundation" must not be used to endorse or
  + *    promote products derived from this software without prior written
  + *    permission. For written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
  @@ -48,15 +47,10 @@
    * ====================================================================
    *
    * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, Lotus
  - * Development Corporation., http://www.lotus.com.  For more
  + * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -/**
  - * $Id: StreamSource.java,v 1.8 2001/05/03 23:00:25 costin Exp $
  - */
   package javax.xml.transform.stream;
   
   import javax.xml.transform.Source;
  @@ -70,8 +64,6 @@
    * Acts as an holder for a transformation Source in the form
    * of a stream of XML markup.
    *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public class StreamSource implements Source {
   
  @@ -276,7 +268,10 @@
        * @param f Must a non-null File reference.
        */
       public void setSystemId(File f) {
  -        String fpath=f.getAbsolutePath();
  +	String fpath=f.getAbsolutePath();
  +	if (File.separatorChar != '/') {
  +	    fpath = fpath.replace(File.separatorChar, '/');
  +	}
           if( fpath.startsWith("/"))
   	  this.systemId= "file://" + fpath;
   	else
  
  
  
  1.10      +30 -30    xml-xalan/java/src/javax/xml/transform/stream/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/stream/package.html,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- package.html	2001/04/26 18:56:30	1.9
  +++ package.html	2001/10/10 18:08:29	1.10
  @@ -1,30 +1,30 @@
  -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  -<html>
  -<head>
  -<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  -<title>javax.xml.transform.stream</title>
  -</head>
  -<body>
  -<p>This package implements stream- and URI- specific transformation APIs.
  -	 </p>
  -<p>The {@link javax.xml.transform.stream.StreamSource} class
  -	 provides methods for specifying {@link java.io.InputStream} input,
  -	 {@link java.io.Reader} input, and URL input in the form of strings. Even
  -	 if an input stream or reader is specified as the source,
  -	 {@link javax.xml.transform.stream.StreamSource#setSystemId} should still
  -	 be called, so that the transformer can know from where it should resolve
  -	 relative URIs. The public identifier is always optional: if the application
  -	 writer includes one, it will be provided as part of the
  -	 {@link javax.xml.transform.SourceLocator} information.</p>
  -<p>The {@link javax.xml.transform.stream.StreamResult} class
  -	 provides methods for specifying {@link java.io.OutputStream},
  -	 {@link java.io.Writer}, or an output system ID, as the output of the
  -	 transformation result.</p>
  -<p>Normally streams should be used rather than readers or writers, for
  -	 both the Source and Result, since readers and writers already have the encoding
  -	 established to and from the internal Unicode format. However, there are times
  -	 when it is useful to write to a character stream, such as when using a
  -	 StringWriter in order to write to a String, or in the case of reading source
  -	 XML from a StringReader.</p>
  -</body>
  -</html>
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  +<html>
  +<head>
  +<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  +<title>javax.xml.transform.stream</title>
  +</head>
  +<body>
  +<p>This package implements stream- and URI- specific transformation APIs.
  +	 </p>
  +<p>The {@link javax.xml.transform.stream.StreamSource} class
  +	 provides methods for specifying {@link java.io.InputStream} input,
  +	 {@link java.io.Reader} input, and URL input in the form of strings. Even
  +	 if an input stream or reader is specified as the source,
  +	 {@link javax.xml.transform.stream.StreamSource#setSystemId} should still
  +	 be called, so that the transformer can know from where it should resolve
  +	 relative URIs. The public identifier is always optional: if the application
  +	 writer includes one, it will be provided as part of the
  +	 {@link javax.xml.transform.SourceLocator} information.</p>
  +<p>The {@link javax.xml.transform.stream.StreamResult} class
  +	 provides methods for specifying {@link java.io.OutputStream},
  +	 {@link java.io.Writer}, or an output system ID, as the output of the
  +	 transformation result.</p>
  +<p>Normally streams should be used rather than readers or writers, for
  +	 both the Source and Result, since readers and writers already have the encoding
  +	 established to and from the internal Unicode format. However, there are times
  +	 when it is useful to write to a character stream, such as when using a
  +	 StringWriter in order to write to a String, or in the case of reading source
  +	 XML from a StringReader.</p>
  +</body>
  +</html>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org