You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/12/20 05:55:35 UTC

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

sboag       00/12/19 20:55:33

  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
  Log:
  From Rajiv Mordani <Ra...@eng.sun.com>: 		 I have made some changes to the javadocs in the transform package
  and also added getDOMImplementation to the DocumentBuilderFactory (was
  discussed earlier in the expert group but forgot to include it).
  
  Revision  Changes    Path
  1.3       +45 -66    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DocumentBuilder.java	2000/11/16 03:15:40	1.2
  +++ DocumentBuilder.java	2000/12/20 04:55:17	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  + *    notice, this list of conditions and the following disclaimer. 
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,15 +18,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  + *    if any, must include the following acknowledgment:  
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xerces" and "Apache Software Foundation" must
  + * 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
  + *    software without prior written permission. For written 
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,67 +49,49 @@
    *
    * 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-2000, Pierpaolo
  - * Fumagalli <ma...@betaversion.org>, http://www.apache.org.
  - * For more information on the Apache Software Foundation, please see
  + * 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/>.
    */
  -
  +/**
  + * $Id: DocumentBuilder.java,v 1.3 2000/12/20 04:55:17 sboag Exp $
  + */
   package javax.xml.parsers;
   
  -import java.io.File;
   import java.io.InputStream;
   import java.io.IOException;
  -import org.xml.sax.EntityResolver;
  -import org.xml.sax.ErrorHandler;
  +import java.io.File;
  +
  +import org.xml.sax.Parser;
  +import org.xml.sax.HandlerBase;
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
  +
   import org.w3c.dom.Document;
  +import org.w3c.dom.DOMImplementation;
   
   /**
  - * Instances of <code>DocumentBuilder</code> provide a mechansim for
  - * parsing XML documents into a DOM document tree represented by an
  - * <code>org.w3c.dom.Document</code> object.
  - * <br>
  - * A <code>DocumentBuilder</code> instance is obtained from a
  - * <code>DocumentBuilderFactory</code> by invoking its
  - * <code>newDocumentBuilder()</code> method.
  - * <br>
  - * <b>NOTE:</b> <code>DocumentBuilder</code> uses several classes from the
  - *     SAX API. This does not require that the implementor of the
  - *     underlying DOM implementation use a SAX parser to parse XML content
  - *     into a <code>org.w3c.dom.Document</code>. It merely requires that
  - *     the implementation communicate with the application using these
  - *     existing APIs.
  - * <br>
  - * <br>
  - * <b>ATTENTION:</b> THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES
  - *   IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION
  - *   REQUEST 5 FOUND AT
  - *   <a href="http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html">
  - *   http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
  - *   </a><br>
  - *   THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING"
  - *   SPECIFICATION VERSION 1.1 PUBLIC REVIEW 1 BY JAMES DUNCAN DAVIDSON
  - *   PUBLISHED BY SUN MICROSYSTEMS ON NOV. 2, 2000 AND FOUND AT
  - *   <a href="http://java.sun.com/xml">http://java.sun.com/xml</a>
  - * <br>
  - * <br>
  - * <b>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 AUTHOR 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.
  - *
  - * @author <a href="pier@betaversion.org">Pierpaolo Fumagalli</a>
  - * @author Copyright &copy; 2000 The Apache Software Foundation.
  - * @version 1.0 CVS $Revision: 1.2 $ $Date: 2000/11/16 03:15:40 $
  + * 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>
  + *
  + * An instance of this class can be obtained from the
  + * <code>DocumentBuilderFactory.newDocumentBuilder</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>
  + *
  + * 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
  + * <code>Document</code>. It merely requires that the implementation
  + * communicate with the application using these existing APIs.
  + *
  + * @since JAXP 1.0
  + * @version 1.0
    */
  +
   public abstract class DocumentBuilder {
   
       protected DocumentBuilder () {
  @@ -157,7 +139,7 @@
           }
           
           InputSource in = new InputSource(is);
  -	in.setSystemId(systemId);
  +        in.setSystemId(systemId);
           return parse(in);
       }
   
  @@ -202,9 +184,9 @@
           }
           
           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);
       }
  @@ -246,10 +228,6 @@
        * behavior.
        */
   
  -    // XXX
  -    // Add that the underlying impl doesn't have to use SAX, but
  -    // must understand how to resolve entities from this object.
  -    
       public abstract void setEntityResolver(org.xml.sax.EntityResolver er);
   
       /**
  @@ -260,10 +238,6 @@
        * behavior.
        */
   
  -    // XXX
  -    // Add that the underlying impl doesn't have to use SAX, but
  -    // must understand how to handle errors using this object.
  -    
       public abstract void setErrorHandler(org.xml.sax.ErrorHandler eh);
   
       /**
  @@ -273,4 +247,9 @@
       
       public abstract Document newDocument();
   
  +    /**
  +     * Obtain an instance of a DOMImplementation object.
  +     */
  +
  +    public abstract DOMImplementation getDOMImplementation();
   }
  
  
  
  1.3       +153 -149  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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DocumentBuilderFactory.java	2000/11/16 03:15:40	1.2
  +++ DocumentBuilderFactory.java	2000/12/20 04:55:17	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  + *    notice, this list of conditions and the following disclaimer. 
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,15 +18,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  + *    if any, must include the following acknowledgment:  
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xerces" and "Apache Software Foundation" must
  + * 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
  + *    software without prior written permission. For written 
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,12 +49,13 @@
    *
    * 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-2000, Pierpaolo
  - * Fumagalli <ma...@betaversion.org>, http://www.apache.org.
  - * For more information on the Apache Software Foundation, please see
  + * 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/>.
    */
   
  +
   package javax.xml.parsers;
   
   import java.io.InputStream;
  @@ -67,38 +68,15 @@
   import java.io.InputStreamReader;
   
   /**
  - * The <code>DocumentBuilderFactory</code> defines a factory API that enables
  - * applications to configure and obtain a parser to parse XML documents into
  - * a DOM Document tree.
  - * <br>
  - * <br>
  - * <b>ATTENTION:</b> THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES
  - *   IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION
  - *   REQUEST 5 FOUND AT
  - *   <a href="http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html">
  - *   http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
  - *   </a><br>
  - *   THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING"
  - *   SPECIFICATION VERSION 1.1 PUBLIC REVIEW 1 BY JAMES DUNCAN DAVIDSON
  - *   PUBLISHED BY SUN MICROSYSTEMS ON NOV. 2, 2000 AND FOUND AT
  - *   <a href="http://java.sun.com/xml">http://java.sun.com/xml</a>
  - * <br>
  - * <br>
  - * <b>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 AUTHOR 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.
  + * Defines a factory API that enables applications to obtain a
  + * parser that produces DOM object trees from XML documents.
    *
  - * @author <a href="pier@betaversion.org">Pierpaolo Fumagalli</a>
  - * @author Copyright &copy; 2000 The Apache Software Foundation.
  - * @version 1.0 CVS $Revision: 1.2 $ $Date: 2000/11/16 03:15:40 $
  + * @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 =
  @@ -107,7 +85,7 @@
       private boolean validating = false;
       private boolean namespaceAware = false;
       private boolean whitespace = false;
  -    private boolean expandEntityRef = false;
  +    private boolean expandEntityRef = true;
       private boolean ignoreComments = false;
       private boolean coalescing = false;
       
  @@ -118,16 +96,33 @@
       /**
        * Obtain a new instance of a
        * <code>DocumentBuilderFactory</code>. 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>
  +     * a new factory instance.
  +     * This method uses the following ordered lookup procedure to determine
  +     * the <code>DocumentBuilderFactory</code> implementation class to
  +     * load:
  +     * <ul>
  +     * <li>
  +     * Use the <code>javax.xml.parsers.DocumentBuilderFactory</code> system
  +     * 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.
  +     * </li>
  +     * <li>
  +     * Use the Services API (as detailed in teh 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>
  +     * in jars available to the runtime.
  +     * </li>
  +     * <li>
  +     * Platform default <code>DocumentBuilderFactory</code> instance.
  +     * </li>
  +     * </ul>
        *
  -     * The system property that controls which Factory implementation
  -     * to create is named
  -     * &quot;javax.xml.parsers.DocumentBuilderFactory&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>
  -     *
        * Once an application has obtained a reference to a
        * <code>DocumentBuilderFactory</code> it can use the factory to
        * configure and obtain parser instances.
  @@ -137,9 +132,9 @@
        */    
       
       public static DocumentBuilderFactory newInstance() {
  -	String factoryImplName = findFactory(defaultPropName,
  -					     "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
  -	// the default can be removed after services are tested well enough
  +        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(
  @@ -151,12 +146,12 @@
               Class clazz = Class.forName(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);
  -	}
  +            throw new FactoryConfigurationError(cnfe);
  +        } catch (IllegalAccessException iae) {
  +            throw new FactoryConfigurationError(iae);
  +        } catch (InstantiationException ie) {
  +            throw new FactoryConfigurationError(ie);
  +        }
           return factoryImpl;
       }
       
  @@ -174,7 +169,8 @@
       
       /**
        * Specifies that the parser produced by this code will
  -     * provide support for XML namespaces.
  +     * provide support for XML namespaces. By default the value of this is set 
  +     * to <code>false</code>
        */
       
       public void setNamespaceAware(boolean awareness) {
  @@ -183,7 +179,8 @@
   
       /**
        * Specifies that the parser produced by this code will
  -     * validate documents as they are parsed.
  +     * validate documents as they are parsed. By default the value of this
  +     * is set to <code>false</code>
        */
       
       public void setValidating(boolean validating) {
  @@ -191,18 +188,24 @@
       }
   
       /**
  -     * Specifies that the parser produced by this code will
  -     * ignore "ignorable whitespace" ONLY when the document is validated as 
  -     * they are parsed.
  +     * Specifies that the parsers created by this  factory must eliminate
  +     * 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>
        */
  -    
  -    public void setIgnoreElementContentWhitespace(boolean whitespace) {
  +
  +    public void setIgnoringElementContentWhitespace(boolean whitespace) {
           this.whitespace = whitespace;
       }
   
       /**
        * Specifies that the parser produced by this code will
  -     * expand entity reference nodes.
  +     * expand entity reference nodes. By default the value of this is set to 
  +     * <code>true</code>
        */
       
       public void setExpandEntityReferences(boolean expandEntityRef) {
  @@ -211,7 +214,8 @@
   
       /**
        * Specifies that the parser produced by this code will
  -     * ignore comments.
  +     * ignore comments. By default the value of this is set to <code>false
  +     * </code>
        */
       
       public void setIgnoringComments(boolean ignoreComments) {
  @@ -221,7 +225,8 @@
       /**
        * 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.
  +     * adjacent (if any) text node. By default the value of this is set to 
  +     * <code>false</code>
        */
       
       public void setCoalescing(boolean coalescing) {
  @@ -248,11 +253,10 @@
   
       /**
        * Indicates whether or not the factory is configured to produce
  -     * parsers which ignore "ignorable whitespace" when validated in the XML 
  -     * content during parse.
  +     * parsers which ignore ignorable whitespace in element content.
        */
       
  -    public boolean isIgnoreElementContentWhitespace() {
  +    public boolean isIgnoringElementContentWhitespace() {
           return whitespace;
       }
   
  @@ -293,7 +297,7 @@
        * implementation doesn't recognize the attribute.
        */
       public abstract void setAttribute(String name, Object value) 
  -    			throws IllegalArgumentException;
  +                        throws IllegalArgumentException;
   
       /**
        * Allows the user to retrieve specific attributes on the underlying 
  @@ -304,103 +308,103 @@
        * implementation doesn't recognize the attribute.
        */
       public abstract Object getAttribute(String name)
  -    			throws IllegalArgumentException;
  +                        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 )
  +        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 final boolean debug=
  -	System.getProperty( "jaxp.debug" ) != null;
  +        System.getProperty( "jaxp.debug" ) != null;
   
       /** 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
  +        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)
  +                                      String defaultFactory)
       {
  -	// Use the system property first
  -	try {
  -	    String systemProp =
  +        // 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();
  -	}
  +            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;
  +        return defaultFactory;
       }
   
   }
  
  
  
  1.3       +24 -46    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FactoryConfigurationError.java	2000/11/16 03:15:40	1.2
  +++ FactoryConfigurationError.java	2000/12/20 04:55:17	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  + *    notice, this list of conditions and the following disclaimer. 
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,15 +18,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  + *    if any, must include the following acknowledgment:  
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xerces" and "Apache Software Foundation" must
  + * 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
  + *    software without prior written permission. For written 
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,53 +49,25 @@
    *
    * 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-2000, Pierpaolo
  - * Fumagalli <ma...@betaversion.org>, http://www.apache.org.
  - * For more information on the Apache Software Foundation, please see
  + * 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/>.
    */
   
  +
   package javax.xml.parsers;
   
   /**
  - * This error is thrown if there is a configuration problem when creating
  - * new factory instances.
  - * <br>
  - * This error will also be thrown when the class of a Factory specified by
  - * a system property, or the class of the default system parser factory,
  - * cannot be loaded or instantiated.
  - * <br>
  - * Implementation or Application developers should never need to directly
  - * construct or catch errors of this type.
  - * <br>
  - * <br>
  - * <b>ATTENTION:</b> THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES
  - *   IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION
  - *   REQUEST 5 FOUND AT
  - *   <a href="http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html">
  - *   http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
  - *   </a><br>
  - *   THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING"
  - *   SPECIFICATION VERSION 1.1 PUBLIC REVIEW 1 BY JAMES DUNCAN DAVIDSON
  - *   PUBLISHED BY SUN MICROSYSTEMS ON NOV. 2, 2000 AND FOUND AT
  - *   <a href="http://java.sun.com/xml">http://java.sun.com/xml</a>
  - * <br>
  - * <br>
  - * <b>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 AUTHOR 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.
  - *
  - * @author <a href="pier@betaversion.org">Pierpaolo Fumagalli</a>
  - * @author Copyright &copy; 2000 The Apache Software Foundation.
  - * @version 1.0 CVS $Revision: 1.2 $ $Date: 2000/11/16 03:15:40 $
  + * Thrown when a problem with configuration with the Parser Factories
  + * exists. This error will typically be thrown when the class of a
  + * parser factory specified in the system properties cannot be found
  + * or instantiated.
  + *
  + * @since JAXP 1.0
  + * @version 1.0
    */
  +
   public class FactoryConfigurationError extends Error {
   
       private Exception exception;
  @@ -107,7 +79,7 @@
   
        public FactoryConfigurationError() {
            super();
  -    	 this.exception = null; 
  +         this.exception = null; 
        }
   
       /**
  @@ -181,4 +153,10 @@
           return exception;
       }
   }
  +
  +
  +
  +
  +
  +
   
  
  
  
  1.3       +24 -50    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParserConfigurationException.java	2000/11/16 03:15:40	1.2
  +++ ParserConfigurationException.java	2000/12/20 04:55:18	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  + *    notice, this list of conditions and the following disclaimer. 
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,15 +18,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  + *    if any, must include the following acknowledgment:  
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xerces" and "Apache Software Foundation" must
  + * 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
  + *    software without prior written permission. For written 
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,69 +49,43 @@
    *
    * 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-2000, Pierpaolo
  - * Fumagalli <ma...@betaversion.org>, http://www.apache.org.
  - * For more information on the Apache Software Foundation, please see
  + * 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/>.
    */
   
  +
   package javax.xml.parsers;
   
   /**
  - * This exception is thrown if a factory cannot configure a parser given its
  - * current configuration parameters.
  - * <br>
  - * For example, if a parser factory cannot create parsers that validate,
  - * but have been configured to do so, it will throw this exception when a
  - * parser is requested to via the parser creation methods.
  - * <br>
  - * Application developers are not expected to construct instances of this
  - * exception type, but must catch them in code that obtains parser instances
  - * from a factory.
  - * <br>
  - * <br>
  - * <b>ATTENTION:</b> THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES
  - *   IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION
  - *   REQUEST 5 FOUND AT
  - *   <a href="http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html">
  - *   http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
  - *   </a><br>
  - *   THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING"
  - *   SPECIFICATION VERSION 1.1 PUBLIC REVIEW 1 BY JAMES DUNCAN DAVIDSON
  - *   PUBLISHED BY SUN MICROSYSTEMS ON NOV. 2, 2000 AND FOUND AT
  - *   <a href="http://java.sun.com/xml">http://java.sun.com/xml</a>
  - * <br>
  - * <br>
  - * <b>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 AUTHOR 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.
  - *
  - * @author <a href="pier@betaversion.org">Pierpaolo Fumagalli</a>
  - * @author Copyright &copy; 2000 The Apache Software Foundation.
  - * @version 1.0 CVS $Revision: 1.2 $ $Date: 2000/11/16 03:15:40 $
  + * Indicates a serious configuration error.
  + *
  + * @since JAXP 1.0
  + * @version 1.0
    */
  +
   public class ParserConfigurationException extends Exception {
   
       /**
  -     * Constructs a new <code>ParserConfigurationException</code> with no
  -     * detail message.
  +     * Create a new <code>ParserConfigurationException</code> with no
  +     * detail mesage.
        */
  +
       public ParserConfigurationException() {
           super();
       }
   
       /**
  -     * Constructs a new <code>ParserConfigurationException</code> with the
  -     * given detail message.
  +     * Create a new <code>ParserConfigurationException</code> with
  +     * the <code>String </code> specified as an error message.
  +     *
  +     * @param msg The error message for the exception.
        */
  +    
       public ParserConfigurationException(String msg) {
           super(msg);
       }
  +
   }
  +
  
  
  
  1.3       +74 -67    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SAXParser.java	2000/11/16 03:15:40	1.2
  +++ SAXParser.java	2000/12/20 04:55:18	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  + *    notice, this list of conditions and the following disclaimer. 
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,15 +18,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  + *    if any, must include the following acknowledgment:  
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xerces" and "Apache Software Foundation" must
  + * 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
  + *    software without prior written permission. For written 
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,22 +49,19 @@
    *
    * 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-2000, Pierpaolo
  - * Fumagalli <ma...@betaversion.org>, http://www.apache.org.
  - * For more information on the Apache Software Foundation, please see
  + * 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/>.
    */
   
  +
  +
   package javax.xml.parsers;
   
  -import java.io.File;
   import java.io.InputStream;
   import java.io.IOException;
  -import java.io.FileInputStream;
  -import java.util.Locale;
  -import java.util.Properties;
  -import java.io.BufferedReader;
  -import java.io.InputStreamReader;
  +import java.io.File;
   
   import org.xml.sax.Parser;
   import org.xml.sax.XMLReader;
  @@ -75,43 +72,41 @@
   import org.xml.sax.SAXNotRecognizedException;
   import org.xml.sax.SAXNotSupportedException;
   
  +
   /**
  - * Implementation instances of the <code>SAXParser</code> abstract class
  - * contain an implementation of the <code>org.xml.sax.Parser</code> interface
  - * and enables content from a variety of sources to be parsed using the
  - * contained parser.
  - * <br>
  - * Instances of <code>SAXParser</code> are obtained from a
  - * <code>SAXParserFactory</code> by invoking its <code>newSAXParser()</code>
  - * method.
  - * <br>
  - * <br>
  - * <b>ATTENTION:</b> THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES
  - *   IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION
  - *   REQUEST 5 FOUND AT
  - *   <a href="http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html">
  - *   http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
  - *   </a><br>
  - *   THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING"
  - *   SPECIFICATION VERSION 1.1 PUBLIC REVIEW 1 BY JAMES DUNCAN DAVIDSON
  - *   PUBLISHED BY SUN MICROSYSTEMS ON NOV. 2, 2000 AND FOUND AT
  - *   <a href="http://java.sun.com/xml">http://java.sun.com/xml</a>
  - * <br>
  - * <br>
  - * <b>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 AUTHOR 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.
  - *
  - * @author <a href="pier@betaversion.org">Pierpaolo Fumagalli</a>
  - * @author Copyright &copy; 2000 The Apache Software Foundation.
  - * @version 1.0 CVS $Revision: 1.2 $ $Date: 2000/11/16 03:15:40 $
  + * 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
  + * 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>
  + *
  + * As the content is parsed by the underlying parser, methods of the
  + * given <code>HandlerBase</code> or the <code>DefaultHandler</code> are 
  + * called.<p>
  + *
  + * Implementors of this class which wrap an underlaying implementation
  + * can consider using the <code>org.xml.sax.helpers.ParserAdapter</code>
  + * class to initially adapt their SAX1 impelemntation to work under
  + * this revised class.
  + *
  + * @since JAXP 1.0
  + * @version 1.0
    */
   
   public abstract class SAXParser {
  @@ -123,7 +118,9 @@
       /**
        * Parse the content of the given <code>java.io.InputStream</code>
        * instance as XML using the specified
  -     * <code>org.xml.sax.HandlerBase</code>.
  +     * <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>
        *
        * @param is InputStream containing the content to be parsed.
        * @param hb The SAX HandlerBase to use.
  @@ -147,6 +144,8 @@
        * 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 
  +     * 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.
  @@ -165,7 +164,7 @@
           }
           
           InputSource input = new InputSource(is);
  -	input.setSystemId(systemId);
  +        input.setSystemId(systemId);
           this.parse(input, hb);
       }
      
  @@ -175,7 +174,7 @@
        * <code>org.xml.sax.helpers.DefaultHandler</code>.
        *
        * @param is InputStream containing the content to be parsed.
  -     * @param hb The SAX HandlerBase to use.
  +     * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the given InputStream is null.
        * @see org.xml.sax.DocumentHandler
  @@ -198,7 +197,7 @@
        * <code>org.xml.sax.helpers.DefaultHandler</code>.
        *
        * @param is InputStream containing the content to be parsed.
  -     * @param hb The SAX HandlerBase to use.
  +     * @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.
  @@ -214,7 +213,7 @@
           }
           
           InputSource input = new InputSource(is);
  -	input.setSystemId(systemId);
  +        input.setSystemId(systemId);
           this.parse(input, dh);
       } 
   
  @@ -222,6 +221,8 @@
        * 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>
        *
        * @param uri The location of the content to be parsed.
        * @param hb The SAX HandlerBase to use.
  @@ -247,7 +248,7 @@
        * <code>org.xml.sax.helpers.DefaultHandler</code>.
        *
        * @param uri The location of the content to be parsed.
  -     * @param hb The SAX HandlerBase to use.
  +     * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the uri is null.
        * @see org.xml.sax.DocumentHandler
  @@ -267,6 +268,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 
  +     * the HandlerBase class has been deprecated in SAX 2.0</i>
        *
        * @param f The file containing the XML to parse
        * @param hb The SAX HandlerBase to use.
  @@ -283,9 +286,9 @@
           }
           
           String uri = "file:" + f.getAbsolutePath();
  -	if (File.separatorChar == '\\') {
  -	    uri = uri.replace('\\', '/');
  -	}
  +        if (File.separatorChar == '\\') {
  +            uri = uri.replace('\\', '/');
  +        }
           InputSource input = new InputSource(uri);
           this.parse(input, hb);
       }
  @@ -295,7 +298,7 @@
        * specified <code>org.xml.sax.helpers.DefaultHandler</code>.
        *
        * @param f The file containing the XML to parse
  -     * @param dh The SAX Handler to use.
  +     * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the File object is null.
        * @see org.xml.sax.DocumentHandler
  @@ -309,9 +312,9 @@
           }
           
           String uri = "file:" + f.getAbsolutePath();
  -	if (File.separatorChar == '\\') {
  -	    uri = uri.replace('\\', '/');
  -	}
  +        if (File.separatorChar == '\\') {
  +            uri = uri.replace('\\', '/');
  +        }
           InputSource input = new InputSource(uri);
           this.parse(input, dh);
       }
  @@ -320,6 +323,8 @@
        * Parse the content given <code>org.xml.sax.InputSource</code>
        * 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>
        *
        * @param is The InputSource containing the content to be parsed.
        * @param hb The SAX HandlerBase to use.
  @@ -336,12 +341,12 @@
           }
           
           Parser parser = this.getParser();
  -	if (hb != null) {
  +        if (hb != null) {
               parser.setDocumentHandler(hb);
               parser.setEntityResolver(hb);
               parser.setErrorHandler(hb);
               parser.setDTDHandler(hb);
  -	}
  +        }
           parser.parse(is);
       }
       
  @@ -365,12 +370,12 @@
           }
           
           XMLReader reader = this.getXMLReader();
  -	if (dh != null) {
  +        if (dh != null) {
               reader.setContentHandler(dh);
               reader.setEntityResolver(dh);
               reader.setErrorHandler(dh);
               reader.setDTDHandler(dh);
  -	}
  +        }
           reader.parse(is);
       }
       
  @@ -405,6 +410,8 @@
       /**
        * 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 
  +     * <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.
  
  
  
  1.4       +136 -140  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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SAXParserFactory.java	2000/11/16 03:15:40	1.3
  +++ SAXParserFactory.java	2000/12/20 04:55:18	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  + *    notice, this list of conditions and the following disclaimer. 
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,15 +18,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  + *    if any, must include the following acknowledgment:  
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Xerces" and "Apache Software Foundation" must
  + * 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
  + *    software without prior written permission. For written 
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,12 +49,13 @@
    *
    * 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-2000, Pierpaolo
  - * Fumagalli <ma...@betaversion.org>, http://www.apache.org.
  - * For more information on the Apache Software Foundation, please see
  + * 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/>.
    */
   
  +
   package javax.xml.parsers;
   
   import org.xml.sax.Parser;
  @@ -73,37 +74,13 @@
   import java.io.InputStreamReader;
   
   /**
  - * The <code>SAXParserFactory</code> defines a factory API that enables
  - * applications to configure and obtain a SAX based parser to parse XML
  - * documents.
  - * <br>
  - * <br>
  - * <b>ATTENTION:</b> THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES
  - *   IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION
  - *   REQUEST 5 FOUND AT
  - *   <a href="http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html">
  - *   http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
  - *   </a><br>
  - *   THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING"
  - *   SPECIFICATION VERSION 1.1 PUBLIC REVIEW 1 BY JAMES DUNCAN DAVIDSON
  - *   PUBLISHED BY SUN MICROSYSTEMS ON NOV. 2, 2000 AND FOUND AT
  - *   <a href="http://java.sun.com/xml">http://java.sun.com/xml</a>
  - * <br>
  - * <br>
  - * <b>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 AUTHOR 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.
  + * Defines a factory API that enables applications to configure and
  + * obtain a SAX based parser to parse XML documents. 
    *
  - * @author <a href="pier@betaversion.org">Pierpaolo Fumagalli</a>
  - * @author Copyright &copy; 2000 The Apache Software Foundation.
  - * @version 1.0 CVS $Revision: 1.3 $ $Date: 2000/11/16 03:15:40 $
  + * @since JAXP 1.0
  + * @version 1.0
  + * @author Rajiv Mordani
  + * @author James Davidson
    */
   
   public abstract class SAXParserFactory {
  @@ -120,16 +97,32 @@
   
       /**
        * Obtain a new instance of a <code>SAXParserFactory</code>. 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>
  +     * 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:
  +     * <ul>
  +     * <li>
  +     * Use the <code>javax.xml.parsers.SAXParserFactory</code> system
  +     * 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.
  +     * </li>
  +     * <li>
  +     * Use the Services API (as detailed in teh 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>
  +     * in jars available to the runtime.
  +     * </li>
  +     * <li>
  +     * Platform default <code>SAXParserFactory</code> instance.
  +     * </li>
  +     * </ul>
        *
        * Once an application has obtained a reference to a
        * <code>SAXParserFactory</code> it can use the factory to
  @@ -140,10 +133,10 @@
        */
   
       public static SAXParserFactory newInstance() {
  -	String factoryImplName = findFactory(defaultPropName,
  -					     "org.apache.xerces.jaxp.SAXParserFactoryImpl");
  -	// the default can be removed after services are tested well enough
  -	
  +        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");
  @@ -154,12 +147,12 @@
               Class clazz = Class.forName(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);
  -	}
  +            throw new FactoryConfigurationError(cnfe);
  +        } catch (IllegalAccessException iae) {
  +            throw new FactoryConfigurationError(iae);
  +        } catch (InstantiationException ie) {
  +            throw new FactoryConfigurationError(ie);
  +        }
           return factoryImpl;
       }
       
  @@ -177,7 +170,8 @@
       
       /**
        * Specifies that the parser produced by this code will
  -     * provide support for XML namespaces.
  +     * provide support for XML namespaces. By default the value of this is set 
  +     * to <code>false</code>
        */
       
       public void setNamespaceAware(boolean awareness) 
  @@ -187,7 +181,8 @@
   
       /**
        * Specifies that the parser produced by this code will
  -     * validate documents as they are parsed.
  +     * validate documents as they are parsed. By default the value of this is 
  +     * set to <code>false</code>
        */
       
       public void setValidating(boolean validating) 
  @@ -217,6 +212,8 @@
        *
        * 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 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.
  @@ -231,7 +228,7 @@
        */
       public abstract void setFeature(String name, boolean value)
           throws ParserConfigurationException, SAXNotRecognizedException,
  -	            SAXNotSupportedException;
  +                    SAXNotSupportedException;
   
       /**
        *
  @@ -252,7 +249,7 @@
        */
       public abstract boolean getFeature(String name)
           throws ParserConfigurationException, SAXNotRecognizedException,
  -	            SAXNotSupportedException;
  +                    SAXNotSupportedException;
   
   
       // -------------------- private methods --------------------
  @@ -260,96 +257,95 @@
       // 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 )
  +        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 final boolean debug=
  -	System.getProperty( "jaxp.debug" ) != null;
  +        System.getProperty( "jaxp.debug" ) != null;
   
       /** 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
  +        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)
  +                                      String defaultFactory)
       {
  -	// Use the system property first
  -	try {
  -	    String systemProp =
  +        if( foundFactory!=null)
  +            return foundFactory;
  +        
  +        // Use the system property first
  +        try {
  +            foundFactory =
                   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/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();
  -	}
  +            if( foundFactory!=null) {
  +                if( debug ) 
  +                    System.err.println("JAXP: found system property" +
  +                                       foundFactory );
  +                return foundFactory;
  +            }
  +            
  +        }catch (SecurityException se) {
  +        }
  +
  +        // 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;
  +        return defaultFactory;
       }
   }
  
  
  
  1.5       +31 -39    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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- package.html	2000/10/17 15:31:24	1.4
  +++ package.html	2000/12/20 04:55:18	1.5
  @@ -1,39 +1,31 @@
  -<!-- CVS $Revision: 1.4 $ $Date: 2000/10/17 15:31:24 $ -->
  -<html>
  - <body>
  -  This package provides a pluggability mechanism to allow a compliant SAX or
  -  DOM parser to be used independently by an application.
  -
  -  <dl>
  -   <dt><b>Version: </b><dd>1.0 CVS $Revision: 1.4 $ $Date: 2000/10/17 15:31:24 $</dd>
  -   <dt><b>Author: </b>
  -     <dd><a href="pier@betaversion.org">Pierpaolo Fumagalli</a></dd>
  -   <dt><b>Copyright:</b>
  -     <dd>Copyright &copy; 2000 The Apache Software Foundation.</dd>
  -  </dl>
  -
  -  <b>ATTENTION:</b>THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES
  -  IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION
  -  REQUEST 5 FOUND AT
  -  <a href="http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html">
  -  http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
  -  </a>
  -  <br>
  -  THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING"
  -  SPECIFICATION VERSION 1.0 PUBLIC RELEASE 1 BY JAMES DUNCAN DAVIDSON
  -  PUBLISHED BY SUN MICROSYSTEMS ON FEB. 18, 2000 AND FOUND AT
  -  <a href="http://java.sun.com/xml">http://java.sun.com/xml</a>
  -  <br>
  -  <br>
  -  <b>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 AUTHOR 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.
  - </body>
  -</html>
  +<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:
  +<ul>
  +<li>SAX (Simple API for XML)
  +<li>DOM (Document Object Model)
  +</ul>
  +
  +
  +
  +</BODY></HTML>
  
  
  
  1.4       +47 -48    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ErrorListener.java	2000/11/15 02:34:31	1.3
  +++ ErrorListener.java	2000/12/20 04:55:19	1.4
  @@ -54,11 +54,14 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +/**
  + * $Id: ErrorListener.java,v 1.4 2000/12/20 04:55:19 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 
  + * 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>
    *
    * <p>If an application does <em>not</em>
  @@ -73,9 +76,8 @@
    * <p>Transformers may use this mechanism to report XML parsing errors
    * as well as transformation errors.</p>
    */
  -public interface ErrorListener 
  -{
  -  
  +public interface ErrorListener {
  +
       /**
        * Receive notification of a warning.
        *
  @@ -83,7 +85,7 @@
        * 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 
  +     * <p>After invoking this method, the Transformer must continue with
        * the transformation. It should still be possible for the
        * application to process the document through to the end.</p>
        *
  @@ -94,48 +96,45 @@
        * chooses to discontinue the transformation.
        *
        * @see javax.xml.transform.TransformerException
  +     */
  +    public abstract void warning(TransformerException exception)
  +        throws TransformerException;
  +
  +    /**
  +     * Receive notification of a recoverable error.
  +     *
  +     * <p>The transformer must continue to provide normal parsing events
  +     * after invoking this method.  It should still be possible for the
  +     * application to process the document through to the end.</p>
  +     *
  +     * @param exception The error information encapsulated in a
  +     *                  transformer exception.
  +     *
  +     * @throws javax.xml.transform.TransformerException if the application
  +     * chooses to discontinue the transformation.
  +     *
  +     * @see javax.xml.transform.TransformerException
  +     */
  +    public abstract void error(TransformerException exception)
  +        throws TransformerException;
  +
  +    /**
  +     * Receive notification of a non-recoverable error.
  +     *
  +     * <p>The application must assume that the transformation cannot
  +     * continue after the Transformer has invoked this method,
  +     * and should continue (if at all) only to collect
  +     * addition error messages. In fact, Transformers are free
  +     * to stop reporting events once this method has been invoked.</p>
  +     *
  +     * @param exception The error information encapsulated in a
  +     *                  transformer exception.
  +     *
  +     * @throws javax.xml.transform.TransformerException if the application
  +     * chooses to discontinue the transformation.
  +     *
  +     * @see javax.xml.transform.TransformerException
        */
  -  public abstract void warning (TransformerException exception)
  -    throws TransformerException;
  -  
  -  
  -  /**
  -   * Receive notification of a recoverable error.
  -   *
  -   * <p>The transformer must continue to provide normal parsing events
  -   * after invoking this method.  It should still be possible for the
  -   * application to process the document through to the end.</p>
  -   *
  -   * @param exception The error information encapsulated in a
  -   *                  transformer exception.
  -   * 
  -   * @throws javax.xml.transform.TransformerException if the application
  -   * chooses to discontinue the transformation.
  -   * 
  -   * @see javax.xml.transform.TransformerException 
  -   */
  -  public abstract void error (TransformerException exception)
  -    throws TransformerException;
  -  
  -  
  -  /**
  -   * Receive notification of a non-recoverable error.
  -   *
  -   * <p>The application must assume that the transformation cannot 
  -   * continue after the Transformer has invoked this method, 
  -   * and should continue (if at all) only to collect
  -   * addition error messages. In fact, Transformers are free 
  -   * to stop reporting events once this method has been invoked.</p>
  -   *
  -   * @param exception The error information encapsulated in a
  -   *                  transformer exception.
  -   * 
  -   * @throws javax.xml.transform.TransformerException if the application
  -   * chooses to discontinue the transformation.
  -   * 
  -   * @see javax.xml.transform.TransformerException 
  -   */
  -  public abstract void fatalError (TransformerException exception)
  -    throws TransformerException;
  -  
  +    public abstract void fatalError(TransformerException exception)
  +        throws TransformerException;
   }
  
  
  
  1.7       +154 -162  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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- OutputKeys.java	2000/12/14 00:19:24	1.6
  +++ OutputKeys.java	2000/12/20 04:55:19	1.7
  @@ -54,6 +54,9 @@
    * 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;
   
   /**
  @@ -62,167 +65,156 @@
    * output properties from a Transformer or Templates object.
    * <p>A properties in this class are read-only.</p>
    *
  - * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  - * XSL Transformations (XSLT) W3C Recommendation</a>
  + * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
    */
  -public class OutputKeys
  -{
  -  /**
  -   * Default constructor is private on purpose.  This class is 
  -   * only for static variable access, and should never be constructed.
  -   */
  -  private OutputKeys(){}
  -
  -  /**
  -   * method = "xml" | "html" | "text" | <var>expanded name</var>.
  -   *
  -   * <p>The method attribute identifies the overall method that
  -   * should be used for outputting the result tree.  Other non-namespaced 
  -   * values may be used, such as "xhtml", but, if accepted, the handling 
  -   * of such values is implementation defined.  If any of the method values
  -   * are not accepted and are not namespace qualified, 
  -   * then {@link javax.xml.transform.Transformer#setOutputProperty} 
  -   * or {@link javax.xml.transform.Transformer#setOutputProperties} will 
  -   * throw an {@link java.lang.IllegalArgumentException}.</p>
  -   * 
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>
  -   */
  -  public static final String METHOD = "method";
  -
  -  /**
  -   * version = <var>nmtoken</var>.
  -   *
  -   * <p><code>version</code> specifies the version of the output
  -   * method.</p>
  -   * <p>When the output method is "xml", the version value specifies the 
  -   * version of XML to be used for outputting the result tree. The default 
  -   * value for the xml output method is 1.0. When the output method is 
  -   * "html", the version value indicates the version of the HTML. 
  -   * The default value for the xml output method is 4.0, which specifies 
  -   * that the result should be output as HTML conforming to the HTML 4.0 
  -   * Recommendation [HTML].  If the output method is "text", the version 
  -   * property is ignored.</p>
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a> 
  -   */
  -  public static final String VERSION = "version";
  -
  -  /**
  -   * encoding = <var>string</var>.
  -   *
  -   * <p><code>encoding</code> specifies the preferred character
  -   * encoding that the Transformer should use to encode sequences of
  -   * characters as sequences of bytes. The value of the attribute should be
  -   * treated case-insensitively. The value must only contain characters in
  -   * the range #x21 to #x7E (i.e., printable ASCII characters). The value
  -   * should either be a <code>charset</code> registered with the Internet
  -   * Assigned Numbers Authority <a href="#IANA">[IANA]</a>,
  -   * <a href="#RFC2278">[RFC2278]</a> or start with <code>X-</code>.</p>
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>
  -   */
  -  public static final String ENCODING = "encoding";
  -
  -  /**
  -   * omit-xml-declaration = "yes" | "no".
  -   *
  -   * <p><code>omit-xml-declaration</code> specifies whether the XSLT
  -   * processor should output an XML declaration; the value must be
  -   * <code>yes</code> or <code>no</code>.</p>
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>
  -   */
  -  public static final String OMIT_XML_DECLARATION = "omit-xml-declaration";
  -
  -  /**
  -   * standalone = "yes" | "no".
  -   *
  -   * <p><code>standalone</code> specifies whether the Transformer
  -   * should output a standalone document declaration; the value must be
  -   * <code>yes</code> or <code>no</code>.</p>
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>
  -   */
  -  public static final String STANDALONE = "standalone";
  -
  -  /**
  -   * doctype-public = <var>string</var>.
  -   * <p>See the documentation for the {@link #DOCTYPE_SYSTEM} property 
  -   * for a description of what the value of the key should be.</p>
  -   *
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>
  -   */
  -  public static final String DOCTYPE_PUBLIC = "doctype-public";
  -
  -  /**
  -   * doctype-system = <var>string</var>.
  -   * <p><code>doctype-public</code> specifies the public identifier
  -   * to be used in the document type declaration.</p>
  -   * <p>If the doctype-system property is specified, the xml output method 
  -   * should output a document type declaration immediately before the first 
  -   * element. The name following &lt;!DOCTYPE should be the name of the first 
  -   * element. If doctype-public property is also specified, then the xml 
  -   * output method should output PUBLIC followed by the public identifier 
  -   * and then the system identifier; otherwise, it should output SYSTEM 
  -   * followed by the system identifier. The internal subset should be empty. 
  -   * The doctype-public attribute should be ignored unless the doctype-system 
  -   * attribute is specified.</p>
  -   * <p>If the doctype-public or doctype-system attributes are specified, 
  -   * then the html output method should output a document type declaration 
  -   * immediately before the first element. The name following &lt;!DOCTYPE 
  -   * should be HTML or html. If the doctype-public attribute is specified, 
  -   * then the output method should output PUBLIC followed by the specified 
  -   * public identifier; if the doctype-system attribute is also specified, 
  -   * it should also output the specified system identifier following the 
  -   * public identifier. If the doctype-system attribute is specified but 
  -   * the doctype-public attribute is not specified, then the output method 
  -   * should output SYSTEM followed by the specified system identifier.</p>
  -   *
  -   * <p><code>doctype-system</code> specifies the system identifier
  -   * to be used in the document type declaration.</p>
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>
  -   */
  -  public static final String DOCTYPE_SYSTEM = "doctype-system";
  -
  -  /**
  -   * cdata-section-elements = <var>expanded names</var>.
  -   *
  -   * <p><code>cdata-section-elements</code> specifies a whitespace delimited 
  -   * list of the names of elements whose text node children should be output 
  -   * using CDATA sections.</p>
  -   * 
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation.</a>
  -   */
  -  public static final String CDATA_SECTION_ELEMENTS =
  -    "cdata-section-elements";
  -
  -  /**
  -   * indent = "yes" | "no".
  -   *
  -   * <p><code>indent</code> specifies whether the Transformer may
  -   * add additional whitespace when outputting the result tree; the value
  -   * must be <code>yes</code> or <code>no</code>.  </p>
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>
  -   */
  -  public static final String INDENT = "indent";
  -
  -  /**
  -   * media-type = <var>string</var>.
  -   *
  -   * <p><code>media-type</code> specifies the media type (MIME
  -   * content type) of the data that results from outputting the result
  -   * tree. The <code>charset</code> parameter should not be specified
  -   * explicitly; instead, when the top-level media type is
  -   * <code>text</code>, a <code>charset</code> parameter should be added
  -   * according to the character encoding actually used by the output
  -   * method.  </p>
  -   * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>
  -   */
  -  public static final String MEDIA_TYPE = "media-type";
  +public class OutputKeys {
  +
  +    /**
  +     * Default constructor is private on purpose.  This class is
  +     * only for static variable access, and should never be constructed.
  +     */
  +    private OutputKeys() {}
  +
  +    /**
  +     * method = "xml" | "html" | "text" | <var>expanded name</var>.
  +     *
  +     * <p>The method attribute identifies the overall method that
  +     * should be used for outputting the result tree.  Other non-namespaced
  +     * values may be used, such as "xhtml", but, if accepted, the handling
  +     * of such values is implementation defined.  If any of the method values
  +     * are not accepted and are not namespace qualified,
  +     * then {@link javax.xml.transform.Transformer#setOutputProperty}
  +     * or {@link javax.xml.transform.Transformer#setOutputProperties} will
  +     * throw a {@link java.lang.IllegalArgumentException}.</p>
  +     *
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
  +     */
  +    public static final String METHOD = "method";
  +
  +    /**
  +     * version = <var>nmtoken</var>.
  +     *
  +     * <p><code>version</code> specifies the version of the output
  +     * method.</p>
  +     * <p>When the output method is "xml", the version value specifies the
  +     * version of XML to be used for outputting the result tree. The default
  +     * value for the xml output method is 1.0. When the output method is
  +     * "html", the version value indicates the version of the HTML.
  +     * The default value for the xml output method is 4.0, which specifies
  +     * that the result should be output as HTML conforming to the HTML 4.0
  +     * Recommendation [HTML].  If the output method is "text", the version
  +     * property is ignored.</p>
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
  +     */
  +    public static final String VERSION = "version";
  +
  +    /**
  +     * encoding = <var>string</var>.
  +     *
  +     * <p><code>encoding</code> specifies the preferred character
  +     * encoding that the Transformer should use to encode sequences of
  +     * characters as sequences of bytes. The value of the attribute should be
  +     * treated case-insensitively. The value must only contain characters in
  +     * the range #x21 to #x7E (i.e., printable ASCII characters). The value
  +     * should either be a <code>charset</code> registered with the Internet
  +     * Assigned Numbers Authority <a href="#IANA">[IANA]</a>,
  +     * <a href="#RFC2278">[RFC2278]</a> or start with <code>X-</code>.</p>
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
  +     */
  +    public static final String ENCODING = "encoding";
  +
  +    /**
  +     * omit-xml-declaration = "yes" | "no".
  +     *
  +     * <p><code>omit-xml-declaration</code> specifies whether the XSLT
  +     * processor should output an XML declaration; the value must be
  +     * <code>yes</code> or <code>no</code>.</p>
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
  +     */
  +    public static final String OMIT_XML_DECLARATION = "omit-xml-declaration";
  +
  +    /**
  +     * standalone = "yes" | "no".
  +     *
  +     * <p><code>standalone</code> specifies whether the Transformer
  +     * should output a standalone document declaration; the value must be
  +     * <code>yes</code> or <code>no</code>.</p>
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
  +     */
  +    public static final String STANDALONE = "standalone";
  +
  +    /**
  +     * doctype-public = <var>string</var>.
  +     * <p>See the documentation for the {@link #DOCTYPE_SYSTEM} property
  +     * for a description of what the value of the key should be.</p>
  +     *
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
  +     */
  +    public static final String DOCTYPE_PUBLIC = "doctype-public";
  +
  +    /**
  +     * doctype-system = <var>string</var>.
  +     * <p><code>doctype-public</code> specifies the public identifier
  +     * to be used in the document type declaration.</p>
  +     * <p>If the doctype-system property is specified, the xml output method
  +     * should output a document type declaration immediately before the first
  +     * element. The name following &lt;!DOCTYPE should be the name of the first
  +     * element. If doctype-public property is also specified, then the xml
  +     * output method should output PUBLIC followed by the public identifier
  +     * and then the system identifier; otherwise, it should output SYSTEM
  +     * followed by the system identifier. The internal subset should be empty.
  +     * The doctype-public attribute should be ignored unless the doctype-system
  +     * attribute is specified.</p>
  +     * <p>If the doctype-public or doctype-system attributes are specified,
  +     * then the html output method should output a document type declaration
  +     * immediately before the first element. The name following &lt;!DOCTYPE
  +     * should be HTML or html. If the doctype-public attribute is specified,
  +     * then the output method should output PUBLIC followed by the specified
  +     * public identifier; if the doctype-system attribute is also specified,
  +     * it should also output the specified system identifier following the
  +     * public identifier. If the doctype-system attribute is specified but
  +     * the doctype-public attribute is not specified, then the output method
  +     * should output SYSTEM followed by the specified system identifier.</p>
  +     *
  +     * <p><code>doctype-system</code> specifies the system identifier
  +     * to be used in the document type declaration.</p>
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
  +     */
  +    public static final String DOCTYPE_SYSTEM = "doctype-system";
  +
  +    /**
  +     * cdata-section-elements = <var>expanded names</var>.
  +     *
  +     * <p><code>cdata-section-elements</code> specifies a whitespace delimited
  +     * list of the names of elements whose text node children should be output
  +     * using CDATA sections.</p>
  +     *
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation.</a>
  +     */
  +    public static final String CDATA_SECTION_ELEMENTS =
  +        "cdata-section-elements";
  +
  +    /**
  +     * indent = "yes" | "no".
  +     *
  +     * <p><code>indent</code> specifies whether the Transformer may
  +     * add additional whitespace when outputting the result tree; the value
  +     * must be <code>yes</code> or <code>no</code>.  </p>
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
  +     */
  +    public static final String INDENT = "indent";
  +
  +    /**
  +     * media-type = <var>string</var>.
  +     *
  +     * <p><code>media-type</code> specifies the media type (MIME
  +     * content type) of the data that results from outputting the result
  +     * tree. The <code>charset</code> parameter should not be specified
  +     * explicitly; instead, when the top-level media type is
  +     * <code>text</code>, a <code>charset</code> parameter should be added
  +     * according to the character encoding actually used by the output
  +     * method.  </p>
  +     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>
  +     */
  +    public static final String MEDIA_TYPE = "media-type";
   }
  
  
  
  1.4       +57 -50    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Result.java	2000/11/14 17:02:39	1.3
  +++ Result.java	2000/12/20 04:55:19	1.4
  @@ -54,6 +54,9 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +/**
  + * $Id: Result.java,v 1.4 2000/12/20 04:55:19 sboag Exp $
  + */
   package javax.xml.transform;
   
   import java.lang.String;
  @@ -61,57 +64,61 @@
   import java.io.OutputStream;
   import java.io.Writer;
   
  +
   /**
    * An object that implements this interface contains the information
    * needed to build a transformation result tree.
    */
  -public interface Result
  -{
  -  /**
  -   * The name of the processing instruction that is sent if the
  -   * result tree disables output escaping.
  -   * 
  -   * <p>Normally, result tree serialization escapes & and < (and 
  -   * possibly other characters) when outputting text nodes. 
  -   * This ensures that the output is well-formed XML. However, 
  -   * it is sometimes convenient to be able to produce output that is 
  -   * almost, but not quite well-formed XML; for example, 
  -   * the output may include ill-formed sections that will 
  -   * be transformed into well-formed XML by a subsequent non-XML aware 
  -   * process. If a processing instruction is sent with this name, 
  -   * serialization should be output without any escaping. </p>
  -   * 
  -   * <p>Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and 
  -   * PI_ENABLE_OUTPUT_ESCAPING inserted into the tree.</p>
  -   * 
  -   * @see <a href="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
  -   */
  -  public static final String PI_DISABLE_OUTPUT_ESCAPING = "javax.xml.transform.disable-output-escaping";
  -  
  -  /**
  -   * The name of the processing instruction that is sent 
  -   * if the result tree enables output escaping at some point after having
  -   * received a PI_DISABLE_OUTPUT_ESCAPING processing instruction.
  -   * 
  -   * @see <a href="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
  -   */
  -  public static final String PI_ENABLE_OUTPUT_ESCAPING = "javax.xml.transform.disable-output-escaping";
  -
  -  /**
  -   * Set the system identifier for this Result.
  -   *
  -   * <p>If the Result is not to be written to a file, the system identifier is optional.
  -   * The application may still want to provide one, however, for use in error messages
  -   * and warnings, or to resolve relative output identifiers.</p>
  -   *
  -   * @param systemId The system identifier as a URI string.
  -   */
  -  public void setSystemId(String systemId);
  -
  -  /**
  -   * Get the system identifier that was set with setSystemId.
  -   *
  -   * @return The system identifier that was set with setSystemId, 
  -   * or null if setSystemId was not called.
  -   */
  -  public String getSystemId();}
  +public interface Result {
  +
  +    /**
  +     * The name of the processing instruction that is sent if the
  +     * result tree disables output escaping.
  +     *
  +     * <p>Normally, result tree serialization escapes & and < (and
  +     * possibly other characters) when outputting text nodes.
  +     * This ensures that the output is well-formed XML. However,
  +     * it is sometimes convenient to be able to produce output that is
  +     * almost, but not quite well-formed XML; for example,
  +     * the output may include ill-formed sections that will
  +     * be transformed into well-formed XML by a subsequent non-XML aware
  +     * process. If a processing instruction is sent with this name,
  +     * serialization should be output without any escaping. </p>
  +     *
  +     * <p>Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and
  +     * PI_ENABLE_OUTPUT_ESCAPING inserted into the tree.</p>
  +     *
  +     * @see <a href="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
  +     */
  +    public static final String PI_DISABLE_OUTPUT_ESCAPING =
  +        "javax.xml.transform.disable-output-escaping";
  +
  +    /**
  +     * The name of the processing instruction that is sent
  +     * if the result tree enables output escaping at some point after having
  +     * received a PI_DISABLE_OUTPUT_ESCAPING processing instruction.
  +     *
  +     * @see <a href="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
  +     */
  +    public static final String PI_ENABLE_OUTPUT_ESCAPING =
  +        "javax.xml.transform.disable-output-escaping";
  +
  +    /**
  +     * Set the system identifier for this Result.
  +     *
  +     * <p>If the Result is not to be written to a file, the system identifier is optional.
  +     * The application may still want to provide one, however, for use in error messages
  +     * and warnings, or to resolve relative output identifiers.</p>
  +     *
  +     * @param systemId The system identifier as a URI string.
  +     */
  +    public void setSystemId(String systemId);
  +
  +    /**
  +     * Get the system identifier that was set with setSystemId.
  +     *
  +     * @return The system identifier that was set with setSystemId,
  +     * or null if setSystemId was not called.
  +     */
  +    public String getSystemId();
  +}
  
  
  
  1.4       +25 -21    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Source.java	2000/11/14 17:02:39	1.3
  +++ Source.java	2000/12/20 04:55:19	1.4
  @@ -54,6 +54,9 @@
    * 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;
   
   import java.lang.String;
  @@ -61,29 +64,30 @@
   import java.io.InputStream;
   import java.io.Reader;
   
  +
   /**
    * An object that implements this interface contains the information
    * needed to act as source input (XML source or transformation instructions).
    */
  -public interface Source
  -{
  -  /**
  -   * Set the system identifier for this Source.
  -   *
  -   * <p>The system identifier is optional if the source does not 
  -   * get its data from a URL, but it may still be useful to provide one.
  -   * The application can use a system identifier, for example, to resolve 
  -   * relative URIs and to include in error messages and warnings.</p>
  -   *
  -   * @param systemId The system identifier as a URL string.
  -   */
  -  public void setSystemId(String systemId);
  -
  -  /**
  -   * Get the system identifier that was set with setSystemId.
  -   *
  -   * @return The system identifier that was set with setSystemId, or null
  -   * if setSystemId was not called.
  -   */
  -  public String getSystemId();
  +public interface Source {
  +
  +    /**
  +     * Set the system identifier for this Source.
  +     *
  +     * <p>The system identifier is optional if the source does not
  +     * get its data from a URL, but it may still be useful to provide one.
  +     * The application can use a system identifier, for example, to resolve
  +     * relative URIs and to include in error messages and warnings.</p>
  +     *
  +     * @param systemId The system identifier as a URL string.
  +     */
  +    public void setSystemId(String systemId);
  +
  +    /**
  +     * Get the system identifier that was set with setSystemId.
  +     *
  +     * @return The system identifier that was set with setSystemId, or null
  +     * if setSystemId was not called.
  +     */
  +    public String getSystemId();
   }
  
  
  
  1.4       +63 -61    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SourceLocator.java	2000/11/14 17:02:39	1.3
  +++ SourceLocator.java	2000/12/20 04:55:19	1.4
  @@ -54,75 +54,77 @@
    * 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;
   
   /**
    * This interface is primarily for the purposes of reporting where
    * an error occurred in the XML source or transformation instructions.
    */
  -public interface SourceLocator
  -{
  +public interface SourceLocator {
   
  -  /**
  -   * Return the public identifier for the current document event.
  -   *
  -   * <p>The return value is the public identifier of the document
  -   * entity or of the external parsed entity in which the markup that
  -   * triggered the event appears.</p>
  -   *
  -   * @return A string containing the public identifier, or
  -   *         null if none is available.
  -   * @see #getSystemId
  -   */
  -  public String getPublicId();
  +    /**
  +     * Return the public identifier for the current document event.
  +     *
  +     * <p>The return value is the public identifier of the document
  +     * entity or of the external parsed entity in which the markup that
  +     * triggered the event appears.</p>
  +     *
  +     * @return A string containing the public identifier, or
  +     *         null if none is available.
  +     * @see #getSystemId
  +     */
  +    public String getPublicId();
   
  -  /**
  -   * Return the system identifier for the current document event.
  -   *
  -   * <p>The return value is the system identifier of the document
  -   * entity or of the external parsed entity in which the markup that
  -   * triggered the event appears.</p>
  -   *
  -   * <p>If the system identifier is a URL, the parser must resolve it
  -   * fully before passing it to the application.</p>
  -   *
  -   * @return A string containing the system identifier, or null
  -   *         if none is available.
  -   * @see #getPublicId
  -   */
  -  public String getSystemId();
  +    /**
  +     * Return the system identifier for the current document event.
  +     *
  +     * <p>The return value is the system identifier of the document
  +     * entity or of the external parsed entity in which the markup that
  +     * triggered the event appears.</p>
  +     *
  +     * <p>If the system identifier is a URL, the parser must resolve it
  +     * fully before passing it to the application.</p>
  +     *
  +     * @return A string containing the system identifier, or null
  +     *         if none is available.
  +     * @see #getPublicId
  +     */
  +    public String getSystemId();
   
  -  /**
  -   * Return the line number where the current document event ends.
  -   *
  -   * <p><strong>Warning:</strong> The return value from the method
  -   * is intended only as an approximation for the sake of error
  -   * reporting; it is not intended to provide sufficient information
  -   * to edit the character content of the original XML document.</p>
  -   *
  -   * <p>The return value is an approximation of the line number
  -   * in the document entity or external parsed entity where the
  -   * markup that triggered the event appears.</p>
  -   *
  -   * @return The line number, or -1 if none is available.
  -   * @see #getColumnNumber
  -   */
  -  public int getLineNumber();
  +    /**
  +     * Return the line number where the current document event ends.
  +     *
  +     * <p><strong>Warning:</strong> The return value from the method
  +     * is intended only as an approximation for the sake of error
  +     * reporting; it is not intended to provide sufficient information
  +     * to edit the character content of the original XML document.</p>
  +     *
  +     * <p>The return value is an approximation of the line number
  +     * in the document entity or external parsed entity where the
  +     * markup that triggered the event appears.</p>
  +     *
  +     * @return The line number, or -1 if none is available.
  +     * @see #getColumnNumber
  +     */
  +    public int getLineNumber();
   
  -  /**
  -   * Return the column number where the current document event ends.
  -   *
  -   * <p><strong>Warning:</strong> The return value from the method
  -   * is intended only as an approximation for the sake of error
  -   * reporting; it is not intended to provide sufficient information
  -   * to edit the character content of the original XML document.</p>
  -   *
  -   * <p>The return value is an approximation of the column number
  -   * in the document entity or external parsed entity where the
  -   * markup that triggered the event appears.</p>
  -   *
  -   * @return The column number, or -1 if none is available.
  -   * @see #getLineNumber
  -   */
  -  public int getColumnNumber();
  +    /**
  +     * Return the character position where the current document event ends.
  +     *
  +     * <p><strong>Warning:</strong> The return value from the method
  +     * is intended only as an approximation for the sake of error
  +     * reporting; it is not intended to provide sufficient information
  +     * to edit the character content of the original XML document.</p>
  +     *
  +     * <p>The return value is an approximation of the column number
  +     * in the document entity or external parsed entity where the
  +     * markup that triggered the event appears.</p>
  +     *
  +     * @return The column number, or -1 if none is available.
  +     * @see #getLineNumber
  +     */
  +    public int getColumnNumber();
   }
  
  
  
  1.6       +45 -42    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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Templates.java	2000/12/14 00:19:24	1.5
  +++ Templates.java	2000/12/20 04:55:19	1.6
  @@ -54,12 +54,16 @@
    * 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;
   
   import java.util.Properties;
   
   import javax.xml.transform.TransformerException;
   
  +
   /**
    * An object that implements this interface is the runtime representation of processed
    * transformation instructions.
  @@ -68,47 +72,46 @@
    * over multiple threads running concurrently, and may
    * be used multiple times in a given session.</p>
    */
  -public interface Templates
  -{
  +public interface Templates {
  +
  +    /**
  +     * Create a new transformation context for this Templates object.
  +     *
  +     * @return A valid non-null instance of a Transformer.
  +     *
  +     * @throws TransformerConfigurationException if a Transformer can not be created.
  +     */
  +    Transformer newTransformer() throws TransformerConfigurationException;
   
  -  /**
  -   * Create a new transformation context for this Templates object.
  -   *
  -   * @return A valid non-null instance of a Transformer.
  -   *
  -   * @throws TransformerConfigurationException if a Transformer can not be created.
  -   */
  -  Transformer newTransformer() throws TransformerConfigurationException;
  -
  -  /**
  -   * Get the static properties for xsl:output.  The object returned will
  -   * be a clone of the internal values. Accordingly, it can be mutated
  -   * without mutating the Templates object, and then handed in to
  -   * {@link javax.xml.transform.Transformer#setOutputProperties}.
  -   * 
  -   * <p>The properties returned should contain properties set by the stylesheet, 
  -   * and these properties are "defaulted" by default properties specified by 
  -   * <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>.  The properties that 
  -   * were specifically set by the stylesheet should be in the base 
  -   * Properties list, while the XSLT default properties that were not 
  -   * specifically set should be in the "default" Properties list.  Thus, 
  -   * getOutputProperties().getProperty(String key) will obtain any 
  -   * property in that was set by the stylesheet, <em>or</em> the default 
  -   * properties, while 
  -   * getOutputProperties().get(String key) will only retrieve properties 
  -   * that were explicitly set in the stylesheet.</p>
  -   *
  -   * <p>For XSLT, 
  -   * <a href="http://www.w3.org/TR/xslt#attribute-value-templates">Attribute 
  -   * Value Templates</a> attribute values will
  -   * be returned unexpanded (since there is no context at this point).  The 
  -   * namespace prefixes inside Attribute Value Templates will be unexpanded, 
  -   * so that they remain valid XPath values.  (For XSLT 1.0, this is not 
  -   * a problem since Attribute Value Templates are not allowed for xsl:output 
  -   * attributes.  However, the will be allowed in versions after 1.1.)</p>
  -   *
  -   * @return A Properties object, never null.
  -   */
  -  Properties getOutputProperties();
  +    /**
  +     * Get the static properties for xsl:output.  The object returned will
  +     * be a clone of the internal values. Accordingly, it can be mutated
  +     * without mutating the Templates object, and then handed in to
  +     * {@link javax.xml.transform.Transformer#setOutputProperties}.
  +     *
  +     * <p>The properties returned should contain properties set by the stylesheet,
  +     * and these properties are "defaulted" by default properties specified by
  +     * <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  +     * XSL Transformations (XSLT) W3C Recommendation</a>.  The properties that
  +     * were specifically set by the stylesheet should be in the base
  +     * Properties list, while the XSLT default properties that were not
  +     * specifically set should be in the "default" Properties list.  Thus,
  +     * getOutputProperties().getProperty(String key) will obtain any
  +     * property in that was set by the stylesheet, <em>or</em> the default
  +     * properties, while
  +     * getOutputProperties().get(String key) will only retrieve properties
  +     * that were explicitly set in the stylesheet.</p>
  +     *
  +     * <p>For XSLT,
  +     * <a href="http://www.w3.org/TR/xslt#attribute-value-templates">Attribute
  +     * Value Templates</a> attribute values will
  +     * be returned unexpanded (since there is no context at this point).  The
  +     * namespace prefixes inside Attribute Value Templates will be unexpanded,
  +     * so that they remain valid XPath values.  (For XSLT 1.0, this is not
  +     * a problem since Attribute Value Templates are not allowed for xsl:output
  +     * attributes.  However, the will be allowed in versions after 1.1.)</p>
  +     *
  +     * @return A Properties object, never null.
  +     */
  +    Properties getOutputProperties();
   }
  
  
  
  1.12      +212 -209  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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Transformer.java	2000/12/14 00:19:24	1.11
  +++ Transformer.java	2000/12/20 04:55:20	1.12
  @@ -54,10 +54,14 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +/**
  + * $Id: Transformer.java,v 1.12 2000/12/20 04:55:20 sboag Exp $
  + */
   package javax.xml.transform;
   
   import java.util.Properties;
   
  +
   /**
    * An instace of this abstract class can transform a
    * source tree into a result tree.
  @@ -66,218 +70,217 @@
    * 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>
  - * 
  + *
    * <p>An object of this class may not be used in multiple threads
  - * running concurrently.  Different Transformers may be used 
  + * running concurrently.  Different Transformers may be used
    * concurrently by different threads.</p>
  - * 
  - * <p>A Transformer may be used multiple times.  Parameters and 
  + *
  + * <p>A Transformer may be used multiple times.  Parameters and
    * output properties are preserved across transformations.</p>
    */
  -public abstract class Transformer
  -{
  -  /**
  -   * Default constructor is protected on purpose.
  -   */
  -  protected Transformer(){}
  -
  -  /**
  -   * Process the source tree to the output result.
  -   * @param xmlSource  The input for the source tree.
  -   * @param outputTarget The output target.
  -   *
  -   * @throws TransformerException If an unrecoverable error occurs 
  -   * during the course of the transformation.
  -   */
  -  public abstract void transform(Source xmlSource, Result outputTarget)
  -    throws TransformerException;
  -
  -  /**
  -   * Add a parameter for the transformation.
  -   * 
  -   * <p>Pass a qualified name as a two-part string, the namespace URI
  -   * enclosed in curly braces ({}), followed by the local name. If the
  -   * name has a null URL, the String only contain 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 TrAX name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that
  -   * no prefix is used.</p>
  -   *
  -   * @param name The name of the parameter, which may begin with a namespace URI
  -   * in curly braces ({}).
  -   * @param value The value object.  This can be any valid Java object. It is
  -   * up to the processor to provide the proper object coersion or to simply
  -   * pass the object on for use in an extension.
  -   */
  -  public abstract void setParameter(String name, Object value);
  -    
  -  /**
  -   * Get a parameter that was explicitly set with setParameter 
  -   * or setParameters.
  -   * 
  -   * <p>This method does not return a default parameter value, which
  -   * cannot be determined until the node context is evaluated during
  -   * the transformation process.
  -   * 
  -   * @return A parameter that has been set with setParameter.
  -   */
  -  public abstract Object getParameter(String name);
  -  
  -  /**
  -   * Clear all parameters set with setParameter.
  -   */
  -  public abstract void clearParameters();
  -
  -  /**
  -   * Set an object that will be used to resolve URIs used in
  -   * document().
  -   * 
  -   * <p>If the resolver argument is null, the URIResolver value will 
  -   * be cleared, and the default behavior will be used.</p>
  -   * 
  -   * @param resolver An object that implements the URIResolver interface,
  -   * or null.
  -   */
  -  public abstract void setURIResolver(URIResolver resolver);
  -
  -  /**
  -   * Get an object that will be used to resolve URIs used in
  -   * document(), etc.
  -   * 
  -   * @return An object that implements the URIResolver interface,
  -   * or null.
  -   */
  -  public abstract URIResolver getURIResolver();
  -
  -  /**
  -   * Set the output properties for the transformation.  These
  -   * properties will override properties set in the Templates
  -   * with xsl:output.
  -   *
  -   * <p>If argument to this function is null, any properties
  -   * previously set are removed, and the value will revert to the value 
  -   * defined in the templates object.</p>
  -   * 
  -   * <p>Pass a qualified property key name as a two-part string, the namespace URI
  -   * enclosed in curly braces ({}), followed by the local name. If the
  -   * name has a null URL, the String only contain 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 TrAX name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that
  -   * no prefix is used.</p>
  -   *
  -   * @param oformat A set of output properties that will be
  -   * used to override any of the same properties in affect
  -   * for the transformation.   
  -   * 
  -   * @see javax.xml.transform.OutputKeys
  -   * @see java.util.Properties
  -   * 
  -   * @throws IllegalArgumentException if any of the argument keys are not 
  -   * recognized and are not namespace qualified.
  -   */
  -  public abstract void setOutputProperties(Properties oformat)
  -    throws IllegalArgumentException;
  -
  -  /**
  -   * Get a copy of the output properties for the transformation.
  -   * 
  -   * <p>The properties returned should contain properties set by the user, 
  -   * and properties set by the stylesheet, and these properties 
  -   * are "defaulted" by default properties specified by <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>.  The properties that 
  -   * were specifically set by the user or the stylesheet should be in the base 
  -   * Properties list, while the XSLT default properties that were not 
  -   * specifically set should be the default Properties list.  Thus, 
  -   * getOutputProperties().getProperty(String key) will obtain any 
  -   * property in that was set by {@link #setOutputProperty}, 
  -   * {@link #setOutputProperties}, in the stylesheet, <em>or</em> the default 
  -   * properties, while 
  -   * getOutputProperties().get(String key) will only retrieve properties 
  -   * that were explicitly set by {@link #setOutputProperty}, 
  -   * {@link #setOutputProperties}, or in the stylesheet.</p>
  -   * 
  -   * <p>Note that mutation of the Properties object returned will not 
  -   * effect the properties that the transformation contains.</p>
  -   * 
  -   * <p>If any of the argument keys are not recognized and are not 
  -   * namespace qualified, the property will be ignored.  In other words the 
  -   * behaviour is not orthogonal with setOutputProperties.</p>
  -   *
  -   * @returns A copy of the set of output properties in effect
  -   * for the next transformation.
  -   * 
  -   * @see javax.xml.transform.OutputKeys
  -   * @see java.util.Properties
  -   */
  -  public abstract Properties getOutputProperties();
  -
  -  /**
  -   * Set an output property that will be in effect for the 
  -   * transformation.
  -   * 
  -   * <p>Pass a qualified property name as a two-part string, the namespace URI
  -   * enclosed in curly braces ({}), followed by the local name. If the
  -   * name has a null URL, the String only contain 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 TrAX name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that
  -   * no prefix is used.</p>
  -   * 
  -   * <p>The Properties object that was passed to {@link #setOutputProperties} won't 
  -   * be effected by calling this method.</p>
  -   * 
  -   * @param name A non-null String that specifies an output 
  -   * property name, which may be namespace qualified.
  -   * @param value The non-null string value of the output property.
  -   *
  -   * @throws IllegalArgumentException If the property is not supported, and is 
  -   * not qualified with a namespace.
  -   * 
  -   * @see javax.xml.transform.OutputKeys
  -   */
  -  public abstract void setOutputProperty(String name, String value)
  -    throws IllegalArgumentException;
  -
  -  /**
  -   * Get an output property that is in effect for the 
  -   * transformation.  The property specified may be a property 
  -   * that was set with setOutputProperty, or it may be a 
  -   * property specified in the stylesheet.
  -   *
  -   * @param name A non-null String that specifies an output 
  -   * property name, which may be namespace qualified.
  -   *
  -   * @return The string value of the output property, or null 
  -   * if no property was found.
  -   *
  -   * @throws IllegalArgumentException If the property is not supported.
  -   * 
  -   * @see javax.xml.transform.OutputKeys
  -   */
  -  public abstract String getOutputProperty(String name)
  -    throws IllegalArgumentException;
  -  
  -  /**
  -   * Set the error event listener in effect for the transformation.
  -   *
  -   * @param listener The new error listener.
  -   * @throws IllegalArgumentException if listener is null.
  -   */
  -  public abstract void setErrorListener (ErrorListener listener)
  -    throws IllegalArgumentException;
  -
  -  /**
  -   * Get the error event handler in effect for the transformation.
  -   *
  -   * @return The current error handler, which should never be null.
  -   */
  -  public abstract ErrorListener getErrorListener ();
  +public abstract class Transformer {
   
  +    /**
  +     * Default constructor is protected on purpose.
  +     */
  +    protected Transformer() {}
  +
  +    /**
  +     * Process the source tree to the output result.
  +     * @param xmlSource  The input for the source tree.
  +     * @param outputTarget The output target.
  +     *
  +     * @throws TransformerException If an unrecoverable error occurs
  +     * during the course of the transformation.
  +     */
  +    public abstract void transform(Source xmlSource, Result outputTarget)
  +        throws TransformerException;
  +
  +    /**
  +     * Add a parameter for the transformation.
  +     *
  +     * <p>Pass a qualified name as a two-part string, the namespace URI
  +     * enclosed in curly braces ({}), followed by the local name. If the
  +     * name has a null URL, the String only contain 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 qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that
  +     * no prefix is used.</p>
  +     *
  +     * @param name The name of the parameter, which may begin with a namespace URI
  +     * in curly braces ({}).
  +     * @param value The value object.  This can be any valid Java object. It is
  +     * up to the processor to provide the proper object coersion or to simply
  +     * pass the object on for use in an extension.
  +     */
  +    public abstract void setParameter(String name, Object value);
  +
  +    /**
  +     * Get a parameter that was explicitly set with setParameter
  +     * or setParameters.
  +     *
  +     * <p>This method does not return a default parameter value, which
  +     * cannot be determined until the node context is evaluated during
  +     * the transformation process.
  +     *
  +     * @return A parameter that has been set with setParameter.
  +     */
  +    public abstract Object getParameter(String name);
  +
  +    /**
  +     * Clear all parameters set with setParameter.
  +     */
  +    public abstract void clearParameters();
  +
  +    /**
  +     * Set an object that will be used to resolve URIs used in
  +     * document().
  +     *
  +     * <p>If the resolver argument is null, the URIResolver value will
  +     * be cleared, and the default behavior will be used.</p>
  +     *
  +     * @param resolver An object that implements the URIResolver interface,
  +     * or null.
  +     */
  +    public abstract void setURIResolver(URIResolver resolver);
  +
  +    /**
  +     * Get an object that will be used to resolve URIs used in
  +     * document(), etc.
  +     *
  +     * @return An object that implements the URIResolver interface,
  +     * or null.
  +     */
  +    public abstract URIResolver getURIResolver();
  +
  +    /**
  +     * Set the output properties for the transformation.  These
  +     * properties will override properties set in the Templates
  +     * with xsl:output.
  +     *
  +     * <p>If argument to this function is null, any properties
  +     * previously set are removed, and the value will revert to the value
  +     * defined in the templates object.</p>
  +     *
  +     * <p>Pass a qualified property key name as a two-part string, the namespace URI
  +     * enclosed in curly braces ({}), followed by the local name. If the
  +     * name has a null URL, the String only contain 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 qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that
  +     * no prefix is used.</p>
  +     *
  +     * @param oformat A set of output properties that will be
  +     * used to override any of the same properties in affect
  +     * for the transformation.
  +     *
  +     * @see javax.xml.transform.OutputKeys
  +     * @see java.util.Properties
  +     *
  +     * @throws IllegalArgumentException if any of the argument keys are not
  +     * recognized and are not namespace qualified.
  +     */
  +    public abstract void setOutputProperties(Properties oformat)
  +        throws IllegalArgumentException;
  +
  +    /**
  +     * Get a copy of the output properties for the transformation.
  +     *
  +     * <p>The properties returned should contain properties set by the user,
  +     * and properties set by the stylesheet, and these properties
  +     * are "defaulted" by default properties specified by <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  +     * XSL Transformations (XSLT) W3C Recommendation</a>.  The properties that
  +     * were specifically set by the user or the stylesheet should be in the base
  +     * Properties list, while the XSLT default properties that were not
  +     * specifically set should be the default Properties list.  Thus,
  +     * getOutputProperties().getProperty(String key) will obtain any
  +     * property in that was set by {@link #setOutputProperty},
  +     * {@link #setOutputProperties}, in the stylesheet, <em>or</em> the default
  +     * properties, while
  +     * getOutputProperties().get(String key) will only retrieve properties
  +     * that were explicitly set by {@link #setOutputProperty},
  +     * {@link #setOutputProperties}, or in the stylesheet.</p>
  +     *
  +     * <p>Note that mutation of the Properties object returned will not
  +     * effect the properties that the transformation contains.</p>
  +     *
  +     * <p>If any of the argument keys are not recognized and are not
  +     * namespace qualified, the property will be ignored.  In other words the
  +     * behaviour is not orthogonal with setOutputProperties.</p>
  +     *
  +     * @returns A copy of the set of output properties in effect
  +     * for the next transformation.
  +     *
  +     * @see javax.xml.transform.OutputKeys
  +     * @see java.util.Properties
  +     */
  +    public abstract Properties getOutputProperties();
  +
  +    /**
  +     * Set an output property that will be in effect for the
  +     * transformation.
  +     *
  +     * <p>Pass a qualified property name as a two-part string, the namespace URI
  +     * enclosed in curly braces ({}), followed by the local name. If the
  +     * name has a null URL, the String only contain 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 qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that
  +     * no prefix is used.</p>
  +     *
  +     * <p>The Properties object that was passed to {@link #setOutputProperties} won't
  +     * be effected by calling this method.</p>
  +     *
  +     * @param name A non-null String that specifies an output
  +     * property name, which may be namespace qualified.
  +     * @param value The non-null string value of the output property.
  +     *
  +     * @throws IllegalArgumentException If the property is not supported, and is
  +     * not qualified with a namespace.
  +     *
  +     * @see javax.xml.transform.OutputKeys
  +     */
  +    public abstract void setOutputProperty(String name, String value)
  +        throws IllegalArgumentException;
  +
  +    /**
  +     * Get an output property that is in effect for the
  +     * transformation.  The property specified may be a property
  +     * that was set with setOutputProperty, or it may be a
  +     * property specified in the stylesheet.
  +     *
  +     * @param name A non-null String that specifies an output
  +     * property name, which may be namespace qualified.
  +     *
  +     * @return The string value of the output property, or null
  +     * if no property was found.
  +     *
  +     * @throws IllegalArgumentException If the property is not supported.
  +     *
  +     * @see javax.xml.transform.OutputKeys
  +     */
  +    public abstract String getOutputProperty(String name)
  +        throws IllegalArgumentException;
  +
  +    /**
  +     * Set the error event listener in effect for the transformation.
  +     *
  +     * @param listener The new error listener.
  +     * @throws IllegalArgumentException if listener is null.
  +     */
  +    public abstract void setErrorListener(ErrorListener listener)
  +        throws IllegalArgumentException;
  +
  +    /**
  +     * Get the error event handler in effect for the transformation.
  +     *
  +     * @return The current error handler, which should never be null.
  +     */
  +    public abstract ErrorListener getErrorListener();
   }
  
  
  
  1.4       +88 -44    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransformerConfigurationException.java	2000/12/14 00:19:24	1.3
  +++ TransformerConfigurationException.java	2000/12/20 04:55:20	1.4
  @@ -1,23 +1,69 @@
   /*
  - * $Id: TransformerConfigurationException.java,v 1.3 2000/12/14 00:19:24 sboag Exp $
  - * 
  - * Copyright (c) 1998-1999 Sun Microsystems, Inc. All Rights Reserved.
  - * 
  - * 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.
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 1999 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 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.
  + *
  + * 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, Lotus
  + * Development Corporation., http://www.lotus.com.  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;
   
   /**
    * Indicates a serious configuration error.
    */
   public class TransformerConfigurationException extends TransformerException {
  -  
  +
       /**
        * Create a new <code>TransformerConfigurationException</code> with no
        * detail mesage.
  @@ -35,7 +81,7 @@
       public TransformerConfigurationException(String msg) {
           super(msg);
       }
  -    
  +
       /**
        * Create a new <code>TransformerConfigurationException</code> with a
        * given <code>Exception</code> base cause of the error.
  @@ -59,35 +105,33 @@
       public TransformerConfigurationException(String msg, Throwable e) {
           super(msg, e);
       }
  -    
  -  /**
  -   * Create a new TransformerConfigurationException from a message and a Locator.
  -   *
  -   * <p>This constructor is especially useful when an application is
  -   * creating its own exception from within a DocumentHandler
  -   * callback.</p>
  -   *
  -   * @param message The error or warning message.
  -   * @param locator The locator object for the error or warning.
  -   */
  -  public TransformerConfigurationException(String message, SourceLocator locator) {
  -
  -    super(message, locator);
  -  }
  -
  -  /**
  -   * Wrap an existing exception in a TransformerConfigurationException.
  -   *
  -   * @param message The error or warning message, or null to
  -   *                use the message from the embedded exception.
  -   * @param locator The locator object for the error or warning.
  -   * @param e Any exception.
  -   */
  -  public TransformerConfigurationException(String message, SourceLocator locator,
  -                              Throwable e) {
  -
  -    super(message, locator, e);
  -  }
  -  
  -}
   
  +    /**
  +     * Create a new TransformerConfigurationException from a message and a Locator.
  +     *
  +     * <p>This constructor is especially useful when an application is
  +     * creating its own exception from within a DocumentHandler
  +     * callback.</p>
  +     *
  +     * @param message The error or warning message.
  +     * @param locator The locator object for the error or warning.
  +     */
  +    public TransformerConfigurationException(String message,
  +                                             SourceLocator locator) {
  +        super(message, locator);
  +    }
  +
  +    /**
  +     * Wrap an existing exception in a TransformerConfigurationException.
  +     *
  +     * @param message The error or warning message, or null to
  +     *                use the message from the embedded exception.
  +     * @param locator The locator object for the error or warning.
  +     * @param e Any exception.
  +     */
  +    public TransformerConfigurationException(String message,
  +                                             SourceLocator locator,
  +                                             Throwable e) {
  +        super(message, locator, e);
  +    }
  +}
  
  
  
  1.10      +329 -325  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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TransformerException.java	2000/12/14 00:19:24	1.9
  +++ TransformerException.java	2000/12/20 04:55:20	1.10
  @@ -54,6 +54,9 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +/**
  + * $Id: TransformerException.java,v 1.10 2000/12/20 04:55:20 sboag Exp $
  + */
   package javax.xml.transform;
   
   import java.lang.reflect.Method;
  @@ -62,338 +65,339 @@
   
   import javax.xml.transform.SourceLocator;
   
  +
   /**
  - * This class specifies an exceptional condition that occured 
  + * This class specifies an exceptional condition that occured
    * during the transformation process.
    */
  -public class TransformerException extends Exception
  -{
  +public class TransformerException extends Exception {
  +
  +    /** Field locator specifies where the error occured */
  +    SourceLocator locator;
  +
  +    /**
  +     * Method getLocator retrieves an instance of a SourceLocator
  +     * object that specifies where an error occured.
  +     *
  +     * @return A SourceLocator object, or null if none was specified.
  +     */
  +    public SourceLocator getLocator() {
  +        return locator;
  +    }
  +
  +    /**
  +     * Method setLocator sets an instance of a SourceLocator
  +     * object that specifies where an error occured.
  +     *
  +     * @param location A SourceLocator object, or null to clear the location.
  +     */
  +    public void setLocator(SourceLocator location) {
  +        locator = location;
  +    }
  +
  +    /** Field containedException specifies a wrapped exception.  May be null. */
  +    Throwable containedException;
  +
  +    /**
  +     * This method retrieves an exception that this exception wraps.
  +     *
  +     * @return An Throwable object, or null.
  +     * @see #getCause
  +     */
  +    public Throwable getException() {
  +        return containedException;
  +    }
  +
  +    /**
  +     * Returns the cause of this throwable or <code>null</code> if the
  +     * cause is nonexistent or unknown.  (The cause is the throwable that
  +     * caused this throwable to get thrown.)
  +     */
  +    public Throwable getCause() {
  +
  +        return ((containedException == this)
  +                ? null
  +                : containedException);
  +    }
  +
  +    /**
  +     * Initializes the <i>cause</i> of this throwable to the specified value.
  +     * (The cause is the throwable that caused this throwable to get thrown.)
  +     *
  +     * <p>This method can be called at most once.  It is generally called from
  +     * within the constructor, or immediately after creating the
  +     * throwable.  If this throwable was created
  +     * with {@link #TransformerException(Throwable)} or
  +     * {@link #TransformerException(String,Throwable)}, this method cannot be called
  +     * even once.
  +     *
  +     * @param  cause the cause (which is saved for later retrieval by the
  +     *         {@link #getCause()} method).  (A <tt>null</tt> value is
  +     *         permitted, and indicates that the cause is nonexistent or
  +     *         unknown.)
  +     * @return  a reference to this <code>Throwable</code> instance.
  +     * @throws IllegalArgumentException if <code>cause</code> is this
  +     *         throwable.  (A throwable cannot
  +     *         be its own cause.)
  +     * @throws IllegalStateException if this throwable was
  +     *         created with {@link #TransformerException(Throwable)} or
  +     *         {@link #TransformerException(String,Throwable)}, or this method has already
  +     *         been called on this throwable.
  +     */
  +    public synchronized Throwable initCause(Throwable cause) {
  +
  +        if (this.containedException == null) {
  +            throw new IllegalStateException("Can't overwrite cause");
  +        }
  +
  +        if (cause == this) {
  +            throw new IllegalArgumentException(
  +                "Self-causation not permitted");
  +        }
  +
  +        this.containedException = cause;
  +
  +        return this;
  +    }
  +
  +    /**
  +     * Create a new TransformerException.
  +     *
  +     * @param message The error or warning message.
  +     */
  +    public TransformerException(String message) {
  +
  +        super(message);
  +
  +        this.containedException = null;
  +        this.locator            = null;
  +    }
  +
  +    /**
  +     * Create a new TransformerException wrapping an existing exception.
  +     *
  +     * @param e The exception to be wrapped.
  +     */
  +    public TransformerException(Throwable e) {
  +
  +        super("TRaX Transform Throwable");
  +
  +        this.containedException = e;
  +        this.locator            = null;
  +    }
  +
  +    /**
  +     * Wrap an existing exception in a TransformerException.
  +     *
  +     * <p>This is used for throwing processor exceptions before
  +     * the processing has started.</p>
  +     *
  +     * @param message The error or warning message, or null to
  +     *                use the message from the embedded exception.
  +     * @param e Any exception
  +     */
  +    public TransformerException(String message, Throwable e) {
  +
  +        super(((message == null) || (message.length() == 0))
  +              ? "TRaX Transform Throwable"
  +              : message);
  +
  +        this.containedException = e;
  +        this.locator            = null;
  +    }
  +
  +    /**
  +     * Create a new TransformerException from a message and a Locator.
  +     *
  +     * <p>This constructor is especially useful when an application is
  +     * creating its own exception from within a DocumentHandler
  +     * callback.</p>
  +     *
  +     * @param message The error or warning message.
  +     * @param locator The locator object for the error or warning.
  +     */
  +    public TransformerException(String message, SourceLocator locator) {
  +
  +        super(message);
  +
  +        this.containedException = null;
  +        this.locator            = locator;
  +    }
  +
  +    /**
  +     * Wrap an existing exception in a TransformerException.
  +     *
  +     * @param message The error or warning message, or null to
  +     *                use the message from the embedded exception.
  +     * @param locator The locator object for the error or warning.
  +     * @param e Any exception
  +     */
  +    public TransformerException(String message, SourceLocator locator,
  +                                Throwable e) {
  +
  +        super(message);
  +
  +        this.containedException = e;
  +        this.locator            = locator;
  +    }
  +
  +    /**
  +     * Get the error message with location information
  +     * appended.
  +     */
  +    public String getMessageAndLocation() {
  +
  +        StringBuffer sbuffer = new StringBuffer();
  +        String       message = super.getMessage();
   
  -  /** Field locator specifies where the error occured */
  -  SourceLocator locator;
  +        if (null != message) {
  +            sbuffer.append(message);
  +        }
   
  -  /**
  -   * Method getLocator retrieves an instance of a SourceLocator
  -   * object that specifies where an error occured.
  -   *
  -   * @return A SourceLocator object, or null if none was specified.
  -   */
  -  public SourceLocator getLocator()
  -  {
  -    return locator;
  -  }
  -  
  -  /**
  -   * Method setLocator sets an instance of a SourceLocator
  -   * object that specifies where an error occured.
  -   *
  -   * @param location A SourceLocator object, or null to clear the location.
  -   */
  -  public void setLocator(SourceLocator location)
  -  {
  -    locator = location;
  -  }
  -
  -  /** Field containedException specifies a wrapped exception.  May be null. */
  -  Throwable containedException;
  -
  -  /**
  -   * This method retrieves an exception that this exception wraps.
  -   *
  -   * @return An Throwable object, or null.
  -   * @see #getCause
  -   */
  -  public Throwable getException()
  -  {
  -    return containedException;
  -  }
  -  
  -  /**
  -   * Returns the cause of this throwable or <code>null</code> if the
  -   * cause is nonexistent or unknown.  (The cause is the throwable that
  -   * caused this throwable to get thrown.)
  -   */
  -  public Throwable getCause() {
  -    return (containedException==this ? null : containedException);
  -  }
  -
  -  /**
  -   * Initializes the <i>cause</i> of this throwable to the specified value.
  -   * (The cause is the throwable that caused this throwable to get thrown.) 
  -   *
  -   * <p>This method can be called at most once.  It is generally called from 
  -   * within the constructor, or immediately after creating the
  -   * throwable.  If this throwable was created
  -   * with {@link #TransformerException(Throwable)} or
  -   * {@link #TransformerException(String,Throwable)}, this method cannot be called
  -   * even once.
  -   *
  -   * @param  cause the cause (which is saved for later retrieval by the
  -   *         {@link #getCause()} method).  (A <tt>null</tt> value is
  -   *         permitted, and indicates that the cause is nonexistent or
  -   *         unknown.)
  -   * @return  a reference to this <code>Throwable</code> instance.
  -   * @throws IllegalArgumentException if <code>cause</code> is this
  -   *         throwable.  (A throwable cannot
  -   *         be its own cause.)
  -   * @throws IllegalStateException if this throwable was
  -   *         created with {@link #TransformerException(Throwable)} or
  -   *         {@link #TransformerException(String,Throwable)}, or this method has already
  -   *         been called on this throwable.
  -   */
  -  public synchronized Throwable initCause(Throwable cause) {
  -    if (this.containedException == null)
  -      throw new IllegalStateException("Can't overwrite cause");
  -    if (cause == this)
  -      throw new IllegalArgumentException("Self-causation not permitted");
  -    this.containedException = cause;
  -    return this;
  -  }
  -
  -  /**
  -   * Create a new TransformerException.
  -   *
  -   * @param message The error or warning message.
  -   */
  -  public TransformerException(String message)
  -  {
  -
  -    super(message);
  -
  -    this.containedException = null;
  -    this.locator = null;
  -  }
  -
  -  /**
  -   * Create a new TransformerException wrapping an existing exception.
  -   *
  -   * @param e The exception to be wrapped.
  -   */
  -  public TransformerException(Throwable e)
  -  {
  -
  -    super("TRaX Transform Throwable");
  -
  -    this.containedException = e;
  -    this.locator = null;
  -  }
  -
  -  /**
  -   * Wrap an existing exception in a TransformerException.
  -   *
  -   * <p>This is used for throwing processor exceptions before
  -   * the processing has started.</p>
  -   *
  -   * @param message The error or warning message, or null to
  -   *                use the message from the embedded exception.
  -   * @param e Any exception
  -   */
  -  public TransformerException(String message, Throwable e)
  -  {
  -    super ((message == null || message.length()== 0)? 
  -           "TRaX Transform Throwable" : message);
  -      
  -
  -    this.containedException = e;
  -    this.locator = null;
  -  }
  -
  -  /**
  -   * Create a new TransformerException from a message and a Locator.
  -   *
  -   * <p>This constructor is especially useful when an application is
  -   * creating its own exception from within a DocumentHandler
  -   * callback.</p>
  -   *
  -   * @param message The error or warning message.
  -   * @param locator The locator object for the error or warning.
  -   */
  -  public TransformerException(String message, SourceLocator locator)
  -  {
  -
  -    super(message);
  -
  -    this.containedException = null;
  -    this.locator = locator;
  -  }
  -
  -  /**
  -   * Wrap an existing exception in a TransformerException.
  -   *
  -   * @param message The error or warning message, or null to
  -   *                use the message from the embedded exception.
  -   * @param locator The locator object for the error or warning.
  -   * @param e Any exception
  -   */
  -  public TransformerException(String message, SourceLocator locator,
  -                              Throwable e)
  -  {
  -
  -    super(message);
  -
  -    this.containedException = e;
  -    this.locator = locator;
  -  }
  -        
  -  /**
  -   * Get the error message with location information 
  -   * appended.
  -   */
  -  public String getMessageAndLocation()
  -  {
  -    StringBuffer sbuffer = new StringBuffer();
  -    String message = super.getMessage();    
  -    if(null != message)
  -    {
  -      sbuffer.append(message);
  -    }
  -    if(null != locator)
  -    {
  -      String systemID = locator.getSystemId();
  -      int line = locator.getLineNumber();
  -      int column = locator.getColumnNumber();
  -
  -      if(null != systemID)
  -      {
  -        sbuffer.append("; SystemID: ");
  -        sbuffer.append(systemID);
  -      }
  -      if(0 != line)
  -      {
  -        sbuffer.append("; Line#: ");
  -        sbuffer.append(line);
  -      }
  -      if(0 != column)
  -      {
  -        sbuffer.append("; Column#: ");
  -        sbuffer.append(column);
  -      }
  -    }
  -    return sbuffer.toString();
  -  }
  -  
  -  /**
  -   * Get the location information as a string.
  -   * 
  -   * @return A string with location info, or null 
  -   * if there is no location information.
  -   */
  -  public String getLocationAsString()
  -  {
  -    if(null != locator)
  -    {
  -      StringBuffer sbuffer = new StringBuffer();
  -      String systemID = locator.getSystemId();
  -      int line = locator.getLineNumber();
  -      int column = locator.getColumnNumber();
  -
  -      if(null != systemID)
  -      {
  -        sbuffer.append("; SystemID: ");
  -        sbuffer.append(systemID);
  -      }
  -      if(0 != line)
  -      {
  -        sbuffer.append("; Line#: ");
  -        sbuffer.append(line);
  -      }
  -      if(0 != column)
  -      {
  -        sbuffer.append("; Column#: ");
  -        sbuffer.append(column);
  -      }
  -      return sbuffer.toString();
  -    }
  -    else return null;
  -  }
  -  
  -  /**
  -   * Print the the trace of methods from where the error 
  -   * originated.  This will trace all nested exception 
  -   * objects, as well as this object.
  -   */
  -  public void printStackTrace() 
  -  {
  -    printStackTrace(new java.io.PrintWriter(System.err, true));
  -  }
  -  
  -  /**
  -   * Print the the trace of methods from where the error 
  -   * originated.  This will trace all nested exception 
  -   * objects, as well as this object.
  -   * @param s The stream where the dump will be sent to.
  -   */
  -  public void printStackTrace(java.io.PrintStream s) 
  -  {
  -    printStackTrace(new java.io.PrintWriter(s));
  -  }
  -
  -  /**
  -   * Print the the trace of methods from where the error 
  -   * originated.  This will trace all nested exception 
  -   * objects, as well as this object.
  -   * @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);
  -    try
  -    {
  -      String locInfo = getLocationAsString();
  -      if(null != locInfo)
  -        s.println(locInfo);
  -      super.printStackTrace(s);
  -    }
  -    catch(Throwable e)
  -    {
  -    }
  -    Throwable exception = getException();
  -    
  -    for(int i = 0; (i < 10) && (null != exception); i++)
  -    {
  -      s.println("---------");
  -      try
  -      {
  -        if(exception instanceof TransformerException)
  -        {
  -          String locInfo = ((TransformerException)exception).getLocationAsString();
  -          if(null != locInfo)
  -            s.println(locInfo);
  +        if (null != locator) {
  +            String systemID = locator.getSystemId();
  +            int    line     = locator.getLineNumber();
  +            int    column   = locator.getColumnNumber();
  +
  +            if (null != systemID) {
  +                sbuffer.append("; SystemID: ");
  +                sbuffer.append(systemID);
  +            }
  +
  +            if (0 != line) {
  +                sbuffer.append("; Line#: ");
  +                sbuffer.append(line);
  +            }
  +
  +            if (0 != column) {
  +                sbuffer.append("; Column#: ");
  +                sbuffer.append(column);
  +            }
           }
  -        exception.printStackTrace(s);
  -      }
  -      catch(Throwable e)
  -      {
  -        s.println("Could not print stack trace...");
  -      }
  -      try
  -      {
  -        Method meth = ((Object)exception).getClass().getMethod("getException", null);
  -        if(null != meth)
  -        {
  -          Throwable prev = exception;
  -          exception = (Throwable)meth.invoke(exception, null);
  -          if(prev == exception)
  -            break;
  +
  +        return sbuffer.toString();
  +    }
  +
  +    /**
  +     * Get the location information as a string.
  +     *
  +     * @return A string with location info, or null
  +     * if there is no location information.
  +     */
  +    public String getLocationAsString() {
  +
  +        if (null != locator) {
  +            StringBuffer sbuffer  = new StringBuffer();
  +            String       systemID = locator.getSystemId();
  +            int          line     = locator.getLineNumber();
  +            int          column   = locator.getColumnNumber();
  +
  +            if (null != systemID) {
  +                sbuffer.append("; SystemID: ");
  +                sbuffer.append(systemID);
  +            }
  +
  +            if (0 != line) {
  +                sbuffer.append("; Line#: ");
  +                sbuffer.append(line);
  +            }
  +
  +            if (0 != column) {
  +                sbuffer.append("; Column#: ");
  +                sbuffer.append(column);
  +            }
  +
  +            return sbuffer.toString();
  +        } else {
  +            return null;
  +        }
  +    }
  +
  +    /**
  +     * Print the the trace of methods from where the error
  +     * originated.  This will trace all nested exception
  +     * objects, as well as this object.
  +     */
  +    public void printStackTrace() {
  +        printStackTrace(new java.io.PrintWriter(System.err, true));
  +    }
  +
  +    /**
  +     * Print the the trace of methods from where the error
  +     * originated.  This will trace all nested exception
  +     * objects, as well as this object.
  +     * @param s The stream where the dump will be sent to.
  +     */
  +    public void printStackTrace(java.io.PrintStream s) {
  +        printStackTrace(new java.io.PrintWriter(s));
  +    }
  +
  +    /**
  +     * Print the the trace of methods from where the error
  +     * originated.  This will trace all nested exception
  +     * objects, as well as this object.
  +     * @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);
           }
  -        else
  -        {
  -          exception = null;
  +
  +        try {
  +            String locInfo = getLocationAsString();
  +
  +            if (null != locInfo) {
  +                s.println(locInfo);
  +            }
  +
  +            super.printStackTrace(s);
  +        } catch (Throwable e) {}
  +
  +        Throwable exception = getException();
  +
  +        for (int i = 0; (i < 10) && (null != exception); i++) {
  +            s.println("---------");
  +
  +            try {
  +                if (exception instanceof TransformerException) {
  +                    String locInfo =
  +                        ((TransformerException) exception)
  +                            .getLocationAsString();
  +
  +                    if (null != locInfo) {
  +                        s.println(locInfo);
  +                    }
  +                }
  +
  +                exception.printStackTrace(s);
  +            } catch (Throwable e) {
  +                s.println("Could not print stack trace...");
  +            }
  +
  +            try {
  +                Method meth =
  +                    ((Object) exception).getClass().getMethod("getException",
  +                        null);
  +
  +                if (null != meth) {
  +                    Throwable prev = exception;
  +
  +                    exception = (Throwable) meth.invoke(exception, null);
  +
  +                    if (prev == exception) {
  +                        break;
  +                    }
  +                } else {
  +                    exception = null;
  +                }
  +            } catch (InvocationTargetException ite) {
  +                exception = null;
  +            } catch (IllegalAccessException iae) {
  +                exception = null;
  +            } catch (NoSuchMethodException nsme) {
  +                exception = null;
  +            }
           }
  -      }
  -      catch(InvocationTargetException ite)
  -      {
  -        exception = null;
  -      }
  -      catch(IllegalAccessException iae)
  -      {
  -        exception = null;
  -      }
  -      catch(NoSuchMethodException nsme)
  -      {
  -        exception = null;
  -      }
       }
  -  }
   }
  
  
  
  1.13      +333 -324  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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TransformerFactory.java	2000/12/14 00:19:24	1.12
  +++ TransformerFactory.java	2000/12/20 04:55:20	1.13
  @@ -54,6 +54,9 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +/**
  + * $Id: TransformerFactory.java,v 1.13 2000/12/20 04:55:20 sboag Exp $
  + */
   package javax.xml.transform;
   
   import java.io.IOException;
  @@ -66,6 +69,7 @@
   import java.util.Properties;
   import java.util.Enumeration;
   
  +
   /**
    * A TransformerFactory instance can be used to create Transformer and Template
    * objects.
  @@ -75,339 +79,344 @@
    * property names a concrete subclass of the TransformerFactory abstract
    *  class. If the property is not defined, a platform default is be used.</p>
    */
  -public abstract class TransformerFactory
  -{
  +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.
  -   */
  -  protected TransformerFactory(){}
  -
  -  /**
  -   * Obtain a new instance of a <code>Transform Factory</code>.
  -   * This static method creates a new factory instance based
  -   * on a system property setting or (if this property is not defined)
  -   * the platform default.<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 hte property is not defined, a platform default
  -   * is used.</p>
  -   *
  -   * Once an application has obtained a reference to a <code>
  -   * TransformerFactory</code> it can use the factory to configure
  -   * and obtain parser instances.
  -   *
  -   * @return new TransformerFactory instance, never null.
  -   *
  -   * @throws TransformerFactoryConfigurationError
  -   * 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");
  -    }
  +    /** The default property name according to the JAXP spec. */
  +    private static final String defaultPropName =
  +        "javax.xml.transform.TransformerFactory";
  +
  +    /**
  +     * Default constructor is protected on purpose.
  +     */
  +    protected TransformerFactory() {}
  +
  +    /**
  +     * Obtain a new instance of a <code>TransformerFactory</code>.
  +     * 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:
  +     * <ul>
  +     * <li>
  +     * Use the <code>javax.xml.parsers.DocumentBuilderFactory</code> system
  +     * 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.
  +     * </li>
  +     * <li>
  +     * Use the Services API (as detailed in teh 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.TransformerFactory</code>
  +     * in jars available to the runtime.
  +     * </li>
  +     * <li>
  +     * Platform default <code>TransformerFactory</code> instance.
  +     * </li>
  +     * </ul>
  +     *
  +     * Once an application has obtained a reference to a <code>
  +     * TransformerFactory</code> it can use the factory to configure
  +     * and obtain parser instances.
  +     *
  +     * @return new TransformerFactory instance, never null.
  +     *
  +     * @throws TransformerFactoryConfigurationError
  +     * 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;
  +        TransformerFactory factoryImpl;
   
  -    try
  -    {
  -      Class clazz = Class.forName(classname);
  +        try {
  +            Class clazz = Class.forName(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);
  +            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 factoryImpl;
       }
   
  -    return factoryImpl;
  -  }
  +    /**
  +     * Process the Source into a Transformer object.  Care must
  +     * be given not to use this object in multiple threads running concurrently.
  +     * Different TransformerFactories can be used concurrently by different
  +     * threads.
  +     *
  +     * @param source An object that holds a URI, input stream, etc.
  +     *
  +     * @return A Transformer object that may be used to perform a transformation
  +     * in a single thread, never null.
  +     *
  +     * @exception TransformerConfigurationException May throw this during the parse
  +     *            when it is constructing the Templates object and fails.
  +     */
  +    public abstract Transformer newTransformer(Source source)
  +        throws TransformerConfigurationException;
  +
  +    /**
  +     * Create a new Transformer object that performs a copy
  +     * of the source to the result.
  +     *
  +     * @param source An object that holds a URI, input stream, etc.
  +     *
  +     * @return A Transformer object that may be used to perform a transformation
  +     * in a single thread, never null.
  +     *
  +     * @exception TransformerConfigurationException May throw this during
  +     *            the parse when it is constructing the
  +     *            Templates object and fails.
  +     */
  +    public abstract Transformer newTransformer()
  +        throws TransformerConfigurationException;
  +
  +    /**
  +     * Process the Source into a Templates object, which is a
  +     * a compiled representation of the source. This Templates object
  +     * may then be used concurrently across multiple threads.  Creating
  +     * a Templates object allows the TransformerFactory to do detailed
  +     * performance optimization of transformation instructions, without
  +     * penalizing runtime transformation.
  +     *
  +     * @param source An object that holds a URL, input stream, etc.
  +     *
  +     * @return A Templates object capable of being used for transformation purposes,
  +     * never null.
  +     *
  +     * @exception TransformerConfigurationException May throw this during the parse when it
  +     *            is constructing the Templates object and fails.
  +     */
  +    public abstract Templates newTemplates(Source source)
  +        throws TransformerConfigurationException;
  +
  +    /**
  +     * Get the stylesheet specification(s) associated
  +     * via the xml-stylesheet processing instruction (see
  +     * http://www.w3.org/TR/xml-stylesheet/) with the document
  +     * document specified in the source parameter, and that match
  +     * the given criteria.  Note that it is possible to return several
  +     * stylesheets, in which case they are applied as if they were
  +     * a list of imports or cascades in a single stylesheet.
  +     *
  +     * @param source The XML source document.
  +     * @param media The media attribute to be matched.  May be null, in which
  +     *              case the prefered templates will be used (i.e. alternate = no).
  +     * @param title The value of the title attribute to match.  May be null.
  +     * @param charset The value of the charset attribute to match.  May be null.
  +     *
  +     * @return A Source object suitable for passing to the TransformerFactory.
  +     *
  +     * @throws TransformerConfigurationException.
  +     */
  +    public abstract Source getAssociatedStylesheet(
  +        Source source, String media, String title, String charset)
  +            throws TransformerConfigurationException;
  +
  +    /**
  +     * Set an object that is used by default during the transformation
  +     * to resolve URIs used in xsl:import, or xsl:include.
  +     *
  +     * @param resolver An object that implements the URIResolver interface,
  +     * or null.
  +     */
  +    public abstract void setURIResolver(URIResolver resolver);
  +
  +    /**
  +     * Get the object that is used by default during the transformation
  +     * to resolve URIs used in document(), xsl:import, or xsl:include.
  +     *
  +     * @return The URIResolver that was set with setURIResolver.
  +     */
  +    public abstract URIResolver getURIResolver();
  +
  +    //======= CONFIGURATION METHODS =======
  +
  +    /**
  +     * Look up the value of a feature.
  +     *
  +     * <p>The feature name is any absolute URI.</p>
  +     * @param name The feature name, which is an absolute URI.
  +     * @return The current state of the feature (true or false).
  +     */
  +    public abstract boolean getFeature(String name);
  +
  +    /**
  +     * Allows the user to set specific attributes on the underlying
  +     * implementation.  An attribute in this context is defined to
  +     * be an option that the implementation provides.
  +     *
  +     * @param name The name of the attribute.
  +     * @param value The value of the attribute.
  +     * @throws IllegalArgumentException thrown if the underlying
  +     * implementation doesn't recognize the attribute.
  +     */
  +    public abstract void setAttribute(String name, Object value)
  +        throws IllegalArgumentException;
  +
  +    /**
  +     * 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.
  +     * @throws IllegalArgumentException thrown if the underlying
  +     * implementation doesn't recognize the attribute.
  +     */
  +    public abstract Object getAttribute(String name)
  +        throws IllegalArgumentException;
  +
  +    /**
  +     * Set the error event listener for the TransformerFactory, which
  +     * is used for the processing of transformation instructions,
  +     * and not for the transformation itself.
  +     *
  +     * @param listener The new error listener.
  +     * @throws IllegalArgumentException if listener is null.
  +     */
  +    public abstract void setErrorListener(ErrorListener listener)
  +        throws IllegalArgumentException;
  +
  +    /**
  +     * Get the error event handler for the TransformerFactory.
  +     *
  +     * @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 final boolean debug = System.getProperty("jaxp.debug")
  +                                         != null;
  +
  +    /**
  +     * 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 = System.getProperty(factoryId);
  +
  +            if (systemProp != null) {
  +                if (debug) {
  +                    System.err.println("JAXP: found system property"
  +                                       + systemProp);
  +                }
  +
  +                return systemProp;
  +            }
  +        } catch (SecurityException se) {}
   
  -  /**
  -   * Process the Source into a Transformer object.  Care must
  -   * be given not to use this object in multiple threads running concurrently.
  -   * Different TransformerFactories can be used concurrently by different 
  -   * threads.
  -   *
  -   * @param source An object that holds a URI, input stream, etc.
  -   *
  -   * @return A Transformer object that may be used to perform a transformation
  -   * in a single thread, never null.
  -   *
  -   * @exception TransformerConfigurationException May throw this during the parse 
  -   *            when it is constructing the Templates object and fails.
  -   */
  -  public abstract Transformer newTransformer(Source source)
  -    throws TransformerConfigurationException;
  -
  -  /**
  -   * Create a new Transformer object that performs a copy
  -   * of the source to the result.
  -   *
  -   * @param source An object that holds a URI, input stream, etc.
  -   *
  -   * @return A Transformer object that may be used to perform a transformation
  -   * in a single thread, never null.
  -   *
  -   * @exception TransformerConfigurationException May throw this during
  -   *            the parse when it is constructing the
  -   *            Templates object and fails.
  -   */
  -  public abstract Transformer newTransformer()
  -    throws TransformerConfigurationException;
  -
  -  /**
  -   * Process the Source into a Templates object, which is a
  -   * a compiled representation of the source. This Templates object
  -   * may then be used concurrently across multiple threads.  Creating
  -   * a Templates object allows the TransformerFactory to do detailed
  -   * performance optimization of transformation instructions, without
  -   * penalizing runtime transformation.
  -   *
  -   * @param source An object that holds a URL, input stream, etc.
  -   *
  -   * @return A Templates object capable of being used for transformation purposes,
  -   * never null.
  -   *
  -   * @exception TransformerConfigurationException May throw this during the parse when it
  -   *            is constructing the Templates object and fails.
  -   */
  -  public abstract Templates newTemplates(Source source)
  -    throws TransformerConfigurationException;
  -  
  -  /**
  -   * Get the stylesheet specification(s) associated 
  -   * via the xml-stylesheet processing instruction (see
  -   * http://www.w3.org/TR/xml-stylesheet/) with the document
  -   * document specified in the source parameter, and that match
  -   * the given criteria.  Note that it is possible to return several 
  -   * stylesheets, in which case they are applied as if they were
  -   * a list of imports or cascades in a single stylesheet.
  -   *
  -   * @param source The XML source document.
  -   * @param media The media attribute to be matched.  May be null, in which
  -   *              case the prefered templates will be used (i.e. alternate = no).
  -   * @param title The value of the title attribute to match.  May be null.
  -   * @param charset The value of the charset attribute to match.  May be null.
  -   *
  -   * @return A Source object suitable for passing to the TransformerFactory.
  -   *
  -   * @throws TransformerConfigurationException.
  -   */
  -  public abstract Source getAssociatedStylesheet(
  -    Source source, String media, String title, String charset)
  -      throws TransformerConfigurationException;
  -
  -  /**
  -   * Set an object that is used by default during the transformation 
  -   * to resolve URIs used in xsl:import, or xsl:include.
  -   * 
  -   * @param resolver An object that implements the URIResolver interface,
  -   * or null.
  -   */
  -  public abstract void setURIResolver(URIResolver resolver);
  -
  -  /**
  -   * Get the object that is used by default during the transformation 
  -   * to resolve URIs used in document(), xsl:import, or xsl:include.
  -   *
  -   * @return The URIResolver that was set with setURIResolver.
  -   */
  -  public abstract URIResolver getURIResolver();
  -
  -  //======= CONFIGURATION METHODS =======
  -
  -  /**
  -   * Look up the value of a feature.
  -   *
  -   * <p>The feature name is any absolute URI.</p>
  -   * @param name The feature name, which is an absolute URI.
  -   * @return The current state of the feature (true or false).
  -   */
  -  public abstract boolean getFeature(String name);
  -
  -  /**
  -   * Allows the user to set specific attributes on the underlying
  -   * implementation.  An attribute in this context is defined to 
  -   * be an option that the implementation provides.
  -   * 
  -   * @param name The name of the attribute.
  -   * @param value The value of the attribute.
  -   * @throws IllegalArgumentException thrown if the underlying
  -   * implementation doesn't recognize the attribute.
  -   */
  -  public abstract void setAttribute(String name, Object value)
  -    throws IllegalArgumentException;
  -
  -  /**
  -   * 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.
  -   * @throws IllegalArgumentException thrown if the underlying
  -   * implementation doesn't recognize the attribute.
  -   */
  -  public abstract Object getAttribute(String name)
  -    throws IllegalArgumentException;
  -  
  -  /**
  -   * Set the error event listener for the TransformerFactory, which  
  -   * is used for the processing of transformation instructions, 
  -   * and not for the transformation itself.
  -   *
  -   * @param listener The new error listener.
  -   * @throws IllegalArgumentException if listener is null.
  -   */
  -  public abstract void setErrorListener (ErrorListener listener)
  -    throws IllegalArgumentException;
  -
  -  /**
  -   * Get the error event handler for the TransformerFactory.
  -   *
  -   * @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 final boolean debug = System.getProperty("jaxp.debug")
  -                                       != null;
  -
  -  /**
  -   * 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 =
  -        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/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();
  -    }
  +        if (foundFactory != null) {
  +            return foundFactory;
  +        }
   
  -    String serviceId = "META-INF/services/" + factoryId;
  +        // 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();
  +            }
  +        }
   
  -    // 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;
  +        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();
  +            }
           }
  -      }
  -    }
  -    catch (Exception ex)
  -    {
  -      if (debug)
  -        ex.printStackTrace();
  -    }
   
  -    return defaultFactory;
  -  }
  +        return defaultFactory;
  +    }
   }
  
  
  
  1.2       +75 -41    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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TransformerFactoryConfigurationError.java	2000/12/14 18:37:42	1.1
  +++ TransformerFactoryConfigurationError.java	2000/12/20 04:55:20	1.2
  @@ -1,22 +1,62 @@
   /*
  - * $Id: TransformerFactoryConfigurationError.java,v 1.1 2000/12/14 18:37:42 sboag Exp $
  - * 
  - * Copyright (c) 1998-1999 Sun Microsystems, Inc. All Rights Reserved.
  - * 
  - * 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.
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 1999 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 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.
  + *
  + * 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, Lotus
  + * Development Corporation., http://www.lotus.com.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
    */
  -
  +/*
  + * $Id: TransformerFactoryConfigurationError.java,v 1.2 2000/12/20 04:55:20 sboag Exp $
  + */
   package javax.xml.transform;
   
   /**
  @@ -33,11 +73,12 @@
        * Create a new <code>TransformerFactoryConfigurationError</code> with no
        * detail mesage.
        */
  +    public TransformerFactoryConfigurationError() {
  +
  +        super();
   
  -     public TransformerFactoryConfigurationError() {
  -         super();
  -    	 this.exception = null; 
  -     }
  +        this.exception = null;
  +    }
   
       /**
        * Create a new <code>TransformerFactoryConfigurationError</code> with
  @@ -45,13 +86,13 @@
        *
        * @param msg The error message for the exception.
        */
  -    
       public TransformerFactoryConfigurationError(String msg) {
  +
           super(msg);
  +
           this.exception = null;
       }
   
  -
       /**
        * Create a new <code>TransformerFactoryConfigurationError</code> with a
        * given <code>Exception</code> base cause of the error.
  @@ -59,9 +100,10 @@
        * @param e The exception to be encapsulated in a
        * TransformerFactoryConfigurationError.
        */
  -    
       public TransformerFactoryConfigurationError(Exception e) {
  +
           super();
  +
           this.exception = e;
       }
   
  @@ -74,13 +116,13 @@
        * @param msg The detail message.
        * @param e The exception to be wrapped in a TransformerFactoryConfigurationError
        */
  -    
       public TransformerFactoryConfigurationError(Exception e, String msg) {
  +
           super(msg);
  +
           this.exception = e;
       }
   
  -
       /**
        * Return the message (if any) for this error . If there is no
        * message for the exception and there is an encapsulated
  @@ -88,32 +130,24 @@
        *
        * @return The error message.
        */
  -    
  -    public String getMessage () {
  -        String message = super.getMessage ();
  -  
  -        if (message == null && exception != null) {
  +    public String getMessage() {
  +
  +        String message = super.getMessage();
  +
  +        if ((message == null) && (exception != null)) {
               return exception.getMessage();
           }
   
           return message;
       }
  -  
  +
       /**
        * Return the actual exception (if any) that caused this exception to
        * be raised.
        *
        * @return The encapsulated exception, or null if there is none.
        */
  -    
  -    public Exception getException () {
  +    public Exception getException() {
           return exception;
       }
   }
  -
  -
  -
  -
  -
  -
  -
  
  
  
  1.4       +21 -18    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- URIResolver.java	2000/11/14 17:02:39	1.3
  +++ URIResolver.java	2000/12/20 04:55:20	1.4
  @@ -54,28 +54,31 @@
    * 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;
   
   /**
  - * <p>An object that implements this interface that can be called by the processor 
  + * <p>An object that implements this interface that can be called by the processor
    * to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
    */
  -public interface URIResolver
  -{
  +public interface URIResolver {
   
  -  /**
  -   * Called by the processor when it encounters
  -   * an xsl:include, xsl:import, or document() function.
  -   *
  -   * @param href An href attribute, which may be relative or absolute.
  -   * @param base The base URI in effect when the href attribute 
  -   * was encountered.
  -   *
  -   * @return A Source object, or null if the href cannot be resolved, 
  -   * and the processor should try to resolve the URI itself.
  -   *
  -   * @throws TransformerException if an error occurs when trying to 
  -   * resolve the URI.
  -   */
  -  public Source resolve(String href, String base) throws TransformerException;
  +    /**
  +     * Called by the processor when it encounters
  +     * an xsl:include, xsl:import, or document() function.
  +     *
  +     * @param href An href attribute, which may be relative or absolute.
  +     * @param base The base URI in effect when the href attribute
  +     * was encountered.
  +     *
  +     * @return A Source object, or null if the href cannot be resolved,
  +     * and the processor should try to resolve the URI itself.
  +     *
  +     * @throws TransformerException if an error occurs when trying to
  +     * resolve the URI.
  +     */
  +    public Source resolve(String href, String base)
  +        throws TransformerException;
   }
  
  
  
  1.5       +2 -64     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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- overview.html	2000/12/14 00:19:24	1.4
  +++ overview.html	2000/12/20 04:55:20	1.5
  @@ -6,12 +6,8 @@
   </head>
   <body> 
     
  -<h2>Transformation API For XML (TrAX)</h2> 
  +<h2>Transformation API For XML </h2> 
     
  -<p>
  -<b>Edit Date: </b>November 12, 2000</p> 
  -   
  -    
     
   <h3>Introduction</h3> 
     
  @@ -147,64 +143,6 @@
   </ul> 
      
     
  -<h3>Requirements</h3> 
  -  
  -<p>The following requirements have been determined from broad experience
  -	 with XML projects from the various members participating on the JCP.</p> 
  -  
  -<ol>
  -<li>TrAX must provide a clean, simple
  -		interface for simple uses.</li>
  -<li>TrAX must be powerful enough to be
  -		applied to a wide range of uses, such as, e-commerce, content management,
  -		server content delivery, and client applications.</li>
  -<li>A processor that implements a TrAX
  -		interface must be optimizeable. Performance is a critical issue for most
  -		transformation use cases.</li>
  -<li>As a specialization of the above
  -		requirement, a TrAX processor must be able to support a compiled model, so that
  -		a single set of transformation instructions can be compiled, optimized, and
  -		applied to a large set of input sources.</li>
  -<li>TrAX must not be dependent an any
  -		given type of transformation instructions. For instance, it must remain
  -		independent of <A href="http://www.w3.org/TR/xslt">XSLT</A>.</li>
  -<li>TrAX must be able to allow processors
  -		to transform DOM trees.</li>
  -<li>TrAX must be able to allow processors to
  -		produce DOM trees.</li>
  -<li>TrAX must allow processors to transform
  -		SAX events.</li>
  -<li>TrAX must allow processors to produce SAX
  -		events.</li>
  -<li>TrAX must allow processors to
  -		transform streams of XML.</li>
  -<li>TrAX must allow processors to produce
  -		XML, HTML, and other types of streams.</li>
  -<li>TrAX must allow processors to
  -		implement the various combinations of inputs and outputs within a single
  -		processor.</li>
  -<li>TrAX must allow processors
  -		to implement only a limited set of inputs. For instance, it should be possible
  -		to write a processor that implements the TrAX interfaces and that only
  -		processes DOM trees, not streams or SAX events.</li>
  -<li>TrAX should allow a
  -		processor to implement transformations of proprietary data structures. For
  -		instance, it should be possible to implement a processor that provides TrAX
  -		interfaces that performs transformation of JDOM trees.</li>
  -<li>TrAX must allow the setting
  -		of serialization properties, without constraint as to what the details of those
  -		properties are.</li>
  -<li>TrAX must allow the setting
  -		of parameters to the transformation instructions.</li>
  -<li>TrAX must support the
  -		setting of parameters and properties as XML Namespaced items (i.e., qualified
  -		names).</li>
  -<li>TrAX must support URL
  -		resolution from within the transformation, and have it return the needed data
  -		structure.</li>
  -<li>TrAX must have a mechanism for
  -		reporting errors and warnings to the calling application.</li>
  -</ol>   
     
   <h3>Model</h3> 
     
  @@ -234,7 +172,7 @@
     
   <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
  -	 <U>serialization</U>. We believe this is the most suitable term for
  +	 <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>
  
  
  
  1.8       +13 -102   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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- package.html	2000/12/14 00:19:24	1.7
  +++ package.html	2000/12/20 04:55:20	1.8
  @@ -12,45 +12,27 @@
   		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, TrAX defines specializations
  -		of the interfaces found at the TrAX root level. These interfaces are found in
  +<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>
  -<p>The following illustrates a simple transformation from input URI to
  -		result stream.</p>
  -<code>
  -<pre>    // Create a transform factory instance.
  -    TransformerFactory tfactory = TransformerFactory.newInstance();
  -    
  -    // Create a transformer for the stylesheet.
  -    Transformer transformer 
  -      = tfactory.newTransformer(new StreamSource(xslID));
  -    
  -    // Transform the source XML to System.out.
  -    transformer.transform( new StreamSource(sourceID),
  -                           new StreamResult(System.out));
  -</pre>
  -</code> 
   		
   <h3>Creating Objects</h3> 
   		
  -<p>TrAX allows a concrete
  +<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> 
  +		  {@link javax.xml.transform.TransformerFactory#newInstance}.
   	  
   		
   <h3>Specification of Inputs and Outputs</h3> 
   		
  -<p>TrAX defines two interface objects called
  +<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 TrAX interfaces, concrete classes must be used. TrAX defines
  -		  three concrete representations for each of these objects:
  +		  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
  @@ -103,7 +85,7 @@
   	 
   <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 TrAX Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo".
  +		then the Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo".
   		Note that the prefix is lost.</p> 
      
   	 
  @@ -117,7 +99,7 @@
   		{@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
  +		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> 
   	 
  @@ -127,25 +109,13 @@
   		{@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. The
  -		following example illustrates the serialization of a DOM node to an XML
  -		stream.</p> 
  +		events or to create an XML or HTML stream from a DOM or SAX events.  </p> 
   	 
  -<code>
  -<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();    
  -    Transformer serializer = tfactory.newTransformer();
  -    Properties oprops = new Properties();
  -    oprops.put("method", "html");
  -    oprops.put("indent-amount", "2");
  -    serializer.setOutputProperties(oprops);
  -    serializer.transform(new DOMSource(doc), 
  -                         new StreamResult(System.out));</pre>
  -</code> 
    
     
   <h3>Exceptions and Error Reporting</h3> 
     
  -<p>The TrAX APIs throw three types of specialized exceptions. A
  +<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
  @@ -188,7 +158,7 @@
     
   <h3>Resolution of URIs within a transformation</h3> 
     
  -<p>TrAX provides a way for URIs referenced from within the stylesheet
  +<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,
  @@ -202,65 +172,6 @@
   	 The returned {@link javax.xml.transform.Source} object must be usable by
   	 the transformer, as specified in its implemented features.</p> 
     
  -<p>The following example illustrates the use of the URI resolver to
  -	 resolve URIs to DOM nodes, in a transformation whose input is totally DOM
  -	 based.</p> 
  -  
  -<code>
  -<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  -
  -    if (tfactory.getFeature(DOMSource.FEATURE) &amp;&amp; tfactory.getFeature(StreamResult.FEATURE))
  -    {
  -      DocumentBuilderFactory dfactory =
  -                                       DocumentBuilderFactory.newInstance();
  -      dfactory.setNamespaceAware(true); // Always, required for XSLT
  -      DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
  -      
  -      // Set up to resolve URLs that correspond to our inc1.xsl, 
  -      // to a DOM node. Use an anonymous class for the URI resolver.
  -      final Node xslInc1 = docBuilder.parse("xsl/inc1/inc1.xsl");
  -      final Node xslInc2 = docBuilder.parse("xsl/inc2/inc2.xsl");
  -      tfactory.setURIResolver(new URIResolver() { 
  -        public Source resolve(String href, String base) 
  -        throws TransformerException
  -        {
  -        // ignore base because we're lazy, or we don't care.
  -        return (href.equals("inc1/inc1.xsl"))  
  -        ? new DOMSource(xslInc1) : 
  -          (href.equals("inc2/inc2.xsl")) 
  -          ? new DOMSource(xslInc2) : null;
  -        }});
  -
  -      // The TransformerFactory will call the anonymous URI 
  -      // resolver set above when it encounters 
  -      // &lt;xsl:include href="inc1/inc1.xsl"/&gt;
  -      Templates templates 
  -        = tfactory.newTemplates(new DOMSource(docBuilder.parse(xslID), xslID));
  -
  -      // Get a transformer from the templates.
  -      Transformer transformer = templates.newTransformer();
  -      
  -      // Set up to resolve URLs that correspond to our foo2.xml, to 
  -      // a DOM node.  Use an anonymous class for the URI resolver.
  -      // Be sure to return the same DOM tree every time for the 
  -      // given URI.
  -      final Node xmlSubdir1Foo2Node = docBuilder.parse("xml/subdir1/foo2.xml");
  -      transformer.setURIResolver(new URIResolver() { 
  -        public Source resolve(String href, String base) 
  -        throws TransformerException
  -        {
  -        // ignore base because we're lazy, or we don't care.
  -        return (href.equals("subdir1/foo2.xml"))  
  -        ? new DOMSource(xmlSubdir1Foo2Node) : null;
  -        }});
  -
  -      // Now the transformer will call our anonymous URI resolver 
  -      // when it encounters the document('subdir1/foo2.xml') invocation.
  -      transformer.transform(new DOMSource(docBuilder.parse(sourceID), sourceID), 
  -                            new StreamResult(System.out));
  -    }
  -</pre>
  -</code>
   
   </body>
   </html>
  
  
  
  1.6       +14 -11    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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DOMLocator.java	2000/12/13 04:15:33	1.5
  +++ DOMLocator.java	2000/12/20 04:55:24	1.6
  @@ -54,26 +54,29 @@
    * 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;
   
   import org.w3c.dom.Node;
   
  +
   /**
  - * Indicates the position of a node in a source DOM, intended  
  - * primarily for error reporting.  To use a DOMLocator, the receiver of an 
  + * 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, 
  + * A 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
  -{
  +public interface DOMLocator extends SourceLocator {
   
  -  /**
  -   * Return the node where the event occurred.
  -   *
  -   * @return The node that is the location for the event.
  -   */
  -  public Node getOriginatingNode();
  +    /**
  +     * Return the node where the event occurred.
  +     *
  +     * @return The node that is the location for the event.
  +     */
  +    public Node getOriginatingNode();
   }
  
  
  
  1.9       +111 -118  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DOMResult.java	2000/12/15 21:04:00	1.8
  +++ DOMResult.java	2000/12/20 04:55:24	1.9
  @@ -54,6 +54,9 @@
    * 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;
   
   import javax.xml.transform.*;
  @@ -65,126 +68,116 @@
   
   import org.w3c.dom.Node;
   
  +
   /**
  - * Acts as a holder for a transformation result tree, in the 
  - * form of a Document Object Model (DOM) tree. If no output DOM source is set, 
  - * the transformation will create a Document node as the holder 
  - * for the result of the transformation, which may be retrieved 
  + * Acts as a holder for a transformation result tree, in the
  + * form of a Document Object Model (DOM) tree. If no output DOM source is set,
  + * the transformation will create a Document node as the holder
  + * for the result of the transformation, which may be retrieved
    * with getNode.
    */
  -public class DOMResult implements Result
  -{
  -  /** If {@link javax.xml.transform.TransformerFactory#getFeature} 
  -   * returns true when passed this value as an argument,
  -   * the Transformer supports Result output of this type.
  -   */
  -  public static final String FEATURE 
  -    = "http://javax.xml.transform.dom.DOMResult/feature";
  -
  -  /**
  -   * Zero-argument default constructor. If this is used, and 
  -   * no DOM source is set, then the Transformer will 
  -   * create an empty source Document using 
  -   * {@link javax.xml.parsers.DocumentBuilder#newDocument}.
  -   */
  -  public DOMResult(){}
  -
  -  /**
  -   * Use a DOM node to create a new output target. In practice, 
  -   * the node should be a {@link org.w3c.dom.Document} node, 
  -   * a {@link org.w3c.dom.DocumentFragment} node, or a 
  -   * {@link org.w3c.dom.Element} node.  In other words, a node 
  -   * that accepts children.
  -   *
  -   * @param n The DOM node that will contain the result tree.
  -   */
  -  public DOMResult(Node node)
  -  {
  -    setNode(node);
  -  }
  -
  -  /**
  -   * Create a new output target with a DOM node. In practice, 
  -   * the node should be a {@link org.w3c.dom.Document} node, 
  -   * a {@link org.w3c.dom.DocumentFragment} node, or a 
  -   * {@link org.w3c.dom.Element} node.  In other words, a node 
  -   * that accepts children.
  -   *
  -   * @param node The DOM node that will contain the result tree.
  -   * @param systemID The system identifier which may be used in association 
  -   * with this node.
  -   */
  -  public DOMResult(Node node, String systemID)
  -  {
  -    setNode(node);
  -    setSystemId(systemID);
  -  }
  -
  -  /**
  -   * Set the node that will contain the result DOM tree.  In practice, 
  -   * the node should be a {@link org.w3c.dom.Document} node, 
  -   * a {@link org.w3c.dom.DocumentFragment} node, or a 
  -   * {@link org.w3c.dom.Element} node.  In other words, a node 
  -   * that accepts children.
  -   *
  -   * @param node The node to which the transformation 
  -   * will be appended.
  -   */
  -  public void setNode(Node node)
  -  {
  -    this.node = node;
  -  }
  -
  -  /**
  -   * Get the node that will contain the result DOM tree. 
  -   * If no node was set via setNode, the node will be 
  -   * set by the transformation, and may be obtained from 
  -   * this method once the transformation is complete.
  -   *
  -   * @return The node to which the transformation 
  -   * will be appended.
  -   */
  -  public Node getNode()
  -  {
  -    return node;
  -  }
  -  
  -  /**
  -   * Method setSystemId Set the systemID that may be used in association
  -   * with the node.
  -   *
  -   * @param systemId The system identifier as a URI string.
  -   */
  -  public void setSystemId(String systemId)
  -  {
  -    this.systemId = systemId;
  -  }
  -
  -  /**
  -   * Get the system identifier that was set with setSystemId.
  -   *
  -   * @return The system identifier that was set with setSystemId, or null
  -   * if setSystemId was not called.
  -   */
  -  public String getSystemId()
  -  {
  -    return systemId;
  -  }
  -
  -
  -  //////////////////////////////////////////////////////////////////////
  -  // Internal state.
  -  //////////////////////////////////////////////////////////////////////
  -
  -  /**
  -   * The node to which the transformation will be appended.
  -   */
  -  private Node node;
  -  
  -  /**
  -   * The systemID that may be used in association
  -   * with the node.
  -   */
  -  private String systemId;
  +public class DOMResult implements Result {
   
  +    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +     * returns true when passed this value as an argument,
  +     * the Transformer supports Result output of this type.
  +     */
  +    public static final String FEATURE =
  +        "http://javax.xml.transform.dom.DOMResult/feature";
  +
  +    /**
  +     * Zero-argument default constructor.
  +     */
  +    public DOMResult() {}
  +
  +    /**
  +     * Use a DOM node to create a new output target. In practice,
  +     * the node should be a {@link org.w3c.dom.Document} node,
  +     * a {@link org.w3c.dom.DocumentFragment} node, or a
  +     * {@link org.w3c.dom.Element} node.  In other words, a node
  +     * that accepts children.
  +     *
  +     * @param n The DOM node that will contain the result tree.
  +     */
  +    public DOMResult(Node node) {
  +        setNode(node);
  +    }
  +
  +    /**
  +     * Create a new output target with a DOM node. In practice,
  +     * the node should be a {@link org.w3c.dom.Document} node,
  +     * a {@link org.w3c.dom.DocumentFragment} node, or a
  +     * {@link org.w3c.dom.Element} node.  In other words, a node
  +     * that accepts children.
  +     *
  +     * @param node The DOM node that will contain the result tree.
  +     * @param systemID The system identifier which may be used in association
  +     * with this node.
  +     */
  +    public DOMResult(Node node, String systemID) {
  +        setNode(node);
  +        setSystemId(systemID);
  +    }
  +
  +    /**
  +     * Set the node that will contain the result DOM tree.  In practice,
  +     * the node should be a {@link org.w3c.dom.Document} node,
  +     * a {@link org.w3c.dom.DocumentFragment} node, or a
  +     * {@link org.w3c.dom.Element} node.  In other words, a node
  +     * that accepts children.
  +     *
  +     * @param node The node to which the transformation
  +     * will be appended.
  +     */
  +    public void setNode(Node node) {
  +        this.node = node;
  +    }
  +
  +    /**
  +     * Get the node that will contain the result DOM tree.
  +     * If no node was set via setNode, the node will be
  +     * set by the transformation, and may be obtained from
  +     * this method once the transformation is complete.
  +     *
  +     * @return The node to which the transformation
  +     * will be appended.
  +     */
  +    public Node getNode() {
  +        return node;
  +    }
  +
  +    /**
  +     * Method setSystemId Set the systemID that may be used in association
  +     * with the node.
  +     *
  +     * @param systemId The system identifier as a URI string.
  +     */
  +    public void setSystemId(String systemId) {
  +        this.systemId = systemId;
  +    }
  +
  +    /**
  +     * Get the system identifier that was set with setSystemId.
  +     *
  +     * @return The system identifier that was set with setSystemId, or null
  +     * if setSystemId was not called.
  +     */
  +    public String getSystemId() {
  +        return systemId;
  +    }
  +
  +    //////////////////////////////////////////////////////////////////////
  +    // Internal state.
  +    //////////////////////////////////////////////////////////////////////
  +
  +    /**
  +     * The node to which the transformation will be appended.
  +     */
  +    private Node node;
  +
  +    /**
  +     * The systemID that may be used in association
  +     * with the node.
  +     */
  +    private String systemId;
   }
  
  
  
  1.9       +99 -100   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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DOMSource.java	2000/12/15 21:04:00	1.8
  +++ DOMSource.java	2000/12/20 04:55:24	1.9
  @@ -54,6 +54,9 @@
    * 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;
   
   import javax.xml.transform.*;
  @@ -65,109 +68,105 @@
   
   import org.w3c.dom.Node;
   
  +
   /**
  - * Acts as a holder for a transformation Source tree in the 
  + * Acts as a holder for a transformation Source tree in the
    * form of a Document Object Model (DOM) tree.
    *
    * @see <a href="http://www.w3.org/TR/DOM-Level-2">Document Object Model (DOM) Level 2 Specification</a>
    */
  -public class DOMSource implements Source
  -{
  -  /** If {@link javax.xml.transform.TransformerFactory#getFeature} 
  -   * returns true when passed this value as an argument,
  -   * the Transformer supports Source input of this type.
  -   */
  -  public static final String FEATURE 
  -    = "http://javax.xml.transform.dom.DOMSource/feature";
  -
  -  /**
  -   * Zero-argument default constructor.
  -   */
  -  public DOMSource(){}
  -
  -  /**
  -   * Create a new input source with a DOM node.  The operation 
  -   * will be applied to the subtree rooted at this node.  In XSLT, 
  -   * a "/" pattern still means the root of the tree (not the subtree),
  -   * and the evaluation of global variables and parameters is done 
  -   * from the root node also.
  -   *
  -   * @param n The DOM node that will contain the Source tree.
  -   */
  -  public DOMSource(Node n)
  -  {
  -    setNode(n);
  -  }
  -
  -  /**
  -   * Create a new input source with a DOM node, and with the 
  -   * system ID also passed in as the base URI.
  -   *
  -   * @param node The DOM node that will contain the Source tree.
  -   * @param systemID Specifies the base URI associated with node.
  -   */
  -  public DOMSource(Node node, String systemID)
  -  {
  -    setNode(node);
  -    setSystemId(systemID);
  -  }
  -
  -  /**
  -   * Set the node that will represents a Source DOM tree.
  -   *
  -   * @param node The node that is to be transformed.
  -   */
  -  public void setNode(Node node)
  -  {
  -    this.node = node;
  -  }
  -
  -  /**
  -   * Get the node that represents a Source DOM tree.
  -   *
  -   * @return The node that is to be transformed.
  -   */
  -  public Node getNode()
  -  {
  -    return node;
  -  }
  -  
  -  /**
  -   * Set the base ID (URL or system ID) from where URLs 
  -   * will be resolved.
  -   * 
  -   * @param baseID Base URL for this DOM tree.
  -   */
  -  public void setSystemId(String baseID)
  -  {
  -    this.baseID = baseID;
  -  }
  -
  -  /**
  -   * Get the base ID (URL or system ID) from where URLs 
  -   * will be resolved.
  -   * 
  -   * @return Base URL for this DOM tree.
  -   */
  -  public String getSystemId()
  -  {
  -    return this.baseID;
  -  }
  -
  -
  -  //////////////////////////////////////////////////////////////////////
  -  // Internal state.
  -  //////////////////////////////////////////////////////////////////////
  -
  -  /**
  -   * Field node
  -   */
  -  private Node node;
  -  
  -  /**
  -   * The base ID (URL or system ID) from where URLs 
  -   * will be resolved. 
  -   */
  -  String baseID;
  -  
  +public class DOMSource implements Source {
  +
  +    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +     * returns true when passed this value as an argument,
  +     * the Transformer supports Source input of this type.
  +     */
  +    public static final String FEATURE =
  +        "http://javax.xml.transform.dom.DOMSource/feature";
  +
  +    /**
  +     * Zero-argument default constructor.  If this is used, and
  +     * no DOM source is set, then the Transformer will
  +     * create an empty source Document using
  +     * {@link javax.xml.parsers.DocumentBuilder#newDocument}.
  +     */
  +    public DOMSource() {}
  +
  +    /**
  +     * Create a new input source with a DOM node.  The operation
  +     * will be applied to the subtree rooted at this node.  In XSLT,
  +     * a "/" pattern still means the root of the tree (not the subtree),
  +     * and the evaluation of global variables and parameters is done
  +     * from the root node also.
  +     *
  +     * @param n The DOM node that will contain the Source tree.
  +     */
  +    public DOMSource(Node n) {
  +        setNode(n);
  +    }
  +
  +    /**
  +     * Create a new input source with a DOM node, and with the
  +     * system ID also passed in as the base URI.
  +     *
  +     * @param node The DOM node that will contain the Source tree.
  +     * @param systemID Specifies the base URI associated with node.
  +     */
  +    public DOMSource(Node node, String systemID) {
  +        setNode(node);
  +        setSystemId(systemID);
  +    }
  +
  +    /**
  +     * Set the node that will represents a Source DOM tree.
  +     *
  +     * @param node The node that is to be transformed.
  +     */
  +    public void setNode(Node node) {
  +        this.node = node;
  +    }
  +
  +    /**
  +     * Get the node that represents a Source DOM tree.
  +     *
  +     * @return The node that is to be transformed.
  +     */
  +    public Node getNode() {
  +        return node;
  +    }
  +
  +    /**
  +     * Set the base ID (URL or system ID) from where URLs
  +     * will be resolved.
  +     *
  +     * @param baseID Base URL for this DOM tree.
  +     */
  +    public void setSystemId(String baseID) {
  +        this.baseID = baseID;
  +    }
  +
  +    /**
  +     * Get the base ID (URL or system ID) from where URLs
  +     * will be resolved.
  +     *
  +     * @return Base URL for this DOM tree.
  +     */
  +    public String getSystemId() {
  +        return this.baseID;
  +    }
  +
  +    //////////////////////////////////////////////////////////////////////
  +    // Internal state.
  +    //////////////////////////////////////////////////////////////////////
  +
  +    /**
  +     * Field node
  +     */
  +    private Node node;
  +
  +    /**
  +     * The base ID (URL or system ID) from where URLs
  +     * will be resolved.
  +     */
  +    String baseID;
   }
  
  
  
  1.6       +2 -40     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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- package.html	2000/11/23 00:05:55	1.5
  +++ package.html	2000/12/20 04:55:24	1.6
  @@ -7,14 +7,14 @@
   <body>
   <p>This package implements DOM-specific transformation APIs.</p>
   <p>The {@link javax.xml.transform.dom.DOMSource} class allows the
  -client of the TrAX implementation to specify a DOM
  +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
  +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
  @@ -32,43 +32,5 @@
   {@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>
  -<p>The following example performs a transformation using DOM nodes as input
  -for the TransformerFactory, as input for the Transformer, and as the output of
  -the transformation.</p>
  -<code>
  -<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  -
  -    // Make sure the TransformerFactory supports the DOM feature.
  -    if (tfactory.getFeature(DOMSource.FEATURE) &amp;&amp; tfactory.getFeature(DOMResult.FEATURE))
  -    {
  -      // Use javax.xml.parsers to create our DOMs.
  -      DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
  -      dfactory.setNamespaceAware(true); // do this always for XSLT
  -      DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
  -      
  -      // Create the Templates from a DOM.
  -      Node xslDOM = docBuilder.parse(xslID);
  -      DOMSource dsource = new DOMSource(xslDOM, xslID);
  -      Templates templates = tfactory.newTemplates(dsource);
  -
  -      // Create the source tree in the form of a DOM.
  -      Node sourceNode = docBuilder.parse(sourceID);
  -      
  -      // Create a DOMResult that the transformation will fill in.
  -      DOMResult dresult = new DOMResult();
  -      
  -      // And transform from the source DOM tree to a result DOM tree.
  -      Transformer transformer = templates.newTransformer();
  -      transformer.transform(new DOMSource(sourceNode, sourceID), dresult);
  -      
  -      // The root of the result tree may now be obtained from 
  -      // the DOMResult object.
  -      Node out = dresult.getNode();
  -      
  -      // Serialize it to System.out for diagnostics.
  -      Transformer serializer = tfactory.newTransformer();
  -      serializer.transform(new DOMSource(out), new StreamResult(System.out));
  -    }</pre>
  -</code>
   </body>
   </html>
  
  
  
  1.7       +107 -111  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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SAXResult.java	2000/11/15 02:34:31	1.6
  +++ SAXResult.java	2000/12/20 04:55:25	1.7
  @@ -54,6 +54,9 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +/**
  + * $Id: SAXResult.java,v 1.7 2000/12/20 04:55:25 sboag Exp $
  + */
   package javax.xml.transform.sax;
   
   import javax.xml.transform.*;
  @@ -67,118 +70,111 @@
   import org.xml.sax.ext.DeclHandler;
   import org.xml.sax.ext.LexicalHandler;
   
  +
   /**
    * Acts as an holder for a transformation Result.
    */
  -public class SAXResult implements Result
  -{
  -  /** If {@link javax.xml.transform.TransformerFactory#getFeature} 
  -   * returns true when passed this value as an argument,
  -   * the Transformer supports Result output of this type.
  -   */
  -  public static final String FEATURE 
  -    = "http://javax.xml.transform.sax.SAXResult/feature";
  -
  -  /**
  -   * Zero-argument default constructor.
  -   */
  -  public SAXResult(){}
  -
  -  /**
  -   * Create a SAXResult that targets a SAX2 ContentHandler.
  -   *
  -   * @param handler Must be a non-null ContentHandler reference.
  -   */
  -  public SAXResult(ContentHandler handler)
  -  {
  -    setHandler(handler);
  -  }
  -
  -  /**
  -   * Set the target to be a SAX2 ContentHandler.
  -   *
  -   * @param handler Must be a non-null ContentHandler reference.
  -   */
  -  public void setHandler(ContentHandler handler)
  -  {
  -    this.handler = handler;
  -  }
  -
  -  /**
  -   * Get the ContentHandler that is the Result.
  -   *
  -   * @return The ContentHandler that is to be transformation output.
  -   */
  -  public ContentHandler getHandler()
  -  {
  -    return handler;
  -  }
  -
  -  /**
  -   * Set the SAX2 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>
  -   *
  -   * @param handler A non-null LexicalHandler for 
  -   * handling lexical parse events.
  -   */
  -  void setLexicalHandler(LexicalHandler handler)
  -  {
  -    this.lexhandler = lexhandler;
  -  }
  -
  -  /**
  -   * Get a SAX2 LexicalHandler for the output.
  -   * 
  -   * @return A LexicalHandler, or null.
  -   */
  -  LexicalHandler getLexicalHandler()
  -  {
  -    return lexhandler;
  -  }
  -  
  -  /**
  -   * Method setSystemId Set the systemID that may be used in association
  -   * with the ContentHandler.
  -   *
  -   * @param systemId The system identifier as a URI string.
  -   */
  -  public void setSystemId(String systemId)
  -  {
  -    this.systemId = systemId;
  -  }
  -
  -  /**
  -   * Get the system identifier that was set with setSystemId.
  -   *
  -   * @return The system identifier that was set with setSystemId, or null
  -   * if setSystemId was not called.
  -   */
  -  public String getSystemId()
  -  {
  -    return systemId;
  -  }
  -
  -
  -  //////////////////////////////////////////////////////////////////////
  -  // Internal state.
  -  //////////////////////////////////////////////////////////////////////
  -
  -  /**
  -   * The handler for parse events.
  -   */
  -  private ContentHandler handler;
  -
  -  /**
  -   * The handler for lexical events.
  -   */
  -  private LexicalHandler lexhandler;
  -  
  -  /**
  -   * The systemID that may be used in association
  -   * with the node.
  -   */
  -  private String systemId;
  +public class SAXResult implements Result {
  +
  +    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +     * returns true when passed this value as an argument,
  +     * the Transformer supports Result output of this type.
  +     */
  +    public static final String FEATURE =
  +        "http://javax.xml.transform.sax.SAXResult/feature";
  +
  +    /**
  +     * Zero-argument default constructor.
  +     */
  +    public SAXResult() {}
  +
  +    /**
  +     * Create a SAXResult that targets a SAX2 ContentHandler.
  +     *
  +     * @param handler Must be a non-null ContentHandler reference.
  +     */
  +    public SAXResult(ContentHandler handler) {
  +        setHandler(handler);
  +    }
  +
  +    /**
  +     * Set the target to be a SAX2 ContentHandler.
  +     *
  +     * @param handler Must be a non-null ContentHandler reference.
  +     */
  +    public void setHandler(ContentHandler handler) {
  +        this.handler = handler;
  +    }
  +
  +    /**
  +     * Get the ContentHandler that is the Result.
  +     *
  +     * @return The ContentHandler that is to be transformation output.
  +     */
  +    public ContentHandler getHandler() {
  +        return handler;
  +    }
  +
  +    /**
  +     * Set the SAX2 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>
  +     *
  +     * @param handler A non-null LexicalHandler for
  +     * handling lexical parse events.
  +     */
  +    void setLexicalHandler(LexicalHandler handler) {
  +        this.lexhandler = lexhandler;
  +    }
  +
  +    /**
  +     * Get a SAX2 LexicalHandler for the output.
  +     *
  +     * @return A LexicalHandler, or null.
  +     */
  +    LexicalHandler getLexicalHandler() {
  +        return lexhandler;
  +    }
  +
  +    /**
  +     * Method setSystemId Set the systemID that may be used in association
  +     * with the ContentHandler.
  +     *
  +     * @param systemId The system identifier as a URI string.
  +     */
  +    public void setSystemId(String systemId) {
  +        this.systemId = systemId;
  +    }
  +
  +    /**
  +     * Get the system identifier that was set with setSystemId.
  +     *
  +     * @return The system identifier that was set with setSystemId, or null
  +     * if setSystemId was not called.
  +     */
  +    public String getSystemId() {
  +        return systemId;
  +    }
  +
  +    //////////////////////////////////////////////////////////////////////
  +    // Internal state.
  +    //////////////////////////////////////////////////////////////////////
  +
  +    /**
  +     * The handler for parse events.
  +     */
  +    private ContentHandler handler;
  +
  +    /**
  +     * The handler for lexical events.
  +     */
  +    private LexicalHandler lexhandler;
  +
  +    /**
  +     * The systemID that may be used in association
  +     * with the node.
  +     */
  +    private String systemId;
   }
  
  
  
  1.8       +153 -156  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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SAXSource.java	2000/11/18 01:19:14	1.7
  +++ SAXSource.java	2000/12/20 04:55:25	1.8
  @@ -54,6 +54,9 @@
    * 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;
  @@ -69,163 +72,157 @@
   import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.InputSource;
   
  +
   /**
    * Acts as an holder for SAX-style Source.
    */
  -public class SAXSource implements Source
  -{
  -  /** If {@link javax.xml.transform.TransformerFactory#getFeature} 
  -   * returns true when passed this value as an argument,
  -   * the Transformer supports Source input of this type.
  -   */
  -  public static final String FEATURE 
  -    = "http://javax.xml.transform.sax.SAXSource/feature";
  -
  -  /**
  -   * Zero-argument default constructor.  If this constructor 
  -   * is used, and no other method is called, the 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
  -   * reader.parse(inputSource).
  -   *
  -   * @param reader An XMLReader to be used for the parse.
  -   * @param inputSource A SAX input source reference that must be non-null
  -   * and that will be passed to the reader parse method.
  -   */
  -  public SAXSource(XMLReader reader, InputSource inputSource)
  -  {
  -    this.reader = reader;
  -    this.inputSource = inputSource;
  -  }
  -
  -  /**
  -   * Create a SAXSource, using a SAX InputSource.
  -   * The Transformer or SAXTransformerFactory creates a
  -   * reader via org.xml.sax.helpers.XMLReaderFactory
  -   * (if setXMLReader is not used), sets itself as
  -   * the reader's ContentHandler, and calls
  -   * reader.parse(inputSource).
  -   *
  -   * @param inputSource An input source reference that must be non-null
  -   * and that will be passed to the parse method of the reader.
  -   */
  -  public SAXSource(InputSource inputSource)
  -  {
  -    this.inputSource = inputSource;
  -  }
  -
  -  /**
  -   * Set the XMLReader to be used for the Source.
  -   *
  -   * @param reader A valid XMLReader or XMLFilter reference.
  -   */
  -  public void setXMLReader(XMLReader reader)
  -  {
  -    this.reader = reader;
  -  }
  -
  -  /**
  -   * Get the XMLReader to be used for the Source.
  -   *
  -   * @return A valid XMLReader or XMLFilter reference, or null.
  -   */
  -  public XMLReader getXMLReader()
  -  {
  -    return reader;
  -  }
  -
  -  /**
  -   * Set the SAX InputSource to be used for the Source.
  -   *
  -   * @param inputSource A valid InputSource reference.
  -   */
  -  public void setInputSource(InputSource inputSource)
  -  {
  -    this.inputSource = inputSource;
  -  }
  -  
  -  /**
  -   * Get the SAX InputSource to be used for the Source.
  -   *
  -   * @return A valid InputSource reference, or null.
  -   */
  -  public InputSource getInputSource()
  -  {
  -    return inputSource;
  -  }
  -  
  -  /**
  -   * Set the system identifier for this Source.  If an input source 
  -   * has already been set, it will set the system ID or that 
  -   * input source, otherwise it will create a new input source.
  -   *
  -   * <p>The system identifier is optional if there is a byte stream
  -   * or a character stream, but it is still useful to provide one,
  -   * since the application can use it to resolve relative URIs
  -   * and can include it in error messages and warnings (the parser
  -   * will attempt to open a connection to the URI only if
  -   * no byte stream or character stream is specified).</p>
  -   *
  -   * @param systemId The system identifier as a URI string.
  -   */
  -  public void setSystemId(String systemId)
  -  {
  -    if(null == inputSource)
  -    {
  -      inputSource = new InputSource(systemId);
  -    }
  -    else
  -      inputSource.setSystemId(systemId);
  -  }
  -  
  -  /**
  -   * Get the base ID (URI or system ID) from where URIs 
  -   * will be resolved.
  -   * 
  -   * @return Base URL for the Source, or null.
  -   */
  -  public String getSystemId()
  -  {
  -    return (null != inputSource) ? inputSource.getSystemId() : null;
  -  }
  -
  -  /** The XMLReader to be used for the source tree input. May be null.        */
  -  private XMLReader reader;
  -
  -  /** The SAX InputSource to be used for the source tree input.  Should not be null. */
  -  private InputSource inputSource;
  -  
  -  /**
  -   * Attempt to obtain a SAX InputSource object from a TrAX Source 
  -   * object.
  -   * 
  -   * @param source Must be a non-null Source reference.
  -   * 
  -   * @return An InputSource, or null if Source can not be converted.
  -   */
  -  public static InputSource sourceToInputSource(Source source)
  -  {
  -    if(source instanceof SAXSource)
  -    {
  -      return ((SAXSource)source).getInputSource();
  -    }
  -    else if(source instanceof StreamSource)
  -    {
  -      StreamSource ss = (StreamSource)source;
  -      InputSource isource= new InputSource(ss.getSystemId());
  -      isource.setByteStream(ss.getInputStream());
  -      isource.setCharacterStream(ss.getReader());
  -      isource.setPublicId(ss.getPublicId());
  -      return isource;
  -    }
  -    else
  -      return null;
  -  }
  -  
  +public class SAXSource implements Source {
  +
  +    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +     * returns true when passed this value as an argument,
  +     * the Transformer supports Source input of this type.
  +     */
  +    public static final String FEATURE =
  +        "http://javax.xml.transform.sax.SAXSource/feature";
  +
  +    /**
  +     * Zero-argument default constructor.  If this constructor
  +     * is used, and no other method is called, the 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
  +     * reader.parse(inputSource).
  +     *
  +     * @param reader An XMLReader to be used for the parse.
  +     * @param inputSource A SAX input source reference that must be non-null
  +     * and that will be passed to the reader parse method.
  +     */
  +    public SAXSource(XMLReader reader, InputSource inputSource) {
  +        this.reader      = reader;
  +        this.inputSource = inputSource;
  +    }
  +
  +    /**
  +     * Create a SAXSource, using a SAX InputSource.
  +     * The Transformer or SAXTransformerFactory creates a
  +     * reader via org.xml.sax.helpers.XMLReaderFactory
  +     * (if setXMLReader is not used), sets itself as
  +     * the reader's ContentHandler, and calls
  +     * reader.parse(inputSource).
  +     *
  +     * @param inputSource An input source reference that must be non-null
  +     * and that will be passed to the parse method of the reader.
  +     */
  +    public SAXSource(InputSource inputSource) {
  +        this.inputSource = inputSource;
  +    }
  +
  +    /**
  +     * Set the XMLReader to be used for the Source.
  +     *
  +     * @param reader A valid XMLReader or XMLFilter reference.
  +     */
  +    public void setXMLReader(XMLReader reader) {
  +        this.reader = reader;
  +    }
  +
  +    /**
  +     * Get the XMLReader to be used for the Source.
  +     *
  +     * @return A valid XMLReader or XMLFilter reference, or null.
  +     */
  +    public XMLReader getXMLReader() {
  +        return reader;
  +    }
  +
  +    /**
  +     * Set the SAX InputSource to be used for the Source.
  +     *
  +     * @param inputSource A valid InputSource reference.
  +     */
  +    public void setInputSource(InputSource inputSource) {
  +        this.inputSource = inputSource;
  +    }
  +
  +    /**
  +     * Get the SAX InputSource to be used for the Source.
  +     *
  +     * @return A valid InputSource reference, or null.
  +     */
  +    public InputSource getInputSource() {
  +        return inputSource;
  +    }
  +
  +    /**
  +     * Set the system identifier for this Source.  If an input source
  +     * has already been set, it will set the system ID or that
  +     * input source, otherwise it will create a new input source.
  +     *
  +     * <p>The system identifier is optional if there is a byte stream
  +     * or a character stream, but it is still useful to provide one,
  +     * since the application can use it to resolve relative URIs
  +     * and can include it in error messages and warnings (the parser
  +     * will attempt to open a connection to the URI only if
  +     * no byte stream or character stream is specified).</p>
  +     *
  +     * @param systemId The system identifier as a URI string.
  +     */
  +    public void setSystemId(String systemId) {
  +
  +        if (null == inputSource) {
  +            inputSource = new InputSource(systemId);
  +        } else {
  +            inputSource.setSystemId(systemId);
  +        }
  +    }
  +
  +    /**
  +     * Get the base ID (URI or system ID) from where URIs
  +     * will be resolved.
  +     *
  +     * @return Base URL for the Source, or null.
  +     */
  +    public String getSystemId() {
  +
  +        return (null != inputSource)
  +               ? inputSource.getSystemId()
  +               : null;
  +    }
  +
  +    /** The XMLReader to be used for the source tree input. May be null.        */
  +    private XMLReader reader;
  +
  +    /** The SAX InputSource to be used for the source tree input.  Should not be null. */
  +    private InputSource inputSource;
  +
  +    /**
  +     * Attempt to obtain a SAX InputSource object from a TrAX Source
  +     * object.
  +     *
  +     * @param source Must be a non-null Source reference.
  +     *
  +     * @return An InputSource, or null if Source can not be converted.
  +     */
  +    public static InputSource sourceToInputSource(Source source) {
  +
  +        if (source instanceof SAXSource) {
  +            return ((SAXSource) source).getInputSource();
  +        } else if (source instanceof StreamSource) {
  +            StreamSource ss      = (StreamSource) source;
  +            InputSource  isource = new InputSource(ss.getSystemId());
  +
  +            isource.setByteStream(ss.getInputStream());
  +            isource.setCharacterStream(ss.getReader());
  +            isource.setPublicId(ss.getPublicId());
  +
  +            return isource;
  +        } else {
  +            return null;
  +        }
  +    }
   }
  
  
  
  1.8       +117 -113  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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SAXTransformerFactory.java	2000/11/15 02:34:32	1.7
  +++ SAXTransformerFactory.java	2000/12/20 04:55:26	1.8
  @@ -54,6 +54,9 @@
    * 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;
   
   import javax.xml.transform.*;
  @@ -65,122 +68,123 @@
   import org.xml.sax.XMLReader;
   import org.xml.sax.XMLFilter;
   
  +
   /**
  - * This class extends TransformerFactory to provide SAX-specific 
  - * factory methods.  It provides two types of ContentHandlers, 
  - * one for creating Transformers, the other for creating Templates 
  + * This class extends TransformerFactory to provide SAX-specific
  + * factory methods.  It provides two types of ContentHandlers,
  + * one for creating Transformers, the other for creating Templates
    * objects.
  - * 
  - * <p>If an application wants to set the ErrorHandler or EntityResolver 
  + *
  + * <p>If an application wants to set the ErrorHandler or EntityResolver
    * for an XMLReader used during a transformation, it should use a URIResolver
  - * to return the SAXSource which provides (with getXMLReader) a reference to 
  + * to return the SAXSource which provides (with getXMLReader) a reference to
    * the XMLReader.</p>
    */
  -public abstract class SAXTransformerFactory extends TransformerFactory
  -{
  -  /** If {@link javax.xml.transform.TransformerFactory#getFeature} 
  -   * returns true when passed this value as an argument,
  -   * the TransformerFactory returned from 
  -   * {@link javax.xml.transform.TransformerFactory#newInstance} may 
  -   * be safely cast to a SAXTransformerFactory.
  -   */
  -  public static final String FEATURE 
  -    = "http://javax.xml.transform.sax.SAXTransformerFactory/feature";
  -
  -  /** If {@link javax.xml.transform.TransformerFactory#getFeature} 
  -   * returns true when passed this value as an argument,
  -   * the {@link #newXMLFilter(Source src)} 
  -   * and {@link #newXMLFilter(Templates templates)} methods are supported.
  -   */
  -  public static final String FEATURE_XMLFILTER 
  -    = "http://javax.xml.transform.sax.SAXTransformerFactory/feature/xmlfilter";
  -
  -  /**
  -   * The default constructor is protected on purpose.
  -   */
  -  protected SAXTransformerFactory(){}
  -
  -  /**
  -   * Get a TransformerHandler object that can process SAX
  -   * ContentHandler events into a Result, based on the transformation
  -   * instructions specified by the argument.
  -   *
  -   * @param src The Source of the transformation instructions.
  -   *
  -   * @return TransformerHandler ready to transform SAX events.
  -   * 
  -   * @throws TransformerConfigurationException If for some reason the 
  -   * TransformerHandler can not be created.
  -   */
  -  public abstract TransformerHandler newTransformerHandler(Source src)
  -    throws TransformerConfigurationException;
  -
  -  /**
  -   * Get a TransformerHandler object that can process SAX
  -   * ContentHandler events into a Result, based on the Templates argument.
  -   *
  -   * @param templates The compiled transformation instructions.
  -   *
  -   * @return TransformerHandler ready to transform SAX events.
  -   * 
  -   * @throws TransformerConfigurationException If for some reason the 
  -   * TransformerHandler can not be created.
  -   */
  -  public abstract TransformerHandler newTransformerHandler(Templates templates)
  -    throws TransformerConfigurationException;
  -
  -  /**
  -   * Get a TransformerHandler object that can process SAX
  -   * ContentHandler events into a Result. The transformation 
  -   * is defined as an identity (or copy) transformation, for example
  -   * to copy a series of SAX parse events into a DOM tree.
  -   *
  -   * @return A non-null reference to a TransformerHandler, that may 
  -   * be used as a ContentHandler for SAX parse events.
  -   * 
  -   * @throws TransformerConfigurationException If for some reason the 
  -   * TransformerHandler cannot be created.
  -   */
  -  public abstract TransformerHandler newTransformerHandler()
  -    throws TransformerConfigurationException;
  -
  -  /**
  -   * Get a TemplatesHandler object that can process SAX
  -   * ContentHandler events into a Templates object.
  -   *
  -   * @return A non-null reference to a TransformerHandler, that may 
  -   * be used as a ContentHandler for SAX parse events.
  -   * 
  -   * @throws TransformerConfigurationException If for some reason the 
  -   * TemplatesHandler cannot be created.
  -   */
  -  public abstract TemplatesHandler newTemplatesHandler()
  -    throws TransformerConfigurationException;
  -
  -  /**
  -   * Create an XMLFilter that uses the given Source as the
  -   * transformation instructions.
  -   *
  -   * @param src The Source of the transformation instructions.
  -   *
  -   * @return An XMLFilter object, or null if this feature is not supported.
  -   * 
  -   * @throws TransformerConfigurationException If for some reason the 
  -   * TemplatesHandler cannot be created.
  -   */
  -  public abstract XMLFilter newXMLFilter(Source src)
  -    throws TransformerConfigurationException;
  -  
  -  /**
  -   * Create an XMLFilter, based on the Templates argument..
  -   *
  -   * @param templates The compiled transformation instructions.
  -   *
  -   * @return An XMLFilter object, or null if this feature is not supported.
  -   * 
  -   * @throws TransformerConfigurationException If for some reason the 
  -   * TemplatesHandler cannot be created.
  -   */
  -  public abstract XMLFilter newXMLFilter(Templates templates)
  -    throws TransformerConfigurationException;
  +public abstract class SAXTransformerFactory extends TransformerFactory {
  +
  +    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +     * returns true when passed this value as an argument,
  +     * the TransformerFactory returned from
  +     * {@link javax.xml.transform.TransformerFactory#newInstance} may
  +     * be safely cast to a SAXTransformerFactory.
  +     */
  +    public static final String FEATURE =
  +        "http://javax.xml.transform.sax.SAXTransformerFactory/feature";
  +
  +    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +     * returns true when passed this value as an argument,
  +     * the {@link #newXMLFilter(Source src)}
  +     * and {@link #newXMLFilter(Templates templates)} methods are supported.
  +     */
  +    public static final String FEATURE_XMLFILTER =
  +        "http://javax.xml.transform.sax.SAXTransformerFactory/feature/xmlfilter";
  +
  +    /**
  +     * The default constructor is protected on purpose.
  +     */
  +    protected SAXTransformerFactory() {}
  +
  +    /**
  +     * Get a TransformerHandler object that can process SAX
  +     * ContentHandler events into a Result, based on the transformation
  +     * instructions specified by the argument.
  +     *
  +     * @param src The Source of the transformation instructions.
  +     *
  +     * @return TransformerHandler ready to transform SAX events.
  +     *
  +     * @throws TransformerConfigurationException If for some reason the
  +     * TransformerHandler can not be created.
  +     */
  +    public abstract TransformerHandler newTransformerHandler(Source src)
  +        throws TransformerConfigurationException;
  +
  +    /**
  +     * Get a TransformerHandler object that can process SAX
  +     * ContentHandler events into a Result, based on the Templates argument.
  +     *
  +     * @param templates The compiled transformation instructions.
  +     *
  +     * @return TransformerHandler ready to transform SAX events.
  +     *
  +     * @throws TransformerConfigurationException If for some reason the
  +     * TransformerHandler can not be created.
  +     */
  +    public abstract TransformerHandler newTransformerHandler(
  +        Templates templates) throws TransformerConfigurationException;
  +
  +    /**
  +     * Get a TransformerHandler object that can process SAX
  +     * ContentHandler events into a Result. The transformation
  +     * is defined as an identity (or copy) transformation, for example
  +     * to copy a series of SAX parse events into a DOM tree.
  +     *
  +     * @return A non-null reference to a TransformerHandler, that may
  +     * be used as a ContentHandler for SAX parse events.
  +     *
  +     * @throws TransformerConfigurationException If for some reason the
  +     * TransformerHandler cannot be created.
  +     */
  +    public abstract TransformerHandler newTransformerHandler()
  +        throws TransformerConfigurationException;
  +
  +    /**
  +     * Get a TemplatesHandler object that can process SAX
  +     * ContentHandler events into a Templates object.
  +     *
  +     * @return A non-null reference to a TransformerHandler, that may
  +     * be used as a ContentHandler for SAX parse events.
  +     *
  +     * @throws TransformerConfigurationException If for some reason the
  +     * TemplatesHandler cannot be created.
  +     */
  +    public abstract TemplatesHandler newTemplatesHandler()
  +        throws TransformerConfigurationException;
  +
  +    /**
  +     * Create an XMLFilter that uses the given Source as the
  +     * transformation instructions.
  +     *
  +     * @param src The Source of the transformation instructions.
  +     *
  +     * @return An XMLFilter object, or null if this feature is not supported.
  +     *
  +     * @throws TransformerConfigurationException If for some reason the
  +     * TemplatesHandler cannot be created.
  +     */
  +    public abstract XMLFilter newXMLFilter(Source src)
  +        throws TransformerConfigurationException;
  +
  +    /**
  +     * Create an XMLFilter, based on the Templates argument..
  +     *
  +     * @param templates The compiled transformation instructions.
  +     *
  +     * @return An XMLFilter object, or null if this feature is not supported.
  +     *
  +     * @throws TransformerConfigurationException If for some reason the
  +     * TemplatesHandler cannot be created.
  +     */
  +    public abstract XMLFilter newXMLFilter(Templates templates)
  +        throws TransformerConfigurationException;
   }
  
  
  
  1.8       +36 -32    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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TemplatesHandler.java	2000/12/13 04:15:34	1.7
  +++ TemplatesHandler.java	2000/12/20 04:55:28	1.8
  @@ -54,6 +54,9 @@
    * 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.*;
  @@ -61,41 +64,42 @@
   import org.xml.sax.ContentHandler;
   import org.xml.sax.ext.LexicalHandler;
   
  +
   /**
    * A SAX ContentHandler that may be used to process SAX
    * parse events (parsing transformation instructions) into a Templates object.
  - * 
  + *
    * <p>Note that TemplatesHandler does not need to implement LexicalHandler.</p>
    */
  -public interface TemplatesHandler extends ContentHandler
  -{
  -  /**
  -   * When a TemplatesHandler object is used as a ContentHandler 
  -   * for the parsing of transformation instructions, it creates a Templates object, 
  -   * which the caller can get once the SAX events have been completed.
  -   * 
  -   * @return The Templates object that was created during
  -   * 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();
  -  
  -  /**
  -   * Set the base ID (URI or system ID) for the Templates object
  -   * created by this builder.  This must be set in order to
  -   * resolve relative URIs in the stylesheet.  This must be 
  -   * called before the startDocument event.
  -   * 
  -   * @param baseID Base URI for this stylesheet.
  -   */
  -  public void setSystemId(String systemID);
  -  
  -  /**
  -   * Get the base ID (URI or system ID) from where relative 
  -   * URLs will be resolved.
  -   * @return The systemID that was set with {@link #setSystemId}.
  -   */
  -  public String getSystemId();
  +public interface TemplatesHandler extends ContentHandler {
  +
  +    /**
  +     * When a TemplatesHandler object is used as a ContentHandler
  +     * for the parsing of transformation instructions, it creates a Templates object,
  +     * which the caller can get once the SAX events have been completed.
  +     *
  +     * @return The Templates object that was created during
  +     * 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();
  +
  +    /**
  +     * Set the base ID (URI or system ID) for the Templates object
  +     * created by this builder.  This must be set in order to
  +     * resolve relative URIs in the stylesheet.  This must be
  +     * called before the startDocument event.
  +     *
  +     * @param baseID Base URI for this stylesheet.
  +     */
  +    public void setSystemId(String systemID);
  +
  +    /**
  +     * Get the base ID (URI or system ID) from where relative
  +     * URLs will be resolved.
  +     * @return The systemID that was set with {@link #setSystemId}.
  +     */
  +    public String getSystemId();
   }
  
  
  
  1.8       +94 -35    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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TransformerHandler.java	2000/12/14 00:19:26	1.7
  +++ TransformerHandler.java	2000/12/20 04:55:29	1.8
  @@ -1,3 +1,62 @@
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 1999 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 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.
  + *
  + * 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, Lotus
  + * Development Corporation., http://www.lotus.com.  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;
   
   import java.util.Properties;
  @@ -11,42 +70,42 @@
   import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.DTDHandler;
   
  +
   /**
  - * A TransformerHandler 
  - * listens for SAX ContentHandler parse events and transforms 
  + * A TransformerHandler
  + * listens for SAX ContentHandler parse events and transforms
    * them to a Result.
    */
  -public interface TransformerHandler 
  -  extends ContentHandler, LexicalHandler, DTDHandler
  -{  
  -  /**
  -   * Enables the user of the TransformerHandler to set the
  -   * to set the Result for the transformation.
  -   *
  -   * @param result A Result instance, should not be null.
  -   * 
  -   * @throws IllegalArgumentException if result is invalid for some reason.
  -   */
  -  public void setResult(Result result)
  -    throws IllegalArgumentException;
  -    
  -  /**
  -   * Set the base ID (URI or system ID) from where relative 
  -   * URLs will be resolved.
  -   * @param systemID Base URI for the source tree.
  -   */
  -  public void setSystemId(String systemID);
  -  
  -  /**
  -   * Get the base ID (URI or system ID) from where relative 
  -   * URLs will be resolved.
  -   * @return The systemID that was set with {@link #setSystemId}.
  -   */
  -  public String getSystemId();
  -  
  -  /**
  -   * Get the Transformer associated with this handler, which 
  -   * is needed in order to set parameters and output properties.
  -   */
  -  public Transformer getTransformer();
  +public interface TransformerHandler
  +    extends ContentHandler, LexicalHandler, DTDHandler {
  +
  +    /**
  +     * Enables the user of the TransformerHandler to set the
  +     * to set the Result for the transformation.
  +     *
  +     * @param result A Result instance, should not be null.
  +     *
  +     * @throws IllegalArgumentException if result is invalid for some reason.
  +     */
  +    public void setResult(Result result) throws IllegalArgumentException;
  +
  +    /**
  +     * Set the base ID (URI or system ID) from where relative
  +     * URLs will be resolved.
  +     * @param systemID Base URI for the source tree.
  +     */
  +    public void setSystemId(String systemID);
  +
  +    /**
  +     * Get the base ID (URI or system ID) from where relative
  +     * URLs will be resolved.
  +     * @return The systemID that was set with {@link #setSystemId}.
  +     */
  +    public String getSystemId();
  +
  +    /**
  +     * Get the Transformer associated with this handler, which
  +     * is needed in order to set parameters and output properties.
  +     */
  +    public Transformer getTransformer();
   }
  
  
  
  1.6       +4 -145    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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- package.html	2000/11/23 00:05:55	1.5
  +++ package.html	2000/12/20 04:55:29	1.6
  @@ -20,26 +20,7 @@
     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. The following code fragment illustrates
  -  the use of the SAXSource and SAXResult objects.</p>
  -<code>
  -<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  -
  -    // Does this factory support SAX features?
  -    if (tfactory.getFeature(SAXSource.FEATURE) &amp;&amp; tfactory.getFeature(SAXResult.FEATURE))
  -    {      
  -      // Get a transformer.
  -      Transformer transformer 
  -        = tfactory.newTransformer(new StreamSource(xslID));
  -      
  -      // Create an reader for reading.
  -      XMLReader reader = XMLReaderFactory.createXMLReader();
  -
  -      transformer.transform(new SAXSource(reader, new InputSource(sourceID)),
  -                            new SAXResult(new ExampleContentHandler()));
  -    }
  -</pre>
  -</code>
  +  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},
  @@ -48,25 +29,8 @@
   <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}. For
  -  example:</p>
  -<code>
  -<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  +  {@link javax.xml.transform.TransformerFactory#newInstance}. 
   
  -    // Does this factory support the SAXTransformerFactory feature?
  -    if (tfactory.getFeature(SAXTransformerFactory.FEATURE))
  -    {
  -      // If so, we can safely cast.
  -      SAXTransformerFactory stfactory = ((SAXTransformerFactory) tfactory);
  -      
  -      // A TransformerHandler is a ContentHandler that will listen for 
  -      // SAX events, and transform them to the result.
  -      TransformerHandler handler 
  -        = stfactory.newTransformerHandler(new StreamSource(xslID));
  -      // ...
  -    }
  -</pre>
  -</code>
   <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.
  @@ -83,42 +47,8 @@
     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. The following illustrates the feeding
  -  of SAX events from an {@link org.xml.sax.XMLReader} to a
  -  Transformer.</p>
  -<code>
  -<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  -
  -    // Does this factory support SAX features?
  -    if (tfactory.getFeature(SAXTransformerFactory.FEATURE))
  -    {
  -      // If so, we can safely cast.
  -      SAXTransformerFactory stfactory = ((SAXTransformerFactory) tfactory);
  -      
  -      // A TransformerHandler is a ContentHandler that will listen for 
  -      // SAX events, and transform them to the result.
  -      TransformerHandler handler 
  -        = stfactory.newTransformerHandler(new StreamSource(xslID));
  +  the methods invoked from that reference. 
   
  -      // Set the result handling to be a serialization to System.out.
  -      handler.setResult(new StreamResult(System.out));
  -      
  -      handler.getTransformer().setParameter("a-param",
  -                                            "hello to you!");
  -      
  -      // Create a reader, and set it's content handler to be the TransformerHandler.
  -      XMLReader reader = XMLReaderFactory.createXMLReader();
  -      reader.setContentHandler(handler);
  -      
  -      // It's a good idea for the parser to send lexical events.
  -      // The TransformerHandler is also a LexicalHandler.
  -      reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
  -      
  -      // Parse the source XML, and send the parse events to the TransformerHandler.
  -      reader.parse(sourceID);
  -    }
  -</pre>
  -</code>
   <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}
  @@ -126,41 +56,7 @@
     {@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. The following code fragment illustrates the creation of a
  -  Templates object from SAX2 events sent from an XMLReader.</p>
  -<code>
  -<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  -
  -    // Does this factory support SAX features?
  -    if (tfactory.getFeature(SAXTransformerFactory.FEATURE))
  -    {
  -      // If so, we can safely cast.
  -      SAXTransformerFactory stfactory = ((SAXTransformerFactory) tfactory);
  -      
  -      // Have the factory create a special ContentHandler that will 
  -      // create a Templates object.
  -      TemplatesHandler handler = stfactory.newTemplatesHandler();
  -      
  -      // If you don't do this, the TemplatesHandler won't know how to 
  -      // resolve relative URLs.
  -      handler.setSystemId(xslID);
  -      
  -      // Create a reader, and set it's content handler to be the TemplatesHandler.
  -      XMLReader reader = XMLReaderFactory.createXMLReader();
  -      reader.setContentHandler(handler);
  -      
  -      // Parse the source XML, and send the parse events to the TemplatesHandler.
  -      reader.parse(xslID);
  -      
  -      // Get the Templates reference from the handler.
  -      Templates templates = handler.getTemplates();
  -      
  -      // Ready to transform.
  -      Transformer transformer = templates.newTransformer();
  -      transformer.transform(new StreamSource(sourceID), new StreamResult(System.out));
  -    }
  -</pre>
  -</code>
  +  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
  @@ -169,42 +65,5 @@
     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>
  -<code>
  -<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  -    
  -    // Does this factory support SAX features?
  -    if (tfactory.getFeature(SAXTransformerFactory.FEATURE))
  -    {
  -      Templates stylesheet1 = tfactory.newTemplates(new StreamSource(xslID_1));
  -      Transformer transformer1 = stylesheet1.newTransformer();
  -      
  -      SAXTransformerFactory stf = (SAXTransformerFactory)tfactory;
  -      XMLReader reader = XMLReaderFactory.createXMLReader();
  -
  -      XMLFilter filter1 = stf.newXMLFilter(new StreamSource(xslID_1));
  -      XMLFilter filter2 = stf.newXMLFilter(new StreamSource(xslID_2));
  -      XMLFilter filter3 = stf.newXMLFilter(new StreamSource(xslID_3));
  -
  -      // transformer1 will use a SAX parser as it's reader.    
  -      filter1.setParent(reader);
  -
  -      // transformer2 will use transformer1 as it's reader.
  -      filter2.setParent(filter1);
  -
  -      // transform3 will use transform2 as it's reader.
  -      filter3.setParent(filter2);
  -
  -      filter3.setContentHandler(new ExampleContentHandler());
  -      // filter3.setContentHandler(new org.xml.sax.helpers.DefaultHandler());
  -
  -      // Now, when you call transformer3 to parse, it will set  
  -      // itself as the ContentHandler for transform2, and 
  -      // call transform2.parse, which will set itself as the 
  -      // content handler for transform1, and call transform1.parse, 
  -      // which will set itself as the content listener for the 
  -      // SAX parser, and call parser.parse(new InputSource("xml/foo.xml")).
  -      filter3.parse(new InputSource(sourceID));
  -    }</pre>
  -</code>
   </body>
   </html>
  
  
  
  1.7       +159 -166  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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StreamResult.java	2000/11/18 01:19:14	1.6
  +++ StreamResult.java	2000/12/20 04:55:31	1.7
  @@ -54,6 +54,9 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +/**
  + * $Id: StreamResult.java,v 1.7 2000/12/20 04:55:31 sboag Exp $
  + */
   package javax.xml.transform.stream;
   
   import javax.xml.transform.*;
  @@ -64,176 +67,166 @@
   import java.io.Writer;
   import java.io.File;
   
  +
   /**
  - * Acts as an holder for a transformation result, 
  + * 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
  -{
  -  /** If {@link javax.xml.transform.TransformerFactory#getFeature} 
  -   * returns true when passed this value as an argument,
  -   * the Transformer supports Result output of this type.
  -   */
  -  public static final String FEATURE 
  -    = "http://javax.xml.transform.stream.StreamResult/feature";
  -
  -  /**
  -   * Zero-argument default constructor.
  -   */
  -  public StreamResult(){}
  -
  -  /**
  -   * Construct a StreamResult from a byte stream.  Normally, 
  -   * a stream should be used rather than a reader, so that 
  -   * the transformer may use instructions contained in the 
  -   * transformation instructions to control the encoding.
  -   *
  -   * @param outputStream A valid OutputStream reference.
  -   */
  -  public StreamResult(OutputStream outputStream)
  -  {
  -    setOutputStream(outputStream);
  -  }
  -
  -  /**
  -   * Construct a StreamResult from a character stream.  Normally, 
  -   * a stream should be used rather than a reader, so that 
  -   * the transformer may use instructions contained in the 
  -   * transformation instructions to control the encoding.  However, 
  -   * there are times when it is useful to write to a character 
  -   * stream, such as when using a StringWriter.
  -   *
  -   * @param writer  A valid Writer reference.
  -   */
  -  public StreamResult(Writer writer)
  -  {
  -    setWriter(writer);
  -  }
  -  
  -  /**
  -   * Construct a StreamResult from a URL.
  -   *
  -   * @param systemId Must be a String that conforms to the URI syntax.
  -   */
  -  public StreamResult(String systemId)
  -  {
  -    this.systemId = systemId;
  -  }
  -  
  -  /**
  -   * Construct a StreamResult from a File.
  -   *
  -   * @param f Must a non-null File reference.
  -   */
  -  public StreamResult(File f)
  -  {
  -    setSystemId(f);
  -  }
  -
  -  /**
  -   * Set the ByteStream that is to be written to.  Normally, 
  -   * a stream should be used rather than a reader, so that 
  -   * the transformer may use instructions contained in the 
  -   * transformation instructions to control the encoding.
  -   *
  -   * @param outputStream A valid OutputStream reference.
  -   */
  -  public void setOutputStream(OutputStream outputStream)
  -  {
  -    this.outputStream = outputStream;
  -  }
  -
  -  /**
  -   * Get the byte stream that was set with setOutputStream.
  -   *
  -   * @return The byte stream that was set with setOutputStream, or null
  -   * if setOutputStream or the ByteStream constructor was not called.
  -   */
  -  public OutputStream getOutputStream()
  -  {
  -    return outputStream;
  -  }
  -
  -  /**
  -   * Set the writer that is to receive the result.  Normally, 
  -   * a stream should be used rather than a writer, so that 
  -   * the transformer may use instructions contained in the 
  -   * transformation instructions to control the encoding.  However, 
  -   * there are times when it is useful to write to a writer, 
  -   * such as when using a StringWriter.
  -   *
  -   * @param writer  A valid Writer reference.
  -   */
  -  public void setWriter(Writer writer)
  -  {
  -    this.writer = writer;
  -  }
  -
  -  /**
  -   * Get the character stream that was set with setWriter.
  -   *
  -   * @return The character stream that was set with setWriter, or null
  -   * if setWriter or the Writer constructor was not called.
  -   */
  -  public Writer getWriter()
  -  {
  -    return writer;
  -  }
  -
  -  /**
  -   * Set the systemID that may be used in association
  -   * with the byte or character stream, or, if neither is set, use 
  -   * this value as a writeable URI (probably a file name).
  -   *
  -   * @param systemId The system identifier as a URI string.
  -   */
  -  public void setSystemId(String systemId)
  -  {
  -    this.systemId = systemId;
  -  }
  -  
  -  /**
  -   * Set the system ID from a File reference.
  -   *
  -   * @param f Must a non-null File reference.
  -   */
  -  public void setSystemId(File f)
  -  {
  -    this.systemId = "file:///"+f.getAbsolutePath();
  -  }
  -
  -  /**
  -   * Get the system identifier that was set with setSystemId.
  -   *
  -   * @return The system identifier that was set with setSystemId, or null
  -   * if setSystemId was not called.
  -   */
  -  public String getSystemId()
  -  {
  -    return systemId;
  -  }
  -  
  -  //////////////////////////////////////////////////////////////////////
  -  // Internal state.
  -  //////////////////////////////////////////////////////////////////////
  -
  -  /**
  -   * The systemID that may be used in association
  -   * with the byte or character stream, or, if neither is set, use 
  -   * this value as a writeable URI (probably a file name).
  -   */
  -  private String systemId;
  -
  -  /**
  -   * The byte stream that is to be written to.
  -   */
  -  private OutputStream outputStream;
  -
  -  /**
  -   * The character stream that is to be written to.
  -   */
  -  private Writer writer;
  +public class StreamResult implements Result {
  +
  +    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +     * returns true when passed this value as an argument,
  +     * the Transformer supports Result output of this type.
  +     */
  +    public static final String FEATURE =
  +        "http://javax.xml.transform.stream.StreamResult/feature";
  +
  +    /**
  +     * Zero-argument default constructor.
  +     */
  +    public StreamResult() {}
  +
  +    /**
  +     * Construct a StreamResult from a byte stream.  Normally,
  +     * a stream should be used rather than a reader, so that
  +     * the transformer may use instructions contained in the
  +     * transformation instructions to control the encoding.
  +     *
  +     * @param outputStream A valid OutputStream reference.
  +     */
  +    public StreamResult(OutputStream outputStream) {
  +        setOutputStream(outputStream);
  +    }
  +
  +    /**
  +     * Construct a StreamResult from a character stream.  Normally,
  +     * a stream should be used rather than a reader, so that
  +     * the transformer may use instructions contained in the
  +     * transformation instructions to control the encoding.  However,
  +     * there are times when it is useful to write to a character
  +     * stream, such as when using a StringWriter.
  +     *
  +     * @param writer  A valid Writer reference.
  +     */
  +    public StreamResult(Writer writer) {
  +        setWriter(writer);
  +    }
  +
  +    /**
  +     * Construct a StreamResult from a URL.
  +     *
  +     * @param systemId Must be a String that conforms to the URI syntax.
  +     */
  +    public StreamResult(String systemId) {
  +        this.systemId = systemId;
  +    }
  +
  +    /**
  +     * Construct a StreamResult from a File.
  +     *
  +     * @param f Must a non-null File reference.
  +     */
  +    public StreamResult(File f) {
  +        setSystemId(f);
  +    }
  +
  +    /**
  +     * Set the ByteStream that is to be written to.  Normally,
  +     * a stream should be used rather than a reader, so that
  +     * the transformer may use instructions contained in the
  +     * transformation instructions to control the encoding.
  +     *
  +     * @param outputStream A valid OutputStream reference.
  +     */
  +    public void setOutputStream(OutputStream outputStream) {
  +        this.outputStream = outputStream;
  +    }
  +
  +    /**
  +     * Get the byte stream that was set with setOutputStream.
  +     *
  +     * @return The byte stream that was set with setOutputStream, or null
  +     * if setOutputStream or the ByteStream constructor was not called.
  +     */
  +    public OutputStream getOutputStream() {
  +        return outputStream;
  +    }
  +
  +    /**
  +     * Set the writer that is to receive the result.  Normally,
  +     * a stream should be used rather than a writer, so that
  +     * the transformer may use instructions contained in the
  +     * transformation instructions to control the encoding.  However,
  +     * there are times when it is useful to write to a writer,
  +     * such as when using a StringWriter.
  +     *
  +     * @param writer  A valid Writer reference.
  +     */
  +    public void setWriter(Writer writer) {
  +        this.writer = writer;
  +    }
  +
  +    /**
  +     * Get the character stream that was set with setWriter.
  +     *
  +     * @return The character stream that was set with setWriter, or null
  +     * if setWriter or the Writer constructor was not called.
  +     */
  +    public Writer getWriter() {
  +        return writer;
  +    }
  +
  +    /**
  +     * Set the systemID that may be used in association
  +     * with the byte or character stream, or, if neither is set, use
  +     * this value as a writeable URI (probably a file name).
  +     *
  +     * @param systemId The system identifier as a URI string.
  +     */
  +    public void setSystemId(String systemId) {
  +        this.systemId = systemId;
  +    }
  +
  +    /**
  +     * Set the system ID from a File reference.
  +     *
  +     * @param f Must a non-null File reference.
  +     */
  +    public void setSystemId(File f) {
  +        this.systemId = "file:///" + f.getAbsolutePath();
  +    }
  +
  +    /**
  +     * Get the system identifier that was set with setSystemId.
  +     *
  +     * @return The system identifier that was set with setSystemId, or null
  +     * if setSystemId was not called.
  +     */
  +    public String getSystemId() {
  +        return systemId;
  +    }
  +
  +    //////////////////////////////////////////////////////////////////////
  +    // Internal state.
  +    //////////////////////////////////////////////////////////////////////
  +
  +    /**
  +     * The systemID that may be used in association
  +     * with the byte or character stream, or, if neither is set, use
  +     * this value as a writeable URI (probably a file name).
  +     */
  +    private String systemId;
  +
  +    /**
  +     * The byte stream that is to be written to.
  +     */
  +    private OutputStream outputStream;
  +
  +    /**
  +     * The character stream that is to be written to.
  +     */
  +    private Writer writer;
   }
  
  
  
  1.7       +234 -248  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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StreamSource.java	2000/11/18 01:19:14	1.6
  +++ StreamSource.java	2000/12/20 04:55:31	1.7
  @@ -54,6 +54,9 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +/**
  + * $Id: StreamSource.java,v 1.7 2000/12/20 04:55:31 sboag Exp $
  + */
   package javax.xml.transform.stream;
   
   import javax.xml.transform.Source;
  @@ -62,258 +65,241 @@
   import java.io.Reader;
   import java.io.File;
   
  +
   /**
  - * Acts as an holder for a transformation Source in the form 
  + * 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
  -{
  -  /** If {@link javax.xml.transform.TransformerFactory#getFeature} 
  -   * returns true when passed this value as an argument,
  -   * the Transformer supports Source input of this type.
  -   */
  -  public static final String FEATURE 
  -    = "http://javax.xml.transform.stream.StreamSource/feature";
  -
  -  /**
  -   * Zero-argument default constructor. If this constructor 
  -   * is used, and no other method is called, the transformer 
  -   * will assume an empty input tree, with a default root node.
  -   */
  -  public StreamSource(){}
  -
  -  /**
  -   * Construct a StreamSource from a byte stream.  Normally, 
  -   * a stream should be used rather than a reader, so 
  -   * the XML parser can resolve character encoding specified 
  -   * by the XML declaration.
  -   * 
  -   * <p>If this constructor is used to process a stylesheet, normally 
  -   * setSystemId should also be called, so that relative URI references 
  -   * can be resolved.</p>
  -   *
  -   * @param inputStream A valid InputStream reference to an XML stream.
  -   */
  -  public StreamSource(InputStream inputStream)
  -  {
  -    setInputStream(inputStream);
  -  }
  -  
  -  /**
  -   * Construct a StreamSource from a byte stream.  Normally, 
  -   * a stream should be used rather than a reader, so that 
  -   * the XML parser can resolve character encoding specified 
  -   * by the XML declaration.
  -   * 
  -   * <p>This constructor allows the systemID to be set in addition 
  -   * to the input stream, which allows relative URIs 
  -   * to be processed.</p>
  -   *
  -   * @param inputStream A valid InputStream reference to an XML stream.
  -   * @param systemId Must be a String that conforms to the URI syntax.
  -   */
  -  public StreamSource(InputStream inputStream, String systemId)
  -  {
  -    setInputStream(inputStream);
  -    setSystemId(systemId);
  -  }
  -
  -
  -  /**
  -   * Construct a StreamSource from a character reader.  Normally, 
  -   * a stream should be used rather than a reader, so that 
  -   * the XML parser can resolve character encoding specified 
  -   * by the XML declaration.  However, in many cases the encoding 
  -   * of the input stream is already resolved, as in the case of 
  -   * reading XML from a StringReader.
  -   *
  -   * @param reader A valid Reader reference to an XML character stream.
  -   */
  -  public StreamSource(Reader reader)
  -  {
  -    setReader(reader);
  -  }
  -  
  -  /**
  -   * Construct a StreamSource from a character reader.  Normally, 
  -   * a stream should be used rather than a reader, so that 
  -   * the XML parser may resolve character encoding specified 
  -   * by the XML declaration.  However, in many cases the encoding 
  -   * of the input stream is already resolved, as in the case of 
  -   * reading XML from a StringReader.
  -   *
  -   * @param reader A valid Reader reference to an XML character stream.
  -   * @param systemId Must be a String that conforms to the URI syntax.
  -   */
  -  public StreamSource(Reader reader, String systemId)
  -  {
  -    setReader(reader);
  -    setSystemId(systemId);
  -  }
  -
  -
  -  /**
  -   * Construct a StreamSource from a URL.
  -   *
  -   * @param systemId Must be a String that conforms to the URI syntax.
  -   */
  -  public StreamSource(String systemId)
  -  {
  -    this.systemId = systemId;
  -  }
  -  
  -  /**
  -   * Construct a StreamSource from a File.
  -   *
  -   * @param f Must a non-null File reference.
  -   */
  -  public StreamSource(File f)
  -  {
  -    this.systemId = "file:///"+f.getAbsolutePath();
  -  }
  -
  -  /**
  -   * Set the byte stream to be used as input.  Normally, 
  -   * a stream should be used rather than a reader, so that 
  -   * the XML parser can resolve character encoding specified 
  -   * by the XML declaration.
  -   * 
  -   * <p>If this Source object is used to process a stylesheet, normally 
  -   * setSystemId should also be called, so that relative URL references 
  -   * can be resolved.</p>
  -   *
  -   * @param inputStream A valid InputStream reference to an XML stream.
  -   */
  -  public void setInputStream(InputStream inputStream)
  -  {
  -    this.inputStream = inputStream;
  -  }
  -
  -  /**
  -   * Get the byte stream that was set with setByteStream.
  -   *
  -   * @return The byte stream that was set with setByteStream, or null
  -   * if setByteStream or the ByteStream constructor was not called.
  -   */
  -  public InputStream getInputStream()
  -  {
  -    return inputStream;
  -  }
  -
  -  /**
  -   * Set the input to be a character reader.  Normally, 
  -   * a stream should be used rather than a reader, so that 
  -   * the XML parser can resolve character encoding specified 
  -   * by the XML declaration.  However, in many cases the encoding 
  -   * of the input stream is already resolved, as in the case of 
  -   * reading XML from a StringReader.
  -   *
  -   * @param reader A valid Reader reference to an XML CharacterStream.   
  -   */
  -  public void setReader(Reader reader)
  -  {
  -    this.reader = reader;
  -  }
  -
  -  /**
  -   * Get the character stream that was set with setReader.
  -   *
  -   * @return The character stream that was set with setReader, or null
  -   * if setReader or the Reader constructor was not called.
  -   */
  -  public Reader getReader()
  -  {
  -    return reader;
  -  }
  -
  -  /**
  -   * Set the public identifier for this Source.
  -   *
  -   * <p>The public identifier is always optional: if the application
  -   * writer includes one, it will be provided as part of the
  -   * location information.</p>
  -   * 
  -   * @param publicId The public identifier as a string.
  -   */
  -  public void setPublicId(String publicId)
  -  {
  -    this.publicId = publicId;
  -  }
  -
  -  /**
  -   * Get the public identifier that was set with setPublicId.
  -   *
  -   * @return The public identifier that was set with setPublicId, or null
  -   * if setPublicId was not called.
  -   */
  -  public String getPublicId()
  -  {
  -    return publicId;
  -  }
  -
  -  /**
  -   * Set the system identifier for this Source.
  -   *
  -   * <p>The system identifier is optional if there is a byte stream
  -   * or a character stream, but it is still useful to provide one,
  -   * since the application can use it to resolve relative URIs
  -   * and can include it in error messages and warnings (the parser
  -   * will attempt to open a connection to the URI only if
  -   * there is no byte stream or character stream specified).</p>
  -   *
  -   * @param systemId The system identifier as a URL string.
  -   */
  -  public void setSystemId(String systemId)
  -  {
  -    this.systemId = systemId;
  -  }
  -
  -  /**
  -   * Get the system identifier that was set with setSystemId.
  -   *
  -   * @return The system identifier that was set with setSystemId, or null
  -   * if setSystemId was not called.
  -   */
  -  public String getSystemId()
  -  {
  -    return systemId;
  -  }
  -  
  -  /**
  -   * Set the system ID from a File reference.
  -   *
  -   * @param f Must a non-null File reference.
  -   */
  -  public void setSystemId(File f)
  -  {
  -    this.systemId = "file:///"+f.toString();
  -  }
  -  
  -  //////////////////////////////////////////////////////////////////////
  -  // Internal state.
  -  //////////////////////////////////////////////////////////////////////
  -
  -  /**
  -   * The public identifier for this input source, or null.
  -   */
  -  private String publicId;
  -
  -  /**
  -   * The system identifier as a URL string, or null.
  -   */
  -  private String systemId;
  -
  -  /**
  -   * The byte stream for this Source, or null.
  -   */
  -  private InputStream inputStream;
  -
  -  /**
  -   * The character stream for this Source, or null.
  -   */
  -  private Reader reader;
  -    
  +public class StreamSource implements Source {
  +
  +    /** If {@link javax.xml.transform.TransformerFactory#getFeature}
  +     * returns true when passed this value as an argument,
  +     * the Transformer supports Source input of this type.
  +     */
  +    public static final String FEATURE =
  +        "http://javax.xml.transform.stream.StreamSource/feature";
  +
  +    /**
  +     * Zero-argument default constructor. If this constructor
  +     * is used, and no other method is called, the transformer
  +     * will assume an empty input tree, with a default root node.
  +     */
  +    public StreamSource() {}
  +
  +    /**
  +     * Construct a StreamSource from a byte stream.  Normally,
  +     * a stream should be used rather than a reader, so
  +     * the XML parser can resolve character encoding specified
  +     * by the XML declaration.
  +     *
  +     * <p>If this constructor is used to process a stylesheet, normally
  +     * setSystemId should also be called, so that relative URI references
  +     * can be resolved.</p>
  +     *
  +     * @param inputStream A valid InputStream reference to an XML stream.
  +     */
  +    public StreamSource(InputStream inputStream) {
  +        setInputStream(inputStream);
  +    }
  +
  +    /**
  +     * Construct a StreamSource from a byte stream.  Normally,
  +     * a stream should be used rather than a reader, so that
  +     * the XML parser can resolve character encoding specified
  +     * by the XML declaration.
  +     *
  +     * <p>This constructor allows the systemID to be set in addition
  +     * to the input stream, which allows relative URIs
  +     * to be processed.</p>
  +     *
  +     * @param inputStream A valid InputStream reference to an XML stream.
  +     * @param systemId Must be a String that conforms to the URI syntax.
  +     */
  +    public StreamSource(InputStream inputStream, String systemId) {
  +        setInputStream(inputStream);
  +        setSystemId(systemId);
  +    }
  +
  +    /**
  +     * Construct a StreamSource from a character reader.  Normally,
  +     * a stream should be used rather than a reader, so that
  +     * the XML parser can resolve character encoding specified
  +     * by the XML declaration.  However, in many cases the encoding
  +     * of the input stream is already resolved, as in the case of
  +     * reading XML from a StringReader.
  +     *
  +     * @param reader A valid Reader reference to an XML character stream.
  +     */
  +    public StreamSource(Reader reader) {
  +        setReader(reader);
  +    }
  +
  +    /**
  +     * Construct a StreamSource from a character reader.  Normally,
  +     * a stream should be used rather than a reader, so that
  +     * the XML parser may resolve character encoding specified
  +     * by the XML declaration.  However, in many cases the encoding
  +     * of the input stream is already resolved, as in the case of
  +     * reading XML from a StringReader.
  +     *
  +     * @param reader A valid Reader reference to an XML character stream.
  +     * @param systemId Must be a String that conforms to the URI syntax.
  +     */
  +    public StreamSource(Reader reader, String systemId) {
  +        setReader(reader);
  +        setSystemId(systemId);
  +    }
  +
  +    /**
  +     * Construct a StreamSource from a URL.
  +     *
  +     * @param systemId Must be a String that conforms to the URI syntax.
  +     */
  +    public StreamSource(String systemId) {
  +        this.systemId = systemId;
  +    }
  +
  +    /**
  +     * Construct a StreamSource from a File.
  +     *
  +     * @param f Must a non-null File reference.
  +     */
  +    public StreamSource(File f) {
  +        this.systemId = "file:///" + f.getAbsolutePath();
  +    }
  +
  +    /**
  +     * Set the byte stream to be used as input.  Normally,
  +     * a stream should be used rather than a reader, so that
  +     * the XML parser can resolve character encoding specified
  +     * by the XML declaration.
  +     *
  +     * <p>If this Source object is used to process a stylesheet, normally
  +     * setSystemId should also be called, so that relative URL references
  +     * can be resolved.</p>
  +     *
  +     * @param inputStream A valid InputStream reference to an XML stream.
  +     */
  +    public void setInputStream(InputStream inputStream) {
  +        this.inputStream = inputStream;
  +    }
  +
  +    /**
  +     * Get the byte stream that was set with setByteStream.
  +     *
  +     * @return The byte stream that was set with setByteStream, or null
  +     * if setByteStream or the ByteStream constructor was not called.
  +     */
  +    public InputStream getInputStream() {
  +        return inputStream;
  +    }
  +
  +    /**
  +     * Set the input to be a character reader.  Normally,
  +     * a stream should be used rather than a reader, so that
  +     * the XML parser can resolve character encoding specified
  +     * by the XML declaration.  However, in many cases the encoding
  +     * of the input stream is already resolved, as in the case of
  +     * reading XML from a StringReader.
  +     *
  +     * @param reader A valid Reader reference to an XML CharacterStream.
  +     */
  +    public void setReader(Reader reader) {
  +        this.reader = reader;
  +    }
  +
  +    /**
  +     * Get the character stream that was set with setReader.
  +     *
  +     * @return The character stream that was set with setReader, or null
  +     * if setReader or the Reader constructor was not called.
  +     */
  +    public Reader getReader() {
  +        return reader;
  +    }
  +
  +    /**
  +     * Set the public identifier for this Source.
  +     *
  +     * <p>The public identifier is always optional: if the application
  +     * writer includes one, it will be provided as part of the
  +     * location information.</p>
  +     *
  +     * @param publicId The public identifier as a string.
  +     */
  +    public void setPublicId(String publicId) {
  +        this.publicId = publicId;
  +    }
  +
  +    /**
  +     * Get the public identifier that was set with setPublicId.
  +     *
  +     * @return The public identifier that was set with setPublicId, or null
  +     * if setPublicId was not called.
  +     */
  +    public String getPublicId() {
  +        return publicId;
  +    }
  +
  +    /**
  +     * Set the system identifier for this Source.
  +     *
  +     * <p>The system identifier is optional if there is a byte stream
  +     * or a character stream, but it is still useful to provide one,
  +     * since the application can use it to resolve relative URIs
  +     * and can include it in error messages and warnings (the parser
  +     * will attempt to open a connection to the URI only if
  +     * there is no byte stream or character stream specified).</p>
  +     *
  +     * @param systemId The system identifier as a URL string.
  +     */
  +    public void setSystemId(String systemId) {
  +        this.systemId = systemId;
  +    }
  +
  +    /**
  +     * Get the system identifier that was set with setSystemId.
  +     *
  +     * @return The system identifier that was set with setSystemId, or null
  +     * if setSystemId was not called.
  +     */
  +    public String getSystemId() {
  +        return systemId;
  +    }
  +
  +    /**
  +     * Set the system ID from a File reference.
  +     *
  +     * @param f Must a non-null File reference.
  +     */
  +    public void setSystemId(File f) {
  +        this.systemId = "file:///" + f.toString();
  +    }
  +
  +    //////////////////////////////////////////////////////////////////////
  +    // Internal state.
  +    //////////////////////////////////////////////////////////////////////
  +
  +    /**
  +     * The public identifier for this input source, or null.
  +     */
  +    private String publicId;
  +
  +    /**
  +     * The system identifier as a URL string, or null.
  +     */
  +    private String systemId;
  +
  +    /**
  +     * The byte stream for this Source, or null.
  +     */
  +    private InputStream inputStream;
  +
  +    /**
  +     * The character stream for this Source, or null.
  +     */
  +    private Reader reader;
   }
  
  
  
  1.6       +0 -23     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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- package.html	2000/11/23 00:05:55	1.5
  +++ package.html	2000/12/20 04:55:32	1.6
  @@ -26,28 +26,5 @@
   	 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>
  -<p>The following code fragment illustrates the use of the stream Source
  -	 and Result objects.</p>
  -<code>
  -<pre>    // Create a TransformerFactory instance.
  -    TransformerFactory tfactory = TransformerFactory.newInstance();
  -
  -    InputStream xslIS = new BufferedInputStream(new FileInputStream(xslID));
  -    StreamSource xslSource = new StreamSource(xslIS);
  -    // Note that if we don't do this, relative URLs cannot be resolved correctly!
  -    xslSource.setSystemId(xslID);
  -
  -    // Create a transformer for the stylesheet.
  -    Transformer transformer = tfactory.newTransformer(xslSource);
  -    
  -    InputStream xmlIS = new BufferedInputStream(new FileInputStream(sourceID));
  -    StreamSource xmlSource = new StreamSource(xmlIS);
  -    // Note that if we don't do this, relative URLs cannot be resolved correctly!
  -    xmlSource.setSystemId(sourceID);
  -    
  -    // Transform the source XML to System.out.
  -    transformer.transform( xmlSource, new StreamResult(System.out));
  -</pre>
  -</code>
   </body>
   </html>