sboag       00/12/12 20:15:34

  Modified:    java/src/javax/xml/transform OutputKeys.java Templates.java
                        Transformer.java TransformerException.java
                        TransformerFactory.java
               java/src/javax/xml/transform/dom DOMLocator.java
                        DOMResult.java
               java/src/javax/xml/transform/sax TemplatesHandler.java
                        TransformerHandler.java
  Log:
  Changed TransformerException nested exception to take a Throwable
  instead of an exception, so that initCause works right.  Approved
  by JCP.
  
  Revision  Changes    Path
  1.5       +2 -2      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- OutputKeys.java   2000/11/18 01:19:13     1.4
  +++ OutputKeys.java   2000/12/13 04:15:32     1.5
  @@ -73,7 +73,7 @@
     private OutputKeys(){}
   
     /**
  -   * method = "xml" | "html" | "text" | <var>qname-but-not-ncname</var>.
  +   * 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 
  @@ -158,7 +158,7 @@
     public static final String DOCTYPE_SYSTEM = "doctype-system";
   
     /**
  -   * cdata-section-elements = <var>qnames</var>.
  +   * cdata-section-elements = <var>expanded names</var>.
      *
      * <p><code>cdata-section-elements</code> specifies a list of the
      * names of elements whose text node children should be output using
  
  
  
  1.4       +1 -1      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Templates.java    2000/11/14 17:02:39     1.3
  +++ Templates.java    2000/12/13 04:15:32     1.4
  @@ -84,7 +84,7 @@
      * 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
  -   * the process method.
  +   * [EMAIL PROTECTED] javax.xml.transform.Transformer#setOutputProperties}.
      *
      * <p>For XSLT, Attribute Value Templates attribute values will
      * be returned unexpanded (since there is no context at this point).</p>
  
  
  
  1.10      +16 -7     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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Transformer.java  2000/11/18 01:19:13     1.9
  +++ Transformer.java  2000/12/13 04:15:32     1.10
  @@ -66,7 +66,8 @@
    * 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
  + * 
  + * <p>An object of this class may not be used in multiple threads
    * running concurrently.  Different Transformers may be used 
    * concurrently by different threads.</p>
    * 
  @@ -120,8 +121,7 @@
      * cannot be determined until the node context is evaluated during
      * the transformation process.
      * 
  -   * @return A parameter that has been set with setParameter 
  -   * or setParameters.
  +   * @return A parameter that has been set with setParameter.
      */
     public abstract Object getParameter(String name);
     
  @@ -134,6 +134,9 @@
      * 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.
      */
  @@ -154,7 +157,8 @@
      * with xsl:output.
      *
      * <p>If argument to this function is null, any properties
  -   * previously set are removed.</p>
  +   * 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
  @@ -165,11 +169,9 @@
      * 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>If a given property is not supported, it will be silently 
ignored.</p>
      *
      * @param oformat A set of output properties that will be
  -   * used to override any of the same properties in effect
  +   * used to override any of the same properties in affect
      * for the transformation.   
      * 
      * @see javax.xml.transform.OutputKeys
  @@ -197,6 +199,10 @@
      * 
      * <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.
  @@ -219,6 +225,9 @@
      * 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 [EMAIL PROTECTED] 
#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.
  
  
  
  1.8       +18 -18    
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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TransformerException.java 2000/12/05 18:10:56     1.7
  +++ TransformerException.java 2000/12/13 04:15:32     1.8
  @@ -84,15 +84,15 @@
     }
   
     /** Field containedException specifies a wrapped exception.  May be null. 
*/
  -  Exception containedException;
  +  Throwable containedException;
   
     /**
      * This method retrieves an exception that this exception wraps.
      *
  -   * @return An Exception object, or null.
  +   * @return An Throwable object, or null.
      * @see #getCause
      */
  -  public Exception getException()
  +  public Throwable getException()
     {
       return containedException;
     }
  @@ -113,8 +113,8 @@
      * <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 [EMAIL PROTECTED] #TransformerException(Exception)} or
  -   * [EMAIL PROTECTED] #TransformerException(String,Exception)}, this method 
cannot be called
  +   * with [EMAIL PROTECTED] #TransformerException(Throwable)} or
  +   * [EMAIL PROTECTED] #TransformerException(String,Throwable)}, this method 
