sboag       00/12/13 16:19:26

  Modified:    java/src/javax/xml/transform OutputKeys.java Templates.java
                        Transformer.java
                        TransformerConfigurationException.java
                        TransformerException.java TransformerFactory.java
                        overview.html package.html
               java/src/javax/xml/transform/sax TransformerHandler.java
               java/src/org/apache/xalan/xslt Process.java
  Log:
  Changes for TrAX as per JCP process:
  TransformerHandler now implements DTDHandler.
  TransformerConfigurationException now has SourceLocator constructors.
  TransformerException now has setLocator.
  Nested exceptions changed to Throwable, in order to support getCause.
  TFactoryConfigurationError changed to TransformerFactoryConfigurationError.
  The way output properties nest has been respecified (javadoc change).
  Many javadoc editorial changes.
  
  Revision  Changes    Path
  1.6       +35 -5     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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- OutputKeys.java   2000/12/13 04:15:32     1.5
  +++ OutputKeys.java   2000/12/14 00:19:24     1.6
  @@ -60,6 +60,7 @@
    * Provides string constants that can be used to set
    * output properties for a Transformer, or to retrieve
    * 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>
  @@ -94,6 +95,14 @@
      *
      * <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> 
      */
  @@ -139,9 +148,9 @@
   
     /**
      * doctype-public = <var>string</var>.
  +   * <p>See the documentation for the [EMAIL PROTECTED] #DOCTYPE_SYSTEM} 
property 
  +   * for a description of what the value of the key should be.</p>
      *
  -   * <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>
      */
  @@ -149,6 +158,27 @@
   
     /**
      * 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>
  @@ -160,9 +190,9 @@
     /**
      * 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
  -   * CDATA sections.</p>
  +   * <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>
  
  
  
  1.5       +21 -2     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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Templates.java    2000/12/13 04:15:32     1.4
  +++ Templates.java    2000/12/14 00:19:24     1.5
  @@ -85,9 +85,28 @@
      * be a clone of the internal values. Accordingly, it can be mutated
      * without mutating the Templates object, and then handed in to
      * [EMAIL PROTECTED] 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, Attribute Value Templates attribute values will
  -   * be returned unexpanded (since there is no context at this point).</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.
      */
  
  
  
  1.11      +13 -9     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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Transformer.java  2000/12/13 04:15:32     1.10
  +++ Transformer.java  2000/12/14 00:19:24     1.11
  @@ -186,16 +186,20 @@
     /**
      * Get a copy of the output properties for the transformation.
      * 
  -   * <p>The properties should contain a set of layered properties.  The 
  -   * first "layer" will contain the properties that were set with 
  -   * setOutputProperties and setOutputProperty.  Subsequent layers 
  -   * contain the properties set in the stylesheet and the 
  -   * default properties for the transformation type.
  -   * There is no guarantee on how the layers are ordered after the 
  -   * first layer.  Thus, getOutputProperties().getProperty(String key) will 
obtain any 
  -   * property in effect for the stylesheet, while 
  +   * <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 [EMAIL PROTECTED] #setOutputProperty}, 
  +   * [EMAIL PROTECTED] #setOutputProperties}, in the stylesheet, <em>or</em> 
the default 
  +   * properties, while 
      * getOutputProperties().get(String key) will only retrieve properties 
  -   * that were explicitly set with setOutputProperties and 
setOutputProperty.</p>
  +   * that were explicitly set by [EMAIL PROTECTED] #setOutputProperty}, 
  +   * [EMAIL PROTECTED] #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>
  
  
  
  1.3       +38 -10    
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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransformerConfigurationException.java    2000/11/13 16:26:28     1.2
  +++ TransformerConfigurationException.java    2000/12/14 00:19:24     1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: TransformerConfigurationException.java,v 1.2 2000/11/13 16:26:28 
sboag Exp $
  + * $Id: TransformerConfigurationException.java,v 1.3 2000/12/14 00:19:24 
sboag Exp $
    * 
    * Copyright (c) 1998-1999 Sun Microsystems, Inc. All Rights Reserved.
    * 
  @@ -16,12 +16,12 @@
   /**
    * Indicates a serious configuration error.
    */
  -public class TransformerConfigurationException extends TransformerException {
  
  +public class TransformerConfigurationException extends TransformerException {
  +  
       /**
        * Create a new <code>TransformerConfigurationException</code> with no
        * detail mesage.
        */
  -
       public TransformerConfigurationException() {
           super("Configuration Error");
       }
  @@ -32,18 +32,18 @@
        *
        * @param msg The error message for the exception.
        */
  -    
       public TransformerConfigurationException(String msg) {
           super(msg);
  -    }
    
    /**
  +    }
  +    
  +    /**
        * Create a new <code>TransformerConfigurationException</code> with a
        * given <code>Exception</code> base cause of the error.
        *
        * @param e The exception to be encapsulated in a
        * TransformerConfigurationException.
        */
  -    
  -    public TransformerConfigurationException(Exception e) {
  +    public TransformerConfigurationException(Throwable e) {
           super(e);
       }
   
  @@ -56,10 +56,38 @@
        * @param msg The detail message.
        * @param e The exception to be wrapped in a 
TransformerConfigurationException
        */
  -    
  -    public TransformerConfigurationException(String msg, Exception e) {
  +    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);
  +  }
  +  
   }
   
  
  
  
  1.9       +12 -1     
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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TransformerException.java 2000/12/13 04:15:32     1.8
  +++ TransformerException.java 2000/12/14 00:19:24     1.9
  @@ -73,7 +73,7 @@
     SourceLocator locator;
   
     /**
  -   * Method getLocator retrieves and instance of a SourceLocator
  +   * 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.
  @@ -81,6 +81,17 @@
     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. 
*/
  
  
  
  1.12      +6 -6      
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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TransformerFactory.java   2000/12/13 04:15:32     1.11
  +++ TransformerFactory.java   2000/12/14 00:19:24     1.12
  @@ -105,11 +105,11 @@
      *
      * @return new TransformerFactory instance, never null.
      *
  -   * @throws TFactoryConfigurationError
  +   * @throws TransformerFactoryConfigurationError
      * if the implmentation is not available or cannot be instantiated.
      */
     public static TransformerFactory newInstance()
  -          throws TFactoryConfigurationError
  +          throws TransformerFactoryConfigurationError
     {
   
       String classname = findFactory(defaultPropName,
  @@ -117,7 +117,7 @@
   
       if (classname == null)
       {
  -      throw new TFactoryConfigurationError(
  +      throw new TransformerFactoryConfigurationError(
           "No default implementation found");
       }
   
  @@ -131,15 +131,15 @@
       }
       catch (ClassNotFoundException cnfe)
       {
  -      throw new TFactoryConfigurationError(cnfe);
  +      throw new TransformerFactoryConfigurationError(cnfe);
       }
       catch (IllegalAccessException iae)
       {
  -      throw new TFactoryConfigurationError(iae);
  +      throw new TransformerFactoryConfigurationError(iae);
       }
       catch (InstantiationException ie)
       {
  -      throw new TFactoryConfigurationError(ie);
  +      throw new TransformerFactoryConfigurationError(ie);
       }
   
       return factoryImpl;
  
  
  
  1.4       +40 -21    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- overview.html     2000/11/23 00:05:52     1.3
  +++ overview.html     2000/12/14 00:19:24     1.4
  @@ -2,20 +2,24 @@
   <html>
   <head>
   <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  -<title>
  -</title>
  +<title></title>
   </head>
   <body> 
  -  <h2>Transformation API For XML (TrAX)</h2> 
  -  <p>
  +  
  +<h2>Transformation API For XML (TrAX)</h2> 
  +  
  +<p>
   <b>Edit Date: </b>November 12, 2000</p> 
      
       
  -  <h3>Introduction</h3> 
  -  <p>This overview describes the set of APIs contained in
  +  
  +<h3>Introduction</h3> 
  +  
  +<p>This overview describes the set of APIs contained in
         javax.xml.transform. For the sake of brevity, these interfaces are 
referred to
         as TrAX (Transformations for XML). </p> 
  -  <p>There is a broad need for Java applications to be able to transform XML
  +  
  +<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
  @@ -26,20 +30,25 @@
         Events, or a proprietary format or data structure. The output types 
are the
         pretty much the same types as the inputs, but different inputs may 
need to be
         combined with different outputs.</p> 
  -  <p>The great challenge of a transformation API is how to deal with all the
  +  
  +<p>The great challenge of a transformation API is how to deal with all the
         possible combinations of inputs and outputs, without becoming 
specialized for
         any of the given types.</p> 
  -  <p>The Java community will greatly benefit from a common API that will
  +  
  +<p>The Java community will greatly benefit from a common API that will
         allow them to understand and apply a single model, write to consistent
         interfaces, and apply the transformations polymorphically. TrAX 
attempts to
         define a model that is clean and generic, yet fills general application
         requirements across a wide variety of uses. </p> 
      
  -      <h3>General Terminology</h3> 
  -      <p>This section will explain some general terminology used in this
  +      
  +<h3>General Terminology</h3> 
  +      
  +<p>This section will explain some general terminology used in this
                document. Technical terminology will be explained in the Model 
section. In many
                cases, the general terminology overlaps with the technical 
terminology.</p> 
  -      <ul>
  +      
  +<ul>
   <li>
   <p>
   <b>Tree</b>
  @@ -137,10 +146,13 @@
   </li>
   </ul> 
      
  -  <h3>Requirements</h3> 
  -  <p>The following requirements have been determined from broad experience
  +  
  +<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>
  +  
  +<ol>
   <li>TrAX must provide a clean, simple
                interface for simple uses.</li>
   <li>TrAX must be powerful enough to be
  @@ -193,17 +205,21 @@
   <li>TrAX must have a mechanism for
                reporting errors and warnings to the calling application.</li>
   </ol>   
  -  <h3>Model</h3> 
  -  <p>The section defines the abstract model for TrAX, apart from the details
  +  
  +<h3>Model</h3> 
  +  
  +<p>The section defines the abstract model for TrAX, apart from the details
         of the interfaces.</p> 
  -  <p>A TRaX <A href="#pattern-TransformerFactory">TransformerFactory</A> is 
an object
  +  
  +<p>A TRaX <A href="#pattern-TransformerFactory">TransformerFactory</A> is an 
object
         that processes transformation instructions, and produces
         <A href="#pattern-Templates">Templates</A> (in the technical
         terminology). A <A href="#pattern-Templates">Templates</A>
         object provides a <A href="#pattern-Transformer">Transformer</A>, 
which transforms one or
         more <A href="#pattern-Source">Source</A>s into one or more
         <A href="#pattern-Result">Result</A>s.</p> 
  -  <p>To use the TRaX interface, you create a
  +  
  +<p>To use the TRaX interface, you create a
         <A href="#pattern-TransformerFactory">TransformerFactory</A>,
         which may directly provide a <A 
href="#pattern-Transformers">Transformers</A>, or which can provide
         <A href="#pattern-Templates">Templates</A> from a variety of
  @@ -215,11 +231,13 @@
         <A href="#pattern-Transformer">Source</A> according to the
         instructions found in the <A href="#pattern-Templates">Templates</A>, 
and produces a
         <A href="#pattern-Result">Result</A>.</p> 
  -  <p>The process of transformation from a tree, either in the form of an
  +  
  +<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
         this process, despite the overlap with Java object serialization.</p>
  -  <H3>TRaX Patterns</H3>
  +  
  +<H3>TRaX Patterns</H3>
   <ul>
   <p>
   <b><a name="pattern-Processor">Processor</a></b>
  @@ -297,5 +315,6 @@
     must be synchronized for edit.</p>
   </ul> 
     
  +
   </body>
   </html>
  
  
  
  1.7       +48 -24    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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- package.html      2000/11/23 00:05:52     1.6
  +++ package.html      2000/12/14 00:19:24     1.7
  @@ -31,8 +31,10 @@
                              new StreamResult(System.out));
   </pre>
   </code> 
  -             <h3>Creating Objects</h3> 
  -             <p>TrAX allows a concrete
  +             
  +<h3>Creating Objects</h3> 
  +             
  +<p>TrAX allows a concrete
                  [EMAIL PROTECTED] javax.xml.transform.TransformerFactory} 
object to be created from
                  the static function
                  [EMAIL PROTECTED] 
javax.xml.transform.TransformerFactory#newInstance}. The
  @@ -41,8 +43,10 @@
                  of the TransformerFactory abstract class. If this system 
property is not
                  defined, a platform default is used.</p> 
          
  -             <h3>Specification of Inputs and Outputs</h3> 
  -             <p>TrAX defines two interface objects called
  +             
  +<h3>Specification of Inputs and Outputs</h3> 
  +             
  +<p>TrAX defines two interface objects called
                  [EMAIL PROTECTED] javax.xml.transform.Source} and
                  [EMAIL PROTECTED] javax.xml.transform.Result}. In order to 
