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/11/07 18:25:48 UTC

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

sboag       00/11/07 09:25:44

  Modified:    java/src/javax/xml/transform Transformer.java
                        TransformerFactory.java package.html
               java/src/javax/xml/transform/dom DOMLocator.java
                        DOMResult.java DOMSource.java
               java/src/javax/xml/transform/sax SAXResult.java
                        SAXSource.java SAXTransformerFactory.java
               java/src/javax/xml/transform/stream OutputKeys.java
                        StreamResult.java StreamSource.java
  Added:       java/src/javax/xml/transform/dom package.html
               java/src/javax/xml/transform/sax package.html
               java/src/javax/xml/transform/stream package.html
  Log:
  Javadoc fixes.
  
  Revision  Changes    Path
  1.4       +78 -21    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Transformer.java	2000/11/07 00:22:29	1.3
  +++ Transformer.java	2000/11/07 17:25:14	1.4
  @@ -66,10 +66,8 @@
    * TransformerFactory.newTransformer</code> method. Once an instance
    * of this class is obtained, XML can be processed from a variety
    * of sources with the output from the transform being written
  - * to a variety of sinks.</p>
 * 
  - * <p>An object of this class can not be used concurrently over
  + * to a variety of sinks.</p>
 * <p>An object of this class can not be used concurrently over
    * multiple threads.</p>
  - * 
    * <p>A Transformer may be used multiple times.  Parameters and 
    * output properties are preserved across transformations.</p>
    *
  @@ -92,6 +90,17 @@
   
     /**
      * Add a parameter for the transformation.
  +   * 
  +   * <p>In order to pass namespaced names, the name can be passed as 
   * a two-part string, with
  +   * the first part being the URL, the delimiter being the '{' for the start of the
  +   * URI and '}' signifies the end, with the local name following. If the qname has
  +   * a null URL, then the String object will 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 QName 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 have a namespace URI.
  @@ -103,6 +112,26 @@
     public abstract void setParameter(String name, Object value);
     
     /**
  +   * Set a bag of parameters for the transformation. Note that 
  +   * these will not be additive, they will replace the existing
  +   * set of parameters.
  +   * 
  +   * <p>In order to pass namespaced names, the name can be passed as 
   * a two-part string, with
  +   * the first part being the URL, the delimiter being the '{' for the start of the
  +   * URI and '}' signifies the end, with the local name following. If the qname has
  +   * a null URL, then the String object will 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 QName would be "{http://xyz.foo.com/yada/baz.html}foo". Note that
  +   * no prefix is used.</p>
  +   *
  +   * @param params A list of name-value pairs.
  +   */
  +  public abstract void setParameters(Properties params);
  +  
  +  /**
      * Get a parameter that was explicitly set with setParameter 
      * or setParameters.
      *
  @@ -114,15 +143,6 @@
     public abstract Object getParameter(String name);
   
     /**
  -   * Set a bag of parameters for the transformation. Note that 
  -   * these will not be additive, they will replace the existing
  -   * set of parameters.
  -   *
  -   * @param params A list of name-value pairs.
  -   */
  -  public abstract void setParameters(Properties params);
  -
  -  /**
      * Set an object that will be used to resolve URIs used in
      * document(), etc.
      * 
  @@ -147,10 +167,23 @@
      *
      * <p>If argument to this function is null, any properties
      * previously set will be removed.</p>
  +   * 
  +   * <p>In order to pass namespaced names, the name can be passed as 
   * a two-part string, with
  +   * the first part being the URL, the delimiter being the '{' for the start of the
  +   * URI and '}' signifies the end, with the local name following. If the qname has
  +   * a null URL, then the String object will 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 QName 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 effect
      * for the transformation.
  +   * 
  +   * @see javax.xml.transform.stream.OutputKeys
      */
     public abstract void setOutputProperties(Properties oformat);
   
  @@ -164,28 +197,52 @@
      *
      * @returns A copy of the set of output properties in effect
      * for the next transformation.
  +   * 
  +   * @see javax.xml.transform.stream.OutputKeys
      */
     public abstract Properties getOutputProperties();
   
     /**
  -   * Method setProperty
  -   *
  -   * @param name
  -   * @param value
  +   * Set an output property that will be in effect for the 
  +   * transformation.
  +   * 
  +   * <p>In order to pass namespaced names, the name can be passed as 
   * a two-part string, with
  +   * the first part being the URL, the delimiter being the '{' for the start of the
  +   * URI and '}' signifies the end, with the local name following. If the qname has
  +   * a null URL, then the String object will 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 QName would be "{http://xyz.foo.com/yada/baz.html}foo". Note that
  +   * no prefix is used.</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 TransformerConfigurationException
  +   * @throws TransformerException
  +   * 
  +   * @see javax.xml.transform.stream.OutputKeys
      */
     public abstract void setOutputProperty(String name, String value)
       throws TransformerException;
   
     /**
  -   * Method getProperty
  +   * 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
  +   * @param name A non-null String that specifies an output 
  +   * property name, which may be namespace qualified.
      *
  -   * @return
  +   * @return The string value of the output property, or null 
  +   * if no property was found.
      *
  -   * @throws TransformerConfigurationException
  +   * @throws TransformerException
  +   * 
  +   * @see javax.xml.transform.stream.OutputKeys
      */
     public abstract String getOutputProperty(String name)
       throws TransformerException;
  
  
  
  1.4       +6 -12     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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransformerFactory.java	2000/11/07 00:29:43	1.3
  +++ TransformerFactory.java	2000/11/07 17:25:15	1.4
  @@ -70,15 +70,11 @@
    * A TransformerFactory instance creates Transformer and Template
    * objects.
    *
  - * A particular TransformerFactory is "plugged" into the platform via
  - * Processor in one of two ways: 1) as a platform default,
  - * and 2) through external specification by a system property named
  - * "javax.xml.transform.xslt" obtained using java.lang.System.getProperty().
  - * Or, a given application may set a platform default factory name, which
  - * will be used if no system property is found.
  - * A derived class with the specified name shall implement a
  - * public no-args constructor used by the base abstract class to
  - * create a concrete instance of this class.
  + * <p>The system property that controls which Factory implementation
  + * to create is named "javax.xml.transform.TransformerFactory". This
  + * property names a class that is a concrete subclass of this
  + * TransformerFactory abstract class. If no property is defined, 
  + * a platform default will be used.</p>
    *
    * @version Alpha
    * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
  @@ -113,10 +109,8 @@
      *
      * @return new TransformerFactory instance, never null.
      *
  -   * @exception javax.xml.parsers.TransformerConfigurationException
  +   * @throws TFactoryConfigurationError
      * if the implmentation is not available or cannot be instantiated.
  -   *
  -   * @throws TransformerConfigurationException
      */
     public static TransformerFactory newInstance()
             throws TFactoryConfigurationError
  
  
  
  1.2       +181 -59   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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	2000/11/03 23:22:10	1.1
  +++ package.html	2000/11/07 17:25:17	1.2
  @@ -7,19 +7,22 @@
   </head>
   <body> 
     <h2>Transformations API For XML (TrAX)</h2> 
  -  <p>October 30, 2000</p> 
  -  <p>&copy;Copyright 2000 Java Community Process (Sun Microsystems,
  -	 Inc.)</p> 
  +  <p>
  +<b>Edit Date: </b>November 6, 2000</p> 
  +   
       
     <h3>Introduction</h3> 
  +  <p>This overview describes the set of APIs contained in
  +	 javax.xml.transform. These interfaces are referred to, for the sake of brevity,
  +	 as TrAX (Transformations for XML).</p> 
     <p>There is a broad need for Java applications to be able to transform XML
   	 and related tree-shaped data structures. In fact, XML is not normally very
   	 useful to an application without going through some sort of transformation,
   	 unless the semantic structure is used directly as data. Almost all xml-related
   	 applications need to perform transformations. Transformations may be described
   	 by Java code, Perl code, XSLT Stylesheets, other types of script, or by
  -	 proprietary formats. The inputs, one or multiple, to a transformation, may be
  -	 an URL, XML stream, a DOM tree, SAX Events, or a proprietary format or data
  +	 proprietary formats. The inputs, one or multiple, to a transformation, may be a
  +	 URL, XML stream, a DOM tree, SAX Events, or a proprietary format or data
   	 structure. The output types are the pretty much the same types as the inputs,
   	 but different inputs may need to be combined with different outputs.</p> 
     <p>The great challenge of a transformation API is how to deal with
  @@ -36,21 +39,84 @@
   		document. Technical terminology will be explained in the Model section. In many
   		cases, the general terminology overlaps with the technical terminology.</p> 
   	 <dl>
  -<dt>Transformation</dt>
  +<dt>
  +<b>Tree</b>
  +</dt>
  +<dd>This term, as used within this document, describes an
  +			 abstract structure that consists of nodes or events that may be produced by
  +			 XML. A Tree physically may be a DOM tree, a series of well balanced parse
  +			 events, a series of requests (the result of which can describe a tree), or a
  +			 stream of marked-up characters.</dd>
  +<dt>
  +<b>Source Tree(s)</b>
  +</dt>
  +<dd>One or more trees that are the inputs to the
  +			 transformation.</dd>
  +<dt>
  +<b>Result Tree(s)</b>
  +</dt>
  +<dd>One or more trees that are the output of the
  +			 transformation.</dd>
  +<dt>
  +<b>Transformation</b>
  +</dt>
   <dd>The processor of consuming a stream or tree to produce
   			 another stream or tree.</dd>
  -<dt>Serialization</dt>
  +<dt>
  +<b>Identity (or Copy) Transformation</b>
  +</dt>
  +<dd>The process of transformation from a source to a result,
  +			 making as few structural changes as possible and no informational changes. The
  +			 term is somewhat loosely used, as the process is really a copy.</dd>
  +<dt>
  +<b>Serialization</b>
  +</dt>
   <dd>The process of taking a tree and turning it into a stream. In
   			 some sense, serialization is a specialization of transformation.</dd>
  -<dt>Transformer</dt>
  +<dt>
  +<b>Parsing</b>
  +</dt>
  +<dd>The process of taking a stream and turning it into a tree. In
  +			 some sense, parsing is a specialization of transformation.</dd>
  +<dt>
  +<b>Transformer</b>
  +</dt>
   <dd>A transformer is the thing that executes the transformation.
   			 </dd>
  -<dt>Transformation instructions</dt>
  -<dd>Describes the transformation. A form of code or
  -			 script.</dd>
  -<dt>Processor</dt>
  +<dt>
  +<b>Transformation instructions</b>
  +</dt>
  +<dd>Describes the transformation. A form of code, script, or
  +			 simply a declaration or series of declarations.</dd>
  +<dt>
  +<b>Stylesheet</b>
  +</dt>
  +<dd>The same as "transformation instructions", except it is
  +			 likely to be used in conjunction with XSLT.</dd>
  +<dt>
  +<b>Template or Templates</b>
  +</dt>
  +<dd>Another form of "transformation instructions", except in the
  +			 TrAX interface it is used to describe the processed transformation
  +			 instructions. A template is an object through which the source flows, to be
  +			 formed into the result.</dd>
  +<dt>
  +<b>Processor</b>
  +</dt>
   <dd>A general term for the thing that may both process the
   			 transformation instructions, and perform the transformation.</dd>
  +<dt>
  +<b>DOM</b>
  +</dt>
  +<dd>Document Object Model, specifically refering to the
  +			 Document Object Model
  +			 (DOM) Level 2 Specification.</dd>
  +<dt>
  +<b>SAX</b>
  +</dt>
  +<dd>Simple API for XML, specifically refering to the
  +			 SAX 2.0
  +			 release.</dd>
   </dl> 
      
     <h3>Requirements</h3> 
  @@ -77,8 +143,8 @@
   		trees.</li>
   <li>TrAX must be able to allow processors to transform SAX
   		events.</li>
  -<li>TrAX must be able to allow processors to produce DOM
  -		trees.</li>
  +<li>TrAX must be able to allow processors to produce SAX
  +		events.</li>
   <li>TrAX must be able to allow processors to transform streams of
   		XML.</li>
   <li>TrAX must be able to allow processors to produce XML, HTML, and
  @@ -124,52 +190,109 @@
   	 object model, or in the form of parse events, into a stream, is known as
   	 Serialization. This term, although it overlaps with Java
   	 object serialization, is the best description of this process.</p>
  -  
  -  ProcessorGeneric concept for the
  +  <H3>TRaX Patterns</H3>
  +<dl>
  +<dt>
  +<b>Processor</b>
  +</dt>
  +<dd>
  +<p>
  +<i>Intent: </i>Generic concept for the
     set of objects that implement the TrAX
  -  interfaces.Create compiled transformation
  +  interfaces.</p>
  +<p>
  +<i>Responsibilities: </i>Create compiled transformation
     instructions, transform resources, and manager parameters and properties of
  -  those transformations.Only the Templates
  +  those transformations.</p>
  +<p>
  +<i>Thread safety: </i>Only the Templates
     object can be used concurrently in multiple threads. The rest of the processor
     does not do synchronized blocking, and so can not be used
  -  concurrently.
  -  TransformerFactory Serve as a vendor
  +  concurrently.</p>
  +</dd>
  +<dt>
  +<b>TransformerFactory</b>
  +</dt>
  +<dd>
  +<p>
  +<i>Intent: </i>Serve as a vendor
     neutral Processor interface for XSLT processors and similar
  -  processors. Serve as a factory for a concrete
  +  processors.</p>
  +<p>
  +<i>Responsibilities: </i>Serve as a factory for a concrete
     implementation of an TransformerFactory, serve as a direct factory for
     Transformer objects, serve as a factory for Templates objects, and manage
  -  processor specific features.
  -  TransformerFactorys can not run concurrently.
  -    Templates The run
  -  time representation of the transformation instructions.
  -  Acts as a data bag for transformation instructions, act as a
  -  factory for Transformers. Threadsafe
  +  processor specific features.</p>
  +<p>
  +<i>Thread safety: </i>TransformerFactorys can not run concurrently.</p>
  +</dd>
  +<dt>
  +<b>Templates</b>
  +</dt>
  +<dd>
  +<p>
  +<i>Intent: </i>The run
  +  time representation of the transformation instructions.</p>
  +<p>
  +<i>Responsibilities: </i>Acts as a data bag for transformation instructions, act as a
  +  factory for Transformers.</p>
  +<p>
  +<i>Thread safety: </i>Threadsafe
     concurrently over multiple threads once construction is
  -  complete.  
  -  Transformer Act as a per-thread execution
  +  complete.</p>
  +</dd>
  +<dt>
  +<b>Transformer</b>
  +</dt>
  +<dd>
  +<p>
  +<i>Intent: </i>Act as a per-thread execution
     context for transformations, act as an interface for performing the
  -  transformation.Perfom the
  -  transformation. Only safe one instance per
  -  thread. The Transformer is bound to the Templates object
  -  that created it.  
  -  Source Serve as a single vendor-neutral
  -  object for multiple types of input. Act as simple
  -  data holder for System IDs, DOM nodes, streams, etc.
  -  Threadsafe concurrently over multiple threads for read-only,
  -  must be synchronized for edit. 
  -  Result
  -  ResultTarget Serve
  +  transformation.</p>
  +<p>
  +<i>Responsibilities: </i>Perfom the
  +  transformation.</p>
  +<p>
  +<i>Thread safety: </i>Only safe one instance per
  +  thread.</p>
  +<p>
  +<i>Notes: </i>The Transformer is bound to the Templates object
  +  that created it.</p>
  +</dd>
  +<dt>
  +<b>Source</b>
  +</dt>
  +<dd>
  +<p>
  +<i>Intent: </i>Serve as a single vendor-neutral
  +  object for multiple types of input.</p>
  +<p>
  +<i>Responsibilities: </i>Act as simple
  +  data holder for System IDs, DOM nodes, streams, etc.</p>
  +<p>
  +<i>Thread safety: </i>Threadsafe concurrently over multiple threads for read-only,
  +  must be synchronized for edit.</p>
  +</dd>
  +<dt>
  +<b>Result</b>
  +</dt>
  +<dd>
  +<p>
  +<i>Potential alternate name: </i>ResultTarget</p>
  +<p>
  +<i>Intent: </i>Serve
     as a single object for multiple types of output, so there can be simple process
  -  method signatures. Act as simple data holder for
  -  output stream, DOM node, ContentHandler, etc.
  -  Threadsafe concurrently over multiple threads for read-only,
  -  must be synchronized for edit.   
  +  method signatures.</p>
  +<p>
  +<i>Responsibilities: </i>Act as simple data holder for
  +  output stream, DOM node, ContentHandler, etc.</p>
  +<p>
  +<i>Thread safety: </i>Threadsafe concurrently over multiple threads for read-only,
  +  must be synchronized for edit.</p>
  +</dd>
  +</dl> 
      
   	 <h3>Interfaces and Usage</h3> 
  -	  
  -		<p>The detailed documentation of the APIs is left to JavaDoc for the
  -		  moment, until the interfaces are stable enough to document here.</p> 
  -	  
   	 <p> TrAX defines a top-level series of interfaces in org.javax.xml.trax.
   		These interfaces have no dependencies on SAX or the DOM standard, and try to
   		make as few assumptions as possible about the details of the source and result
  @@ -178,25 +301,24 @@
   		methods, though this may change over time.</p> 
   	 <p>In order to define concrete, useable classes for the user, TrAX
   		defines specialization of the interfaces found at the TrAX root level. These
  -		interfaces are found in javax.xml.trax.sax, javax.xml.trax.dom,
  -		javax.xml.trax.uri, and javax.xml.trax.stream.</p> 
  +		interfaces are found in javax.xml.trax.sax, javax.xml.trax.dom, and
  +		javax.xml.trax.stream.</p> 
   	  
   		<h3>Creating Objects</h3> 
   		<p>TrAX allows a concrete TransformerFactory object to be created from
  -		  static functions implemented by the TransformerFactory abstract class. A
  -		  particular TransformerFactory is "plugged" into the platform via the
  -		  ProcessorFactory in one of two ways: 1) as a platform default classname that
  -		  can be set via the TransformerFactory#setPlatformDefault method, and 2) through
  -		  external specification by a system property named "org.xml.trax.Processor.xslt"
  -		  obtained using java.lang.System.getProperty().</p> 
  +		  static functions implemented by the TransformerFactory abstract class. The
  +		  system property that controls which Factory implementation to create is named
  +		  "javax.xml.transform.TransformerFactory". This property names a class that is a
  +		  concrete subclass of this TransformerFactory abstract class. If no property is
  +		  defined, a platform default will be used.</p> 
   	  
   	  
   		<h3>Specification of Inputs and Outputs</h3> 
   		<p>TrAX defines two interface objects called Source and Result. In
   		  order to pass Source and Result objects to the TrAX interfaces, concrete
  -		  classes need to be used. TrAX defines four concrete representations of Source
  -		  and Result pairs: URISource and URIResult, StreamSource and StreamResult,
  -		  SAXSource and SAXResult, and DOMSource and DOMResult.</p> 
  +		  classes need to be used. TrAX defines three concrete representations of Source
  +		  and Result pairs: StreamSource and StreamResult, SAXSource and SAXResult, and
  +		  DOMSource and DOMResult.</p> 
   	  
   	  
   		<h3>Qualified Name representation</h3> 
  
  
  
  1.2       +8 -2      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOMLocator.java	2000/11/03 23:22:11	1.1
  +++ DOMLocator.java	2000/11/07 17:25:23	1.2
  @@ -61,7 +61,13 @@
   import org.w3c.dom.Node;
   
   /**
  - * Interface DOMLocator
  + * Interface DOMLocator is used to indicate the position of a 
  + * node in a source DOM.  This is to be used primarily for 
  + * error reporting.  In order to use this, the receaver of an 
  + * error will need to downcast the SourceLocator object returned 
  + * by an exception.  Some transformers may use this object for 
  + * purposes other than error reporting, for instance, to indicate 
  + * a source node that originated a result node.
    *
    * @version Alpha
    * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
  @@ -72,7 +78,7 @@
     /**
      * Method getOriginatingNode
      *
  -   * @return
  +   * @return The node that is the location for the event.
      */
     public Node getOriginatingNode();
   }
  
  
  
  1.2       +22 -6     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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOMResult.java	2000/11/03 23:22:11	1.1
  +++ DOMResult.java	2000/11/07 17:25:24	1.2
  @@ -66,16 +66,23 @@
   import org.w3c.dom.Node;
   
   /**
  - * Acts as an holder for a transformation result tree.
  + * Acts as an holder for a transformation result tree, in the 
  + * form of a Document Object Model (DOM).  If no node is set, 
  + * the transformation will create a Document node as the holder 
  + * for the result of the transformation, which may be retreaved 
  + * via getNode.
    *
    * @version Alpha
    * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
  + * @see <a href="http://www.w3.org/TR/DOM-Level-2">Document Object Model (DOM) Level 2 Specification</a>
    */
   public class DOMResult implements Result
   {
   
     /**
  -   * Zero-argument default constructor.
  +   * Zero-argument default constructor.  If this constructor 
  +   * is used, and setNode is not called, the transformer will 
  +   * create a Document node for the result.
      */
     public DOMResult(){}
   
  @@ -92,7 +99,8 @@
     /**
      * Set the node that will contain the result DOM tree.
      *
  -   * @param node
  +   * @param node The node to which the transformation 
  +   * will be appended.
      */
     public void setNode(Node node)
     {
  @@ -100,17 +108,25 @@
     }
   
     /**
  -   * Get the node that will contain the result tree.
  +   * 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
  +   * @return The node to which the transformation 
  +   * will be appended.
      */
     public Node getNode()
     {
       return node;
     }
   
  +  //////////////////////////////////////////////////////////////////////
  +  // Internal state.
  +  //////////////////////////////////////////////////////////////////////
  +
     /**
  -   * Field node
  +   * The node to which the transformation will be appended.
      */
     private Node node;
   }
  
  
  
  1.2       +23 -16    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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOMSource.java	2000/11/03 23:22:11	1.1
  +++ DOMSource.java	2000/11/07 17:25:24	1.2
  @@ -66,10 +66,12 @@
   import org.w3c.dom.Node;
   
   /**
  - * Acts as an holder for a transformation Source tree.
  + * Acts as an holder for a transformation Source tree in the 
  + * form of a Document Object Model.
    *
    * @version Alpha
    * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
  + * @see <a href="http://www.w3.org/TR/DOM-Level-2">Document Object Model (DOM) Level 2 Specification</a>
    */
   public class DOMSource implements Source
   {
  @@ -90,9 +92,9 @@
     }
   
     /**
  -   * Set the node that will contain the Source DOM tree.
  +   * Set the node that will represents a Source DOM tree.
      *
  -   * @param node
  +   * @param node The node that is to be transformed.
      */
     public void setNode(Node node)
     {
  @@ -100,25 +102,14 @@
     }
   
     /**
  -   * Get the node that will contain the Source tree.
  +   * Get the node that represents a Source DOM tree.
      *
  -   * @return
  +   * @return The node that is to be transformed.
      */
     public Node getNode()
     {
       return node;
     }
  -
  -  /**
  -   * Field node
  -   */
  -  private Node node;
  -  
  -  /**
  -   * The base ID (URL or system ID) from where URLs 
  -   * will be resolved. 
  -   */
  -  String baseID;
     
     /**
      * Set the base ID (URL or system ID) from where URLs 
  @@ -142,4 +133,20 @@
       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.1                  xml-xalan/java/src/javax/xml/transform/dom/package.html
  
  Index: package.html
  ===================================================================
  <html>
    <title>javax.xml.transform.dom Package</title>
    <body>
      <p>DOM specific TrAX APIs.<p>
   </body>
  </html>
  
  
  1.3       +15 -10    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SAXResult.java	2000/11/06 17:37:19	1.2
  +++ SAXResult.java	2000/11/07 17:25:32	1.3
  @@ -82,10 +82,9 @@
     public SAXResult(){}
   
     /**
  -   * Create a new output target with a DOM node.
  +   * Create a SAXResult that targets a SAX2 ContentHandler.
      *
  -   *
  -   * @param handler
  +   * @param handler Must be a non-null ContentHandler reference.
      */
     public SAXResult(ContentHandler handler)
     {
  @@ -93,9 +92,9 @@
     }
   
     /**
  -   * Set the node that will contain the result DOM tree.
  +   * Set the target to be a SAX2 ContentHandler.
      *
  -   * @param handler
  +   * @param handler Must be a non-null ContentHandler reference.
      */
     public void setHandler(ContentHandler handler)
     {
  @@ -103,9 +102,9 @@
     }
   
     /**
  -   * Get the node that will contain the result tree.
  +   * Get the ContentHandler that is the result target.
      *
  -   * @return
  +   * @return The content handler that is to be target of the result output.
      */
     public ContentHandler getHandler()
     {
  @@ -114,8 +113,13 @@
   
     /**
      * 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
  +   * @param handler A non-null LexicalHandler for 
  +   * handling lexical parse events.
      */
     void setLexicalHandler(LexicalHandler handler)
     {
  @@ -124,6 +128,7 @@
   
     /**
      * Get a SAX2 LexicalHandler for the output.
  +   * 
      * @return A LexicalHandler, or null.
      */
     LexicalHandler getLexicalHandler()
  @@ -136,12 +141,12 @@
     //////////////////////////////////////////////////////////////////////
   
     /**
  -   * Field handler
  +   * The handler for parse events.
      */
     private ContentHandler handler;
   
     /**
  -   * Field lexhandler
  +   * The handler for lexical events.
      */
     private LexicalHandler lexhandler;
   }
  
  
  
  1.2       +17 -15    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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SAXSource.java	2000/11/03 23:22:13	1.1
  +++ SAXSource.java	2000/11/07 17:25:33	1.2
  @@ -89,8 +89,9 @@
      * to be the reader's content handler, and then will call
      * reader.parse(inputSource).
      *
  -   * NEEDSDOC @param reader
  -   * NEEDSDOC @param inputSource
  +   * @param reader An XMLReader to be used for the parse.
  +   * @param An input source reference that must be non-null,
  +   * that will be passed to the parse method of the reader.
      */
     public SAXSource(XMLReader reader, InputSource inputSource)
     {
  @@ -101,12 +102,13 @@
     /**
      * Create a SAXSource, using an InputSource.
      * The Transformer or SAXTransformerFactory will create a
  -   * reader via org.xml.sax.helpers.ParserFactory
  +   * reader via org.xml.sax.helpers.XMLReaderFactory
      * (if setXMLReader is not used), and will set itself
      * to be the content handler of that reader, and then will call
      * reader.parse(inputSource).
      *
  -   * NEEDSDOC @param inputSource
  +   * @param inputSource An input source reference that must be non-null,
  +   * that will be passed to the parse method of the reader.
      */
     public SAXSource(InputSource inputSource)
     {
  @@ -152,6 +154,17 @@
     {
       return inputSource;
     }
  +  
  +  /**
  +   * Get the base ID (URL or system ID) from where URLs 
  +   * will be resolved.
  +   * 
  +   * @return Base URL for the source tree, or null.
  +   */
  +  public String getBaseID()
  +  {
  +    return (null != inputSource) ? inputSource.getSystemId() : null;
  +  }
   
     /** The XMLReader to be used for the source tree input. OK if null.        */
     private XMLReader reader;
  @@ -186,15 +199,4 @@
         return null;
     }
     
  -  /**
  -   * Get the base ID (URL or system ID) from where URLs 
  -   * will be resolved.
  -   * 
  -   * @return Base URL for the source tree, or null.
  -   */
  -  public String getBaseID()
  -  {
  -    return (null != inputSource) ? inputSource.getSystemId() : null;
  -  }
  -
   }
  
  
  
  1.3       +18 -13    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SAXTransformerFactory.java	2000/11/06 17:36:05	1.2
  +++ SAXTransformerFactory.java	2000/11/07 17:25:34	1.3
  @@ -97,20 +97,23 @@
      * @param templates The source of the transformation instructions.
      *
      * @return TransformerHandler ready to transform SAX events.
  -   * @throws TransformerConfigurationException
  +   * 
  +   * @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.
  +   * ContentHandler events into a Result. The transformation 
  +   * is defined as an identity (or copy) transformation.
      *
  -   * @param src The source of the transformation instructions.
  -   *
  -   *
  -   * NEEDSDOC ($objectName$) @return
  -   * @throws TransformerConfigurationException
  +   * @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 can not be created.
      */
     public abstract TransformerHandler newTransformerHandler()
       throws TransformerConfigurationException;
  @@ -120,10 +123,12 @@
      * ContentHandler events into a Templates object.
      *
      * @param src The source of the transformation instructions.
  -   *
      *
  -   * NEEDSDOC ($objectName$) @return
  -   * @throws TransformerConfigurationException
  +   * @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 can not be created.
      */
     public abstract TemplatesHandler newTemplatesHandler()
       throws TransformerConfigurationException;
  @@ -138,8 +143,8 @@
      */
     public abstract XMLFilter newXMLFilter(Source src);
     
  -  /** NEEDSDOC Field errorHandler          */
  -  ErrorHandler errorHandler;
  +  /** The error handler used to report parse or transformation errors. */
  +  private ErrorHandler errorHandler;
   
     /**
      * Allow an application to register an error event handler.
  @@ -182,7 +187,7 @@
       return errorHandler;
     }
   
  -  /** NEEDSDOC Field entityResolver          */
  +  /** The entity resolver that will be passed to the reader.  */
     private EntityResolver entityResolver;
   
     /**
  
  
  
  1.1                  xml-xalan/java/src/javax/xml/transform/sax/package.html
  
  Index: package.html
  ===================================================================
  <html>
    <title>javax.xml.transform.sax Package</title>
    <body>
      <p>SAX2 specific TrAX APIs.<p>
   </body>
  </html>
  
  
  1.2       +13 -11    xml-xalan/java/src/javax/xml/transform/stream/OutputKeys.java
  
  Index: OutputKeys.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/stream/OutputKeys.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OutputKeys.java	2000/11/03 23:22:14	1.1
  +++ OutputKeys.java	2000/11/07 17:25:39	1.2
  @@ -62,7 +62,7 @@
    * output properties on either Transformer or Templates instances.
    *
    * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  - * XSL Transformations (XSLT) W3C Recommendation</a>.
  + * XSL Transformations (XSLT) W3C Recommendation</a>
    */
   public class OutputKeys
   {
  @@ -71,8 +71,9 @@
      *
      * <p>The method attribute identifies the overall method that
      * should be used for outputting the result tree.</p>
  +   * 
      * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>.
  +   * XSL Transformations (XSLT) W3C Recommendation</a>
      */
     public static final String METHOD = "method";
   
  @@ -82,7 +83,7 @@
      * <p><code>version</code> specifies the version of the output
      * method.</p>
      * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
  -   * XSL Transformations (XSLT) W3C Recommendation</a>. 
  +   * XSL Transformations (XSLT) W3C Recommendation</a> 
      */
     public static final String VERSION = "version";
   
  @@ -98,7 +99,7 @@
      * 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>.
  +   * XSL Transformations (XSLT) W3C Recommendation</a>
      */
     public static final String ENCODING = "encoding";
   
  @@ -109,7 +110,7 @@
      * 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>.
  +   * XSL Transformations (XSLT) W3C Recommendation</a>
      */
     public static final String OMIT_XML_DECLARATION = "omit-xml-declaration";
   
  @@ -120,7 +121,7 @@
      * 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>.
  +   * XSL Transformations (XSLT) W3C Recommendation</a>
      */
     public static final String STANDALONE = "standalone";
   
  @@ -130,7 +131,7 @@
      * <p><code>doctype-public</code> specifies the public 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>.
  +   * XSL Transformations (XSLT) W3C Recommendation</a>
      */
     public static final String DOCTYPE_PUBLIC = "doctype-public";
   
  @@ -140,7 +141,7 @@
      * <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>.
  +   * XSL Transformations (XSLT) W3C Recommendation</a>
      */
     public static final String DOCTYPE_SYSTEM = "doctype-system";
   
  @@ -150,8 +151,9 @@
      * <p><code>cdata-section-elements</code> specifies a 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>.
  +   * XSL Transformations (XSLT) W3C Recommendation.</a>
      */
     public static final String CDATA_SECTION_ELEMENTS =
       "cdata-section-elements";
  @@ -163,7 +165,7 @@
      * 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>.
  +   * XSL Transformations (XSLT) W3C Recommendation</a>
      */
     public static final String INDENT = "indent";
   
  @@ -178,7 +180,7 @@
      * 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>.
  +   * XSL Transformations (XSLT) W3C Recommendation</a>
      */
     public static final String MEDIA_TYPE = "media-type";
   }
  
  
  
  1.2       +48 -24    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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StreamResult.java	2000/11/03 23:22:14	1.1
  +++ StreamResult.java	2000/11/07 17:25:39	1.2
  @@ -68,7 +68,8 @@
   import org.xml.sax.ext.LexicalHandler;
   
   /**
  - * Acts as an holder for a transformation result tree.
  + * 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>
  @@ -82,9 +83,12 @@
     public StreamResult(){}
   
     /**
  -   * Constructor 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 byteStream
  +   * @param byteStream A valid OutputStream reference.
      */
     public StreamResult(OutputStream byteStream)
     {
  @@ -92,9 +96,14 @@
     }
   
     /**
  -   * Constructor StreamResult
  +   * 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 characterStream
  +   * @param characterStream  A valid Writer reference.
      */
     public StreamResult(Writer characterStream)
     {
  @@ -102,9 +111,12 @@
     }
   
     /**
  -   * Method setByteStream
  +   * Set the byte stream 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 byteStream
  +   * @param byteStream A valid OutputStream reference.
      */
     public void setByteStream(OutputStream byteStream)
     {
  @@ -112,9 +124,10 @@
     }
   
     /**
  -   * Method getByteStream
  +   * Get the byte stream that was set with setByteStream.
      *
  -   * @return
  +   * @return The byte stream that was set with setByteStream, or null
  +   * if setByteStream or the byte stream constructor was not called.
      */
     public OutputStream getByteStream()
     {
  @@ -122,9 +135,14 @@
     }
   
     /**
  -   * Method setCharacterStream
  +   * Set the character stream 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.  However, 
  +   * there are times when it is useful to write to a character 
  +   * stream, such as when using a StringWriter.
      *
  -   * @param characterStream
  +   * @param characterStream  A valid Writer reference.
      */
     public void setCharacterStream(Writer characterStream)
     {
  @@ -132,9 +150,10 @@
     }
   
     /**
  -   * Method getCharacterStream
  +   * Get the character stream that was set with setCharacterStream.
      *
  -   * @return
  +   * @return The character stream that was set with setCharacterStream, or null
  +   * if setCharacterStream or the character stream constructor was not called.
      */
     public Writer getCharacterStream()
     {
  @@ -142,9 +161,11 @@
     }
   
     /**
  -   * Method setSystemId
  +   * Method setSystemId 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 URL (probably a file name).
      *
  -   * @param systemId
  +   * @param systemId The system identifier as a URL string.
      */
     public void setSystemId(String systemId)
     {
  @@ -152,31 +173,34 @@
     }
   
     /**
  -   * Method getSystemId
  +   * Get the system identifier that was set with setSystemId.
      *
  -   * @return
  +   * @return The system identifier that was set with setSystemId, or null
  +   * if setSystemId was not called.
      */
     public String getSystemId()
     {
       return systemId;
     }
  +  
  +  //////////////////////////////////////////////////////////////////////
  +  // Internal state.
  +  //////////////////////////////////////////////////////////////////////
   
     /**
  -   * Field systemId
  +   * 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 URL (probably a file name).
      */
     private String systemId;
   
  -  //////////////////////////////////////////////////////////////////////
  -  // Internal state.
  -  //////////////////////////////////////////////////////////////////////
  -
     /**
  -   * Field byteStream
  +   * The byte stream that is to be written to.
      */
     private OutputStream byteStream;
   
     /**
  -   * Field characterStream
  +   * The character stream that is to be written to.
      */
     private Writer characterStream;
   }
  
  
  
  1.2       +105 -47   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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StreamSource.java	2000/11/03 23:22:14	1.1
  +++ StreamSource.java	2000/11/07 17:25:40	1.2
  @@ -62,7 +62,8 @@
   import java.io.Reader;
   
   /**
  - * Acts as an holder for a transformation Source tree.
  + * Acts as an holder for a transformation Source tree as described 
  + * by a stream of XML markup.
    *
    * @version Alpha
    * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
  @@ -76,19 +77,51 @@
     public StreamSource(){}
   
     /**
  -   * Constructor StreamSource
  +   * Construct a StreamSource from a byte stream.  Normally, 
  +   * a stream should be used rather than a reader, so that 
  +   * the XML parser may 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 URL references 
  +   * may be resolved.</p>
      *
  -   * @param byteStream
  +   * @param byteStream A valid InputStream reference to an XML stream.
      */
     public StreamSource(InputStream byteStream)
     {
       setByteStream(byteStream);
     }
  +  
  +  /**
  +   * Construct a StreamSource from a byte stream.  Normally, 
  +   * a stream should be used rather than a reader, so that 
  +   * the XML parser may 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 URLs to be processed 
  +   * that are relative to the stream.</p>
  +   *
  +   * @param byteStream A valid InputStream reference to an XML stream.
  +   * @param systemId Must be a string that conforms to the URL syntax.
  +   */
  +  public StreamSource(InputStream byteStream, String systemId)
  +  {
  +    setByteStream(byteStream);
  +    setSystemId(systemId);
  +  }
   
  +
     /**
  -   * Constructor StreamSource
  +   * 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 characterStream
  +   * @param characterStream A valid Reader reference to an XML character stream.
      */
     public StreamSource(Reader characterStream)
     {
  @@ -96,11 +129,9 @@
     }
   
     /**
  -   * Method setCharacterStream
  -   *
  -   * @param characterStream
  +   * Construct a StreamSource from a URL.
      *
  -   * NEEDSDOC @param systemId
  +   * @param systemId Must be a string that conforms to the URL syntax.
      */
     public StreamSource(String systemId)
     {
  @@ -108,9 +139,16 @@
     }
   
     /**
  -   * Method setByteStream
  +   * Set the byte stream to be used as input.  Normally, 
  +   * a stream should be used rather than a reader, so that 
  +   * the XML parser may 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 
  +   * may be resolved.</p>
      *
  -   * @param byteStream
  +   * @param byteStream A valid InputStream reference to an XML stream.
      */
     public void setByteStream(InputStream byteStream)
     {
  @@ -118,9 +156,10 @@
     }
   
     /**
  -   * Method getByteStream
  +   * Get the byte stream that was set with setByteStream.
      *
  -   * @return
  +   * @return The byte stream that was set with setByteStream, or null
  +   * if setByteStream or the byte stream constructor was not called.
      */
     public InputStream getByteStream()
     {
  @@ -128,9 +167,14 @@
     }
   
     /**
  -   * Method setCharacterStream
  +   * Set the input to be 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 characterStream
  +   * @param characterStream A valid Reader reference to an XML character stream.   
      */
     public void setCharacterStream(Reader characterStream)
     {
  @@ -138,9 +182,10 @@
     }
   
     /**
  -   * Method getCharacterStream
  +   * Get the character stream that was set with setCharacterStream.
      *
  -   * @return
  +   * @return The character stream that was set with setCharacterStream, or null
  +   * if setCharacterStream or the character stream constructor was not called.
      */
     public Reader getCharacterStream()
     {
  @@ -148,9 +193,13 @@
     }
   
     /**
  -   * Method setPublicId
  +   * Set the public identifier for this Source.
      *
  -   * @param publicId
  +   * <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)
     {
  @@ -158,9 +207,10 @@
     }
   
     /**
  -   * Method getPublicId
  +   * Get the public identifier that was set with setPublicId.
      *
  -   * @return
  +   * @return The public identifier that was set with setPublicId, or null
  +   * if setPublicId was not called.
      */
     public String getPublicId()
     {
  @@ -168,9 +218,16 @@
     }
   
     /**
  -   * Method setSystemId
  +   * 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
  +   * @param systemId The system identifier as a URL string.
      */
     public void setSystemId(String systemId)
     {
  @@ -178,51 +235,52 @@
     }
   
     /**
  -   * Method getSystemId
  +   * Get the system identifier that was set with setSystemId.
      *
  -   * @return
  +   * @return The system identifier that was set with setSystemId, or null
  +   * if setSystemId was not called.
      */
     public String getSystemId()
     {
       return systemId;
     }
  +  
  +  /**
  +   * Get the base ID (URL or system ID) from where URLs 
  +   * will be resolved.
  +   * 
  +   * <p>In the case of StreamSource, this will get the 
  +   * systemID value.</p>
  +   * 
  +   * @return Base URL for the source tree.
  +   */
  +  public String getBaseID()
  +  {
  +    return systemId;
  +  }
  +
  +  //////////////////////////////////////////////////////////////////////
  +  // Internal state.
  +  //////////////////////////////////////////////////////////////////////
   
     /**
  -   * Field publicId
  +   * The public identifier for this input source, or null.
      */
     private String publicId;
   
     /**
  -   * Field systemId
  +   * The system identifier as a URL string, or null.
      */
     private String systemId;
   
  -  //////////////////////////////////////////////////////////////////////
  -  // Internal state.
  -  //////////////////////////////////////////////////////////////////////
  -
     /**
  -   * Field byteStream
  +   * The byte stream for this Source, or null.
      */
     private InputStream byteStream;
   
     /**
  -   * Field characterStream
  +   * The character stream for this Source, or null.
      */
     private Reader characterStream;
     
  -  /**
  -   * Get the base ID (URL or system ID) from where URLs 
  -   * will be resolved.
  -   * 
  -   * <p>In the case of StreamSource, this will set the 
  -   * systemID value.</p>
  -   * 
  -   * @return Base URL for the source tree.
  -   */
  -  public String getBaseID()
  -  {
  -    return systemId;
  -  }
  -
   }
  
  
  
  1.1                  xml-xalan/java/src/javax/xml/transform/stream/package.html
  
  Index: package.html
  ===================================================================
  <html>
    <title>javax.xml.transform.stream</title>
    <body>
      <p>Stream and URL specific TrAX APIs.<p>
   </body>
  </html>