cannot be called
      * even once.
      *
      * @param  cause the cause (which is saved for later retrieval by the
  @@ -126,8 +126,8 @@
      *         throwable.  (A throwable cannot
      *         be its own cause.)
      * @throws IllegalStateException if this throwable was
  -   *         created with [EMAIL PROTECTED] 
#TransformerException(Exception)} or
  -   *         [EMAIL PROTECTED] #TransformerException(String,Exception)}, or 
this method has already
  +   *         created with [EMAIL PROTECTED] 
#TransformerException(Throwable)} or
  +   *         [EMAIL PROTECTED] #TransformerException(String,Throwable)}, or 
this method has already
      *         been called on this throwable.
      */
     public synchronized Throwable initCause(Throwable cause) {
  @@ -135,7 +135,7 @@
         throw new IllegalStateException("Can't overwrite cause");
       if (cause == this)
         throw new IllegalArgumentException("Self-causation not permitted");
  -    this.containedException = (Exception)cause;
  +    this.containedException = cause;
       return this;
     }
   
  @@ -158,10 +158,10 @@
      *
      * @param e The exception to be wrapped.
      */
  -  public TransformerException(Exception e)
  +  public TransformerException(Throwable e)
     {
   
  -    super("TRaX Transform Exception");
  +    super("TRaX Transform Throwable");
   
       this.containedException = e;
       this.locator = null;
  @@ -177,10 +177,10 @@
      *                use the message from the embedded exception.
      * @param e Any exception
      */
  -  public TransformerException(String message, Exception e)
  +  public TransformerException(String message, Throwable e)
     {
       super ((message == null || message.length()== 0)? 
  -           "TRaX Transform Exception" : message);
  +           "TRaX Transform Throwable" : message);
         
   
       this.containedException = e;
  @@ -215,7 +215,7 @@
      * @param e Any exception
      */
     public TransformerException(String message, SourceLocator locator,
  -                              Exception e)
  +                              Throwable e)
     {
   
       super(message);
  @@ -334,10 +334,10 @@
           s.println(locInfo);
         super.printStackTrace(s);
       }
  -    catch(Exception e)
  +    catch(Throwable e)
       {
       }
  -    Exception exception = getException();
  +    Throwable exception = getException();
       
       for(int i = 0; (i < 10) && (null != exception); i++)
       {
  @@ -352,7 +352,7 @@
           }
           exception.printStackTrace(s);
         }
  -      catch(Exception e)
  +      catch(Throwable e)
         {
           s.println("Could not print stack trace...");
         }
  @@ -361,8 +361,8 @@
           Method meth = 
((Object)exception).getClass().getMethod("getException", null);
           if(null != meth)
           {
  -          Exception prev = exception;
  -          exception = (Exception)meth.invoke(exception, null);
  +          Throwable prev = exception;
  +          exception = (Throwable)meth.invoke(exception, null);
             if(prev == exception)
               break;
           }
  
  
  
  1.11      +7 -7      
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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TransformerFactory.java   2000/11/18 01:19:13     1.10
  +++ TransformerFactory.java   2000/12/13 04:15:32     1.11
  @@ -113,7 +113,7 @@
     {
   
       String classname = findFactory(defaultPropName,
  -                                
"org.apache.xalan.processor.TransformerFactoryImpl");
  +                                   
"org.apache.xalan.processor.TransformerFactoryImpl");
   
       if (classname == null)
       {
  @@ -204,7 +204,7 @@
      * 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.
  +   * 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
  @@ -321,12 +321,12 @@
       // Use the system property first
       try {
         String systemProp =
  -     System.getProperty( factoryId );
  +        System.getProperty( factoryId );
         if( systemProp!=null) {
  -     if( debug ) 
  -       System.err.println("JAXP: found system property" +
  -                          systemProp );
  -     return systemProp;
  +        if( debug ) 
  +          System.err.println("JAXP: found system property" +
  +                             systemProp );
  +        return systemProp;
         }
         
       }catch (SecurityException se) {
  
  
  
  1.5       +1 -1      
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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DOMLocator.java   2000/11/14 17:31:38     1.4
  +++ DOMLocator.java   2000/12/13 04:15:33     1.5
  @@ -62,7 +62,7 @@
   
   /**
    * Indicates the position of a node in a source DOM, intended  
  - * primarily for error reporting.  To use a SourceLocator, the receiver of 
an 
  + * primarily for error reporting.  To use a DOMLocator, the receiver of an 
    * error must downcast the SourceLocator object returned by an exception.
    * A Transformer may use this object for  purposes other than error 
reporting, 
    * for instance, to indicate the source node that originated a result node.
  
  
  
  1.7       +2 -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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DOMResult.java    2000/11/18 01:19:14     1.6
  +++ DOMResult.java    2000/12/13 04:15:33     1.7
  @@ -70,7 +70,7 @@
    * 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 
  - * wiht getNode.
  + * with getNode.
    */
   public class DOMResult implements Result
   {
  @@ -82,11 +82,7 @@
       = "http://javax.xml.transform.dom.DOMResult/feature";;
   
     /**
  -   * Zero-argument default constructor. In practice, 
  -   * the node should be a [EMAIL PROTECTED] org.w3c.dom.Document} node, 
  -   * a [EMAIL PROTECTED] org.w3c.dom.DocumentFragment} node, or a 
  -   * [EMAIL PROTECTED] org.w3c.dom.Element} node.  In other words, a node 
  -   * that accepts children.
  +   * Zero-argument default constructor.
      */
     public DOMResult(){}
   
  
  
  
  1.7       +1 -1      
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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TemplatesHandler.java     2000/11/18 01:19:14     1.6
  +++ TemplatesHandler.java     2000/12/13 04:15:34     1.7
  @@ -70,7 +70,7 @@
   public interface TemplatesHandler extends ContentHandler
   {
     /**
  -   * When a TemplatesHandler object is used as a ContentHandler or 
DocumentHandler
  +   * 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.
      * 
  
  
  
  1.6       +2 -3      
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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TransformerHandler.java   2000/11/18 01:19:14     1.5
  +++ TransformerHandler.java   2000/12/13 04:15:34     1.6
  @@ -11,9 +11,8 @@
   import org.xml.sax.ext.LexicalHandler;
   
   /**
  - * The TransformerHandler provides a reference to an 
  - * object that implements this interface, and that can 
  - * listen to SAX ContentHandler parse events and transform 
  + * A TransformerHandler 
  + * listens for SAX ContentHandler parse events and transforms 
    * them to a Result.
    */
   public interface TransformerHandler 
  
  
  

Reply via email to