pass Source and Result
                  objects to the TrAX interfaces, concrete classes must be 
used. TrAX defines
  @@ -58,7 +62,8 @@
                  given type of Source or Result object is supported. For 
instance, to test if a
                  DOMSource and a StreamResult is supported, you can apply the 
following
                  test.</p> 
  -             <code>
  +             
  +<code>
   <pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
   
       if (tfactory.getFeature(DOMSource.FEATURE) &amp;&amp; 
tfactory.getFeature(StreamResult.FEATURE))
  @@ -67,10 +72,12 @@
       }</pre>
   </code> 
      
  -      <h3>
  +      
  +<h3>
   <a name="qname-delimiter">Qualified Name representation</a>
   </h3> 
  -      <p>
  +      
  +<p>
   <A href="http://www.w3.org/TR/REC-xml-names";>Namespaces</A>
                present something of a problem area when dealing with XML 
objects. Qualified
                Names appear in XML markup as prefixed names. But the prefixes 
themselves do
  @@ -78,26 +85,31 @@
                hold the identity. Therefore, when passing a Qualified Name 
like "xyz:foo"
                among Java programs, one must provide a means to map "xyz" to a 
namespace.
                </p> 
  -      <p>One solution has been to create a "QName" object that holds the
  +      
  +<p>One solution has been to create a "QName" object that holds the
                namespace URI, as well as the prefix and local name, but this 
is not always an
                optimal solution, as when, for example, you want to use unique 
strings as keys
                in a dictionary object. Not having a string representation also 
makes it
                difficult to specify a namespaced identity outside the context 
of an XML
                document.</p> 
  -      <p>In order to pass namespaced values to transformations, for instance
  +      
  +<p>In order to pass namespaced values to transformations, for instance
                as a set of properties to the Serializer, this specification 
defines that a
                String "qname" object parameter be passed as two-part string, 
the namespace URI
                enclosed in curly braces ({}), followed by the local name. If 
the qname has a
                null URI, then the String object only contains the local name. 
An application
                can safely check for a non-null URI by testing to see if the 
first character of
                the name is a '{' character.</p> 
  -      <p>For example, if a URI and local name were obtained from an element
  +      
  +<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";.
                Note that the prefix is lost.</p> 
      
  -      <h3>Result Tree Serialization</h3> 
  -      <p>Serialization of the result tree to a stream can be controlled with
  +      
  +<h3>Result Tree Serialization</h3> 
  +      
  +<p>Serialization of the result tree to a stream can be controlled with
                the [EMAIL PROTECTED] 
javax.xml.transform.Transformer#setOutputProperties} and the
                [EMAIL PROTECTED] 
javax.xml.transform.Transformer#setOutputProperty} methods.
                Strings that match the <A 
href="http://www.w3.org/TR/xslt#output";>XSLT
  @@ -108,7 +120,8 @@
                unless the key name is <A href="#qname-delimiter">namespace 
qualified</A>. Output key names that are
                qualified by a namespace are ignored or passed on to the 
serializer
                mechanism.</p> 
  -      <p>If all that is desired is the simple identity transformation of a
  +      
  +<p>If all that is desired is the simple identity transformation of a
                source to a result, then [EMAIL PROTECTED] 
javax.xml.transform.TransformerFactory}
                provides a
                [EMAIL PROTECTED] 
javax.xml.transform.TransformerFactory#newTransformer()} method
  @@ -117,7 +130,8 @@
                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> 
  -      <code>
  +      
  +<code>
   <pre>    TransformerFactory tfactory = TransformerFactory.newInstance();    
       Transformer serializer = tfactory.newTransformer();
       Properties oprops = new Properties();
  @@ -128,21 +142,25 @@
                            new StreamResult(System.out));</pre>
   </code> 
    
  -  <h3>Exceptions and Error Reporting</h3> 
  -  <p>The TrAX APIs throw three types of specialized exceptions. A
  -      [EMAIL PROTECTED] javax.xml.transform.TFactoryConfigurationError} is 
parallel to
  +  
  +<h3>Exceptions and Error Reporting</h3> 
  +  
  +<p>The TrAX APIs throw three types of specialized exceptions. A
  +      [EMAIL PROTECTED] 
javax.xml.transform.TransformerFactoryConfigurationError} is parallel to
         the [EMAIL PROTECTED] javax.xml.parsers.FactoryConfigurationError}, 
and is thrown
         when a configuration problem with the TransformerFactory exists. This 
error
         will typically be thrown when the transformation factory class 
specified with
         the "javax.xml.transform.TransformerFactory" system property cannot be 
found or
         instantiated.</p> 
  -  <p>A [EMAIL PROTECTED] 
javax.xml.transform.TransformerConfigurationException}
  +  
  +<p>A [EMAIL PROTECTED] javax.xml.transform.TransformerConfigurationException}
         may be thrown if for any reason a Transformer can not be created. A
         TransformerConfigurationException may be thrown if there is a syntax 
error in
         the transformation instructions, for example when
         [EMAIL PROTECTED] 
javax.xml.transform.TransformerFactory#newTransformer} is
         called.</p> 
  -  <p>[EMAIL PROTECTED] javax.xml.transform.TransformerException} is a general
  +  
  +<p>[EMAIL PROTECTED] javax.xml.transform.TransformerException} is a general
         exception that occurs during the course of a transformation. A 
transformer
         exception may wrap another exception, and if any of the
         [EMAIL PROTECTED] 
javax.xml.transform.TransformerException#printStackTrace()}
  @@ -154,7 +172,8 @@
         may be called to get an error message with location info, and
         [EMAIL PROTECTED] 
javax.xml.transform.TransformerException#getLocationAsString()}
         may be called to get just the location string.</p> 
  -  <p>Transformation warnings and errors are normally first sent to a
  +  
  +<p>Transformation warnings and errors are normally first sent to a
         [EMAIL PROTECTED] javax.xml.transform.ErrorListener}, at which point 
the
         implementor may decide to report the error or warning, and may decide 
to throw
         an exception for a non-fatal error. The error listener may be set via
  @@ -166,8 +185,10 @@
         should always be valid and non-null, whether set by the user or a 
default
         implementation provided by the processor.</p> 
    
  -  <h3>Resolution of URIs within a transformation</h3> 
  -  <p>TrAX provides a way for URIs referenced from within the stylesheet
  +  
  +<h3>Resolution of URIs within a transformation</h3> 
  +  
  +<p>TrAX 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,
  @@ -180,10 +201,12 @@
         base URI in effect when the URI passed as the first argument was 
encountered.
         The returned [EMAIL PROTECTED] 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
  +  
  +<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>
  +  
  +<code>
   <pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
   
       if (tfactory.getFeature(DOMSource.FEATURE) &amp;&amp; 
tfactory.getFeature(StreamResult.FEATURE))
  @@ -238,5 +261,6 @@
       }
   </pre>
   </code>
  +
   </body>
   </html>
  
  
  
  1.7       +2 -1      
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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TransformerHandler.java   2000/12/13 04:15:34     1.6
  +++ TransformerHandler.java   2000/12/14 00:19:26     1.7
  @@ -9,6 +9,7 @@
   
   import org.xml.sax.ContentHandler;
   import org.xml.sax.ext.LexicalHandler;
  +import org.xml.sax.DTDHandler;
   
   /**
    * A TransformerHandler 
  @@ -16,7 +17,7 @@
    * them to a Result.
    */
   public interface TransformerHandler 
  -  extends ContentHandler, LexicalHandler
  +  extends ContentHandler, LexicalHandler, DTDHandler
   {  
     /**
      * Enables the user of the TransformerHandler to set the
  
  
  
  1.21      +2 -2      xml-xalan/java/src/org/apache/xalan/xslt/Process.java
  
  Index: Process.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xslt/Process.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Process.java      2000/12/13 22:58:51     1.20
  +++ Process.java      2000/12/14 00:19:26     1.21
  @@ -94,7 +94,7 @@
   import javax.xml.transform.Result;
   import javax.xml.transform.TransformerFactory;
   import javax.xml.transform.TransformerConfigurationException;
  -import javax.xml.transform.TFactoryConfigurationError;
  +import javax.xml.transform.TransformerFactoryConfigurationError;
   import javax.xml.transform.Transformer;
   import javax.xml.transform.Templates;
   import javax.xml.transform.Source;
  @@ -192,7 +192,7 @@
         {
           tfactory = TransformerFactory.newInstance();
         }
  -      catch (TFactoryConfigurationError pfe)
  +      catch (TransformerFactoryConfigurationError pfe)
         {
           pfe.printStackTrace(dumpWriter);
           diagnosticsWriter.println(
  
  
  

Reply via email to