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/13 17:28:02 UTC

cvs commit: xml-xalan/java/src/org/apache/xpath/patterns AncestorStepPattern.java FunctionPattern.java NodeTest.java StepPattern.java UnionPattern.java

sboag       00/11/13 08:27:55

  Modified:    java/src/javax/xml/transform Result.java Source.java
                        SourceLocator.java TFactoryConfigurationError.java
                        Templates.java Transformer.java
                        TransformerConfigurationException.java
                        TransformerException.java TransformerFactory.java
                        URIResolver.java package.html
               java/src/javax/xml/transform/dom DOMLocator.java
                        DOMResult.java DOMSource.java package.html
               java/src/javax/xml/transform/sax SAXResult.java
                        SAXSource.java SAXTransformerFactory.java
                        TemplatesHandler.java TransformerHandler.java
                        package.html
               java/src/javax/xml/transform/stream StreamResult.java
                        StreamSource.java package.html
               java/src/org/apache/xalan/client XSLTProcessorApplet.java
               java/src/org/apache/xalan/extensions ExtensionHandler.java
                        ExtensionHandlerGeneral.java
                        ExtensionHandlerJavaClass.java
                        ExtensionHandlerJavaPackage.java
                        ExtensionsTable.java MethodResolver.java
                        XSLProcessorContext.java
               java/src/org/apache/xalan/lib Extensions.java Redirect.java
               java/src/org/apache/xalan/processor
                        CompiledStylesheetBundle.java CompiledTemplate.java
                        CompilingStylesheetHandler.java
                        CompilingStylesheetProcessor.java
                        ProcessorAttributeSet.java ProcessorCharacters.java
                        ProcessorDecimalFormat.java
                        ProcessorGlobalParamDecl.java
                        ProcessorGlobalVariableDecl.java
                        ProcessorImport.java ProcessorInclude.java
                        ProcessorKey.java ProcessorLRE.java
                        ProcessorNamespaceAlias.java
                        ProcessorOutputElem.java
                        ProcessorPreserveSpace.java
                        ProcessorStripSpace.java
                        ProcessorStylesheetElement.java
                        ProcessorTemplate.java ProcessorTemplateElem.java
                        ProcessorText.java ProcessorUnknown.java
                        StopParseException.java StylesheetHandler.java
                        StylesheetPIHandler.java
                        TransformerFactoryImpl.java XSLTAttributeDef.java
                        XSLTElementProcessor.java
               java/src/org/apache/xalan/serialize FormatterToHTML.java
                        FormatterToText.java FormatterToXML.java
               java/src/org/apache/xalan/stree CDATASectionImpl.java
                        CommentImpl.java IndexedLocPathIterator.java
                        Parent.java SaxEventDispatch.java
                        SourceTreeHandler.java StreeDOMBuilder.java
                        TextImpl.java
               java/src/org/apache/xalan/templates AVT.java AVTPart.java
                        AVTPartXPath.java ElemApplyImport.java
                        ElemApplyTemplates.java ElemAttribute.java
                        ElemAttributeSet.java ElemCallTemplate.java
                        ElemChoose.java ElemComment.java ElemCopy.java
                        ElemCopyOf.java ElemElement.java
                        ElemExtensionCall.java ElemExtensionDecl.java
                        ElemFallback.java ElemForEach.java ElemIf.java
                        ElemLiteralResult.java ElemMessage.java
                        ElemNumber.java ElemPI.java ElemParam.java
                        ElemTemplate.java ElemTemplateElement.java
                        ElemTextLiteral.java ElemUnknown.java ElemUse.java
                        ElemValueOf.java ElemVariable.java
                        FuncDocument.java FuncFormatNumb.java FuncKey.java
                        OutputFormatExtended.java Stylesheet.java
                        StylesheetComposed.java StylesheetRoot.java
                        TemplateList.java
                        TemplateSubPatternAssociation.java
                        WhitespaceList.java XUnresolvedVariable.java
               java/src/org/apache/xalan/trace PrintTraceListener.java
                        TraceListener.java TraceManager.java
               java/src/org/apache/xalan/transformer
                        ClonerToResultTree.java Counter.java
                        CountersTable.java KeyIterator.java KeyManager.java
                        KeyTable.java KeyWalker.java MsgMgr.java
                        NodeSortKey.java NodeSorter.java QueuedEvents.java
                        QueuedSAXEvent.java QueuedStartDocument.java
                        QueuedStartElement.java ResultTreeHandler.java
                        SerializerSwitcher.java StackGuard.java
                        TrAXFilter.java TransformerImpl.java
                        TreeWalker2Result.java
               java/src/org/apache/xalan/utils DOMBuilder.java
                        DefaultErrorHandler.java QName.java
                        RawCharacterHandler.java SystemIDResolver.java
                        TreeWalker.java
               java/src/org/apache/xalan/xslt Process.java
               java/src/org/apache/xpath DOM2Helper.java DOMHelper.java
                        Expression.java NodeSet.java SourceTreeManager.java
                        VariableStack.java XPath.java XPathAPI.java
                        XPathContext.java XPathException.java
               java/src/org/apache/xpath/axes AxesWalker.java
                        ChildIterator.java ContextNodeList.java
                        FilterExprWalker.java LocPathIterator.java
                        PrecedingWalker.java ReverseAxesWalker.java
                        UnionPathIterator.java WalkerFactory.java
               java/src/org/apache/xpath/compiler Compiler.java
                        FuncLoader.java FunctionTable.java Lexer.java
                        XPathParser.java
               java/src/org/apache/xpath/functions FuncBoolean.java
                        FuncCeiling.java FuncConcat.java FuncContains.java
                        FuncCount.java FuncCurrent.java
                        FuncDoclocation.java FuncExtElementAvailable.java
                        FuncExtFunction.java FuncExtFunctionAvailable.java
                        FuncFalse.java FuncFloor.java FuncFormatNumber.java
                        FuncGenerateId.java FuncId.java FuncLang.java
                        FuncLast.java FuncLocalPart.java FuncNamespace.java
                        FuncNormalizeSpace.java FuncNot.java
                        FuncNumber.java FuncPosition.java FuncQname.java
                        FuncRound.java FuncStartsWith.java FuncString.java
                        FuncStringLength.java FuncSubstring.java
                        FuncSubstringAfter.java FuncSubstringBefore.java
                        FuncSum.java FuncSystemProperty.java
                        FuncTranslate.java FuncTrue.java
                        FuncUnparsedEntityURI.java Function.java
                        FunctionDef1Arg.java
               java/src/org/apache/xpath/objects XBoolean.java
                        XBooleanStatic.java XNodeSet.java XNumber.java
                        XObject.java XRTreeFrag.java XString.java
               java/src/org/apache/xpath/operations And.java Bool.java
                        Div.java Equals.java Gt.java Gte.java Lt.java
                        Lte.java Minus.java Mod.java Mult.java Neg.java
                        NotEquals.java Number.java Operation.java Or.java
                        Plus.java Quo.java String.java UnaryOperation.java
                        Variable.java
               java/src/org/apache/xpath/patterns AncestorStepPattern.java
                        FunctionPattern.java NodeTest.java StepPattern.java
                        UnionPattern.java
  Added:       java/src/javax/xml/transform ErrorListener.java
                        OutputKeys.java
               java/src/org/apache/xalan/serialize DOMSerializer.java
                        Method.java OutputFormat.java QName.java
                        Serializer.java SerializerFactory.java package.html
                        serializer.properties
               java/src/org/apache/xalan/serialize/helpers
                        HTMLOutputFormat.java TextOutputFormat.java
                        XHTMLOutputFormat.java XMLOutputFormat.java
                        package.html
  Removed:     java/src/javax/xml/transform/sax SerializerHandler.java
               java/src/javax/xml/transform/stream OutputKeys.java
               java/src/org/apache/serialize DOMSerializer.java Method.java
                        OutputFormat.java QName.java Serializer.java
                        SerializerFactory.java SerializerHandler.java
                        package.html serializer.properties
               java/src/org/apache/serialize/helpers HTMLOutputFormat.java
                        TextOutputFormat.java XHTMLOutputFormat.java
                        XMLOutputFormat.java package.html
  Log:
  Changes to TrAX:
    Moved OutputKeys to generic level.
    Added ErrorListener.
    set/getSystemID on Source and Result interfaces.
    Nix SerializerHandler, define PI strings on Result object.
    Define null node on result as implementation will create Document.
    Major javaDoc improvements, including package overviews.
    URLResolver example in TrAX examples.
    Other TrAX examples added.
  
  Moved org.apache.serialize files to org.apache.xalan.serialize.
  Major changes for ErrorListener, all exceptions thrown are Transformer
  exceptions except when SAX interfaces require the SAX exception.
  
  Two regressions caused to conformance tests that I haven't
  tracked down yet.
  
  Revision  Changes    Path
  1.2       +50 -4     xml-xalan/java/src/javax/xml/transform/Result.java
  
  Index: Result.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/Result.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Result.java	2000/11/03 23:22:09	1.1
  +++ Result.java	2000/11/13 16:26:28	1.2
  @@ -64,10 +64,56 @@
   /**
    * An object that implements this interface contains the information
    * needed to build a result tree for a transformation.
  - *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public interface Result
   {
  -}
  +  /**
  +   * The name of a processing instruction that will be sent 
  +   * if the result tree should switch to disabling output escaping mode.
  +   * 
  +   * <p>Normally, result tree serialization escapes & and < (and 
  +   * possibly other characters) when outputting text nodes. 
  +   * This ensures that the output is well-formed XML. However, 
  +   * it is sometimes convenient to be able to produce output that is 
  +   * almost, but not quite well-formed XML; for example, 
  +   * the output may include ill-formed sections which are 
  +   * intended to be transformed into well-formed XML by a 
  +   * subsequent non-XML aware process. If a processing instruction is 
  +   * sent with this name, serialization should be output 
  +   * without any escaping. </p>
  +   * 
  +   * <p>Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and 
  +   * PI_ENABLE_OUTPUT_ESCAPING inserted into the tree.</p>
  +   * 
  +   * @see <a href="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
  +   */
  +  public static final String PI_DISABLE_OUTPUT_ESCAPING = "javax.xml.transform.disable-output-escaping";
  +  
  +  /**
  +   * The name of a processing instruction that will be sent 
  +   * if the result tree should switch to enabling output escaping mode,
  +   * following a PI_DISABLE_OUTPUT_ESCAPING processing instruction.
  +   * 
  +   * @see <a href="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
  +   */
  +  public static final String PI_ENABLE_OUTPUT_ESCAPING = "javax.xml.transform.disable-output-escaping";
  +
  +  /**
  +   * Set the system identifier for this Result.
  +   *
  +   * <p>The system identifier is optional if the result is not 
  +   * a system identifier, but it is still useful to provide one,
  +   * since the application can use it to resolve relative output identifiers,
  +   * and can include it in error messages and warnings.</p>
  +   *
  +   * @param systemId The system identifier as a URL string.
  +   */
  +  public void setSystemId(String systemId);
  +
  +  /**
  +   * Get the system identifier that was set with setSystemId.
  +   *
  +   * @return The system identifier that was set with setSystemId, or null
  +   * if setSystemId was not called.
  +   */
  +  public String getSystemId();}
  
  
  
  1.2       +17 -20    xml-xalan/java/src/javax/xml/transform/Source.java
  
  Index: Source.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/Source.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Source.java	2000/11/03 23:22:10	1.1
  +++ Source.java	2000/11/13 16:26:28	1.2
  @@ -64,29 +64,26 @@
   /**
    * An object that implements this interface contains the information
    * needed to act as source input.
  - *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public interface Source
   {
     /**
  -   * Get the base ID (URL or system ID) of the source tree.
  -   * 
  -   * <p>Editor's note: this method will probably go away from 
  -   * this level, be we ought to have some discussion of what 
  -   * it is on the mailing list.  I'm of mixed emotions.
  -   * It is really an aid to implementors.</p>
  -   * 
  -   * <p>The baseID value may be set automatically by 
  -   * the derived class.  For instance, in a StreamSource, the 
  -   * baseID property is the same as the SystemID property.
  -   * For an SAXSource, the baseID property is the same as 
  -   * the InputSource's SystemID property.  Other Source derivations,
  -   * such as DOMSource, may have a specific method to set the 
  -   * baseID.</p>
  -   * 
  -   * @return Base URL for the source tree.
  +   * Set the system identifier for this Source.
  +   *
  +   * <p>The system identifier is optional if the source does not 
  +   * get it's data from a URL, 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.</p>
  +   *
  +   * @param systemId The system identifier as a URL string.
      */
  -  public String getBaseID();
  +  public void setSystemId(String systemId);
  +
  +  /**
  +   * Get the system identifier that was set with setSystemId.
  +   *
  +   * @return The system identifier that was set with setSystemId, or null
  +   * if setSystemId was not called.
  +   */
  +  public String getSystemId();
   }
  
  
  
  1.2       +0 -3      xml-xalan/java/src/javax/xml/transform/SourceLocator.java
  
  Index: SourceLocator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/SourceLocator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SourceLocator.java	2000/11/03 23:22:10	1.1
  +++ SourceLocator.java	2000/11/13 16:26:28	1.2
  @@ -59,9 +59,6 @@
   /**
    * This interface is primarily for the purposes of reporting where
    * an error occured in the source or transformation instructions.
  - *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public interface SourceLocator
   {
  
  
  
  1.2       +3 -5      xml-xalan/java/src/javax/xml/transform/TFactoryConfigurationError.java
  
  Index: TFactoryConfigurationError.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/TFactoryConfigurationError.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TFactoryConfigurationError.java	2000/11/03 23:22:10	1.1
  +++ TFactoryConfigurationError.java	2000/11/13 16:26:28	1.2
  @@ -1,5 +1,5 @@
   /*
  - * $Id: TFactoryConfigurationError.java,v 1.1 2000/11/03 23:22:10 sboag Exp $
  + * $Id: TFactoryConfigurationError.java,v 1.2 2000/11/13 16:26:28 sboag Exp $
    * 
    * Copyright (c) 1998-1999 Sun Microsystems, Inc. All Rights Reserved.
    * 
  @@ -20,12 +20,10 @@
   package javax.xml.transform;
   
   /**
  - * Thrown when a problem with configuration with the Parser Factories
  + * Thrown when a problem with configuration with the Transformer Factories
    * exists. This error will typically be thrown when the class of a
  - * parser factory specified in the system properties cannot be found
  + * transformation factory specified in the system properties cannot be found
    * or instantiated.
  - *
  - * @version 1.0
    */
   public class TFactoryConfigurationError extends Error {
   
  
  
  
  1.2       +0 -3      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Templates.java	2000/11/03 23:22:10	1.1
  +++ Templates.java	2000/11/13 16:26:28	1.2
  @@ -67,9 +67,6 @@
    * <p>Templates must be threadsafe for a given instance
    * over multiple threads concurrently, and are generally meant to
    * be used multiple times in a given session.</p>
  - *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public interface Templates
   {
  
  
  
  1.5       +56 -41    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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Transformer.java	2000/11/07 17:25:14	1.4
  +++ Transformer.java	2000/11/13 16:26:28	1.5
  @@ -70,10 +70,6 @@
    * multiple threads.</p>
    * <p>A Transformer may be used multiple times.  Parameters and 
    * output properties are preserved across transformations.</p>
  - *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
  - * @since JAXP 1.1
    */
   public abstract class Transformer
   {
  @@ -83,7 +79,8 @@
      * @param xmlSource  The input for the source tree.
      * @param outputTarget The output source target.
      *
  -   * @throws TransformerException
  +   * @throws TransformerException If an unrecoverable error occurs 
  +   * during the course of the transformation.
      */
     public abstract void transform(Source xmlSource, Result outputTarget)
       throws TransformerException;
  @@ -110,35 +107,18 @@
      * in extensions.
      */
     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.
  +   * 
  +   * <p>This does not return objects from default values of 
  +   * parameters, since, among other reasons, these require a 
  +   * node context to be evaluated, and thus can not be resolved 
  +   * until the transformation is underway.</p>
      *
      * @return A parameter that has been set with setParameter 
  -   * or setParameters,
  -   * *not* all the xsl:params on the stylesheet (which require 
  -   * a transformation Source to be evaluated).
  +   * or setParameters.
      */
     public abstract Object getParameter(String name);
   
  @@ -178,19 +158,35 @@
      * 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>
  +   * 
  +   * <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
      * for the transformation.
      * 
  -   * @see javax.xml.transform.stream.OutputKeys
  +   * @see javax.xml.transform.OutputKeys
  +   * @see java.util.Properties
  +   * 
  +   * @throws IllegalArgumentException if any of the argument keys are not 
  +   * recognized and are not namespace qualified.
      */
  -  public abstract void setOutputProperties(Properties oformat);
  +  public abstract void setOutputProperties(Properties oformat)
  +    throws IllegalArgumentException;
   
     /**
  -   * Get a copy of the output properties for the transformation.  These
  -   * properties will override properties set in the templates
  -   * with xsl:output.
  +   * 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 structured passed the 
  +   * first layer.  Thus, getOutputProperties().getProperty(String key) will obtain any 
  +   * property in effect for the stylesheet, while 
  +   * getOutputProperties().get(String key) will only retrieve properties 
  +   * that were explicitly set with setOutputProperties and setOutputProperty.</p>
      * 
      * <p>Note that mutation of the Properties object returned will not 
      * effect the properties that the transformation contains.</p>
  @@ -198,7 +194,8 @@
      * @returns A copy of the set of output properties in effect
      * for the next transformation.
      * 
  -   * @see javax.xml.transform.stream.OutputKeys
  +   * @see javax.xml.transform.OutputKeys
  +   * @see java.util.Properties
      */
     public abstract Properties getOutputProperties();
   
  @@ -221,12 +218,13 @@
      * property name, which may be namespace qualified.
      * @param value The non-null string value of the output property.
      *
  -   * @throws TransformerException
  +   * @throws IllegalArgumentException If the property is not supported, and is 
  +   * not qualified with a namespace.
      * 
  -   * @see javax.xml.transform.stream.OutputKeys
  +   * @see javax.xml.transform.OutputKeys
      */
     public abstract void setOutputProperty(String name, String value)
  -    throws TransformerException;
  +    throws IllegalArgumentException;
   
     /**
      * Get an output property that is in effect for the 
  @@ -240,10 +238,27 @@
      * @return The string value of the output property, or null 
      * if no property was found.
      *
  -   * @throws TransformerException
  +   * @throws IllegalArgumentException If the property is not supported.
      * 
  -   * @see javax.xml.transform.stream.OutputKeys
  +   * @see javax.xml.transform.OutputKeys
      */
     public abstract String getOutputProperty(String name)
  -    throws TransformerException;
  +    throws IllegalArgumentException;
  +  
  +  /**
  +   * Set the error event listener in effect for the transformation.
  +   *
  +   * @param listener The new error listener.
  +   * @throws IllegalArgumentException if 
  +   */
  +  public abstract void setErrorListener (ErrorListener listener)
  +    throws IllegalArgumentException;
  +
  +  /**
  +   * Get the error event handler in effect for the transformation.
  +   *
  +   * @return The current error handler, which should never be null.
  +   */
  +  public abstract ErrorListener getErrorListener ();
  +
   }
  
  
  
  1.2       +5 -44     xml-xalan/java/src/javax/xml/transform/TransformerConfigurationException.java
  
  Index: TransformerConfigurationException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/TransformerConfigurationException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TransformerConfigurationException.java	2000/11/03 23:22:10	1.1
  +++ TransformerConfigurationException.java	2000/11/13 16:26:28	1.2
  @@ -1,5 +1,5 @@
   /*
  - * $Id: TransformerConfigurationException.java,v 1.1 2000/11/03 23:22:10 sboag Exp $
  + * $Id: TransformerConfigurationException.java,v 1.2 2000/11/13 16:26:28 sboag Exp $
    * 
    * Copyright (c) 1998-1999 Sun Microsystems, Inc. All Rights Reserved.
    * 
  @@ -15,21 +15,15 @@
   
   /**
    * Indicates a serious configuration error.
  - *
  - * @since JAXP 1.0
  - * @version 1.0
    */
  -
  -public class TransformerConfigurationException extends Exception {
  
  -    private Exception exception;
  -
  +public class TransformerConfigurationException extends TransformerException {
  
       /**
        * Create a new <code>TransformerConfigurationException</code> with no
        * detail mesage.
        */
   
       public TransformerConfigurationException() {
  -        super();
  +        super("Configuration Error");
       }
   
       /**
  @@ -50,8 +44,7 @@
        */
       
       public TransformerConfigurationException(Exception e) {
  -        super();
  -        this.exception = e;
  +        super(e);
       }
   
       /**
  @@ -65,40 +58,8 @@
        */
       
       public TransformerConfigurationException(String msg, Exception e) {
  -        super(msg);
  -        this.exception = e;
  +        super(msg, e);
       }
  -
  -
  -    /**
  -     * Return the message (if any) for this error . If there is no
  -     * message for the exception and there is an encapsulated
  -     * exception then the message of that exception will be returned.
  -     *
  -     * @return The error message.
  -     */
  -    
  -    public String getMessage () {
  -        String message = super.getMessage ();
  -  
  -        if (message == null && exception != null) {
  -            return exception.getMessage();
  -        }
  -
  -        return message;
  -    }
  -  
  -    /**
  -     * Return the actual exception (if any) that caused this exception to
  -     * be raised.
  -     *
  -     * @return The encapsulated exception, or null if there is none.
  -     */
  -    
  -    public Exception getException () {
  -        return exception;
  -    }
  -
   
   }
   
  
  
  
  1.3       +67 -48    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransformerException.java	2000/11/06 19:28:28	1.2
  +++ TransformerException.java	2000/11/13 16:26:28	1.3
  @@ -65,9 +65,6 @@
   /**
    * This class specifies an exceptional condition that occured 
    * during the transformation process.
  - *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public class TransformerException extends Exception
   {
  @@ -182,66 +179,55 @@
       this.containedException = e;
       this.locator = locator;
     }
  -  
  +        
     /**
  -   * Print the the trace of methods from where the error 
  -   * originated.  This will trace all nested exception 
  -   * objects, as well as this object.
  -   * @param s The stream where the dump will be sent to.
  +   * Get the error message with location information 
  +   * appended.
      */
  -  public void printStackTrace(java.io.PrintStream s) 
  +  public String getMessageAndLocation()
     {
  -    if(s == null)
  -      s = System.err;
  -    try
  +    StringBuffer sbuffer = new StringBuffer();
  +    String message = super.getMessage();    
  +    if(null != message)
       {
  -      super.printStackTrace(s);
  +      sbuffer.append(message);
       }
  -    catch(Exception e){}
  -    Exception exception = getException();
  -    for(int i = 0; (i < 10) && (null != exception); i++)
  +    if(null != locator)
       {
  -      s.println("---------");
  -      exception.printStackTrace(s);
  -      try
  -      {
  -        Method meth = ((Object)exception).getClass().getMethod("getException", null);
  -        if(null != meth)
  -        {
  -          Exception prev = exception;
  -          exception = (Exception)meth.invoke(exception, null);
  -          if(prev == exception)
  -            break;
  -        }
  -        else
  -        {
  -          exception = null;
  -        }
  -      }
  -      catch(InvocationTargetException ite)
  +      String systemID = locator.getSystemId();
  +      int line = locator.getLineNumber();
  +      int column = locator.getColumnNumber();
  +
  +      if(null != systemID)
         {
  -        exception = null;
  +        sbuffer.append("; SystemID: ");
  +        sbuffer.append(systemID);
         }
  -      catch(IllegalAccessException iae)
  +      if(0 != line)
         {
  -        exception = null;
  +        sbuffer.append("; Line#: ");
  +        sbuffer.append(line);
         }
  -      catch(NoSuchMethodException nsme)
  +      if(0 != column)
         {
  -        exception = null;
  +        sbuffer.append("; Column#: ");
  +        sbuffer.append(column);
         }
       }
  +    return sbuffer.toString();
     }
  -    
  -  private void appendMessageAndInfo(StringBuffer sbuffer)
  +  
  +  /**
  +   * Get the location information as a string.
  +   * 
  +   * @return A string with location info, or null 
  +   * if there is no location information.
  +   */
  +  public String getLocationAsString()
     {
  -    String message = super.getMessage();    
  -    if(null != message)
  -    {
  -      sbuffer.append(message);
  -    }
       if(null != locator)
       {
  +      StringBuffer sbuffer = new StringBuffer();
         String systemID = locator.getSystemId();
         int line = locator.getLineNumber();
         int column = locator.getColumnNumber();
  @@ -261,9 +247,31 @@
           sbuffer.append("; Column#: ");
           sbuffer.append(column);
         }
  +      return sbuffer.toString();
       }
  +    else return null;
     }
     
  +  /**
  +   * Print the the trace of methods from where the error 
  +   * originated.  This will trace all nested exception 
  +   * objects, as well as this object.
  +   */
  +  public void printStackTrace() 
  +  {
  +    printStackTrace(new java.io.PrintWriter(System.err, true));
  +  }
  +  
  +  /**
  +   * Print the the trace of methods from where the error 
  +   * originated.  This will trace all nested exception 
  +   * objects, as well as this object.
  +   * @param s The stream where the dump will be sent to.
  +   */
  +  public void printStackTrace(java.io.PrintStream s) 
  +  {
  +    printStackTrace(new java.io.PrintWriter(s));
  +  }
   
     /**
      * Print the the trace of methods from where the error 
  @@ -274,12 +282,17 @@
     public void printStackTrace(java.io.PrintWriter s) 
     {
       if(s == null)
  -      s = new java.io.PrintWriter(System.err);
  +      s = new java.io.PrintWriter(System.err, true);
       try
       {
  +      String locInfo = getLocationAsString();
  +      if(null != locInfo)
  +        s.println(locInfo);
         super.printStackTrace(s);
       }
  -    catch(Exception e){}
  +    catch(Exception e)
  +    {
  +    }
       Exception exception = getException();
       
       for(int i = 0; (i < 10) && (null != exception); i++)
  @@ -287,6 +300,12 @@
         s.println("---------");
         try
         {
  +        if(exception instanceof TransformerException)
  +        {
  +          String locInfo = ((TransformerException)exception).getLocationAsString();
  +          if(null != locInfo)
  +            s.println(locInfo);
  +        }
           exception.printStackTrace(s);
         }
         catch(Exception e)
  
  
  
  1.7       +24 -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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TransformerFactory.java	2000/11/11 01:32:13	1.6
  +++ TransformerFactory.java	2000/11/13 16:26:28	1.7
  @@ -75,9 +75,6 @@
    * 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>
    */
   public abstract class TransformerFactory
   {
  @@ -228,6 +225,7 @@
      * Set an object that will be used to resolve URIs used in
      * xsl:import, etc.  This will be used as the default for the
      * transformation.
  +   * 
      * @param resolver An object that implements the URIResolver interface,
      * or null.
      */
  @@ -256,11 +254,12 @@
   
     /**
      * Allows the user to set specific attributes on the underlying
  -   * implementation.
  +   * implementation.  An attribute in this context is defined to 
  +   * be an option that the implementation provides.
      * 
      * @param name The name of the attribute.
      * @param value The value of the attribute.
  -   * @exception IllegalArgumentException thrown if the underlying
  +   * @throws IllegalArgumentException thrown if the underlying
      * implementation doesn't recognize the attribute.
      */
     public abstract void setAttribute(String name, Object value)
  @@ -271,11 +270,30 @@
      * implementation.
      * @param name The name of the attribute.
      * @return value The value of the attribute.
  -   * @exception IllegalArgumentException thrown if the underlying
  +   * @throws IllegalArgumentException thrown if the underlying
      * implementation doesn't recognize the attribute.
      */
     public abstract Object getAttribute(String name)
       throws IllegalArgumentException;
  +  
  +  /**
  +   * Set the error event listener for the TransformerFactory. This 
  +   * will be used for the processing of transformation instructions, 
  +   * and not for the transformation itself.
  +   *
  +   * @param listener The new error listener.
  +   * @throws IllegalArgumentException if listener is null.
  +   */
  +  public abstract void setErrorListener (ErrorListener listener)
  +    throws IllegalArgumentException;
  +
  +  /**
  +   * Get the error event handler for the TransformerFactory.
  +   *
  +   * @return The current error handler, which should never be null.
  +   */
  +  public abstract ErrorListener getErrorListener ();
  +
   
     // -------------------- private methods --------------------
   
  
  
  
  1.2       +6 -5      xml-xalan/java/src/javax/xml/transform/URIResolver.java
  
  Index: URIResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/URIResolver.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- URIResolver.java	2000/11/03 23:22:10	1.1
  +++ URIResolver.java	2000/11/13 16:26:28	1.2
  @@ -59,8 +59,6 @@
   /**
    * <p>An interface that can be called by the processor to for turning the
    * URIs used in document() and xsl:import etc into an Source object.
  - *
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public interface URIResolver
   {
  @@ -70,11 +68,14 @@
      * an xsl:include, xsl:import, or document() function.
      *
      * @param href An href attribute, which may be relative or absolute.
  -   * @param base The base URI in effect when the href attribute was encountered.
  +   * @param base The base URI in effect when the href attribute 
  +   * was encountered.
      *
  -   * @return A non-null Source object.
  +   * @return A Source object, or null if the href can not be resolved, 
  +   * and the processor should try to resolve the URI itself.
      *
  -   * @throws TransformerException
  +   * @throws TransformerException if an error occurs when trying to 
  +   * resolve the URI.
      */
     public Source resolve(String href, String base) throws TransformerException;
   }
  
  
  
  1.3       +386 -236  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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- package.html	2000/11/07 17:25:17	1.2
  +++ package.html	2000/11/13 16:26:28	1.3
  @@ -8,23 +8,24 @@
   <body> 
     <h2>Transformations API For XML (TrAX)</h2> 
     <p>
  -<b>Edit Date: </b>November 6, 2000</p> 
  +<b>Edit Date: </b>November 12, 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> 
  +	 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 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> 
  +	 by Java code, Perl code, <A href="http://www.w3.org/TR/xslt">XSLT</A>
  +	 Stylesheets, other types of script, or by proprietary formats. The inputs, one
  +	 or multiple, to a transformation, may be a URL, XML stream, a DOM tree, SAX
  +	 Events, or a proprietary format or data structure. The output types are the
  +	 pretty much the same types as the inputs, but different inputs may need to be
  +	 combined with different outputs.</p> 
     <p>The great challenge of a transformation API is how to deal with
   	 combinations of inputs and outputs, without becoming specialized for any of the
   	 given types.</p> 
  @@ -32,304 +33,330 @@
   	 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 will fill the requirements of
  -	 general application across a great variety of uses. </p> 
  +	 general applications across a great variety of uses. </p> 
      
   	 <h3>General Terminology</h3> 
   	 <p>This section will explain some general terminology used in this
   		document. Technical terminology will be explained in the Model section. In many
   		cases, the general terminology overlaps with the technical terminology.</p> 
  -	 <dl>
  -<dt>
  +	 <ul>
  +<li>
  +<p>
   <b>Tree</b>
  -</dt>
  -<dd>This term, as used within this document, describes an
  +<br>This term, as used within this document, describes an
   			 abstract structure that consists of nodes or events that may be produced by
   			 XML. A Tree physically may be a DOM tree, a series of well balanced parse
  -			 events, a series of requests (the result of which can describe a tree), or a
  -			 stream of marked-up characters.</dd>
  -<dt>
  +			 events (such as those coming from a SAX2 ContentHander), a series of requests
  +			 (the result of which can describe a tree), or a stream of marked-up
  +			 characters.</p>
  +</li>
  +<li>
  +<p>
   <b>Source Tree(s)</b>
  -</dt>
  -<dd>One or more trees that are the inputs to the
  -			 transformation.</dd>
  -<dt>
  +<br>One or more trees that are the inputs to the
  +			 transformation.</p>
  +</li>
  +<li>
  +<p>
   <b>Result Tree(s)</b>
  -</dt>
  -<dd>One or more trees that are the output of the
  -			 transformation.</dd>
  -<dt>
  +<br>One or more trees that are the output of the
  +			 transformation.</p>
  +</li>
  +<li>
  +<p>
   <b>Transformation</b>
  -</dt>
  -<dd>The processor of consuming a stream or tree to produce
  -			 another stream or tree.</dd>
  -<dt>
  +<br>The processor of consuming a stream or tree to produce
  +			 another stream or tree.</p>
  +</li>
  +<li>
  +<p>
   <b>Identity (or Copy) Transformation</b>
  -</dt>
  -<dd>The process of transformation from a source to a result,
  +<br>The process of transformation from a source to a result,
   			 making as few structural changes as possible and no informational changes. The
  -			 term is somewhat loosely used, as the process is really a copy.</dd>
  -<dt>
  +			 term is somewhat loosely used, as the process is really a copy.</p>
  +</li>
  +<li>
  +<p>
   <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>
  +<br>The process of taking a tree and turning it into a stream. In
  +			 some sense, serialization is a specialization of transformation.</p>
  +</li>
  +<li>
  +<p>
   <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>
  +<br>The process of taking a stream and turning it into a tree. In
  +			 some sense, parsing is a specialization of transformation.</p>
  +</li>
  +<li>
  +<p>
   <b>Transformer</b>
  -</dt>
  -<dd>A transformer is the thing that executes the transformation.
  -			 </dd>
  -<dt>
  +<br>A transformer is the thing that executes the transformation.
  +			 </p>
  +</li>
  +<li>
  +<p>
   <b>Transformation instructions</b>
  -</dt>
  -<dd>Describes the transformation. A form of code, script, or
  -			 simply a declaration or series of declarations.</dd>
  -<dt>
  +<br>Describes the transformation. A form of code, script, or
  +			 simply a declaration or series of declarations.</p>
  +</li>
  +<li>
  +<p>
   <b>Stylesheet</b>
  -</dt>
  -<dd>The same as "transformation instructions", except it is
  -			 likely to be used in conjunction with XSLT.</dd>
  -<dt>
  +<br>The same as "transformation instructions", except it is
  +			 likely to be used in conjunction with <A href="http://www.w3.org/TR/xslt">XSLT</A>.</p>
  +</li>
  +<li>
  +<p>
   <b>Template or Templates</b>
  -</dt>
  -<dd>Another form of "transformation instructions", except in the
  +<br>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>
  +			 formed into the result.</p>
  +</li>
  +<li>
  +<p>
   <b>Processor</b>
  -</dt>
  -<dd>A general term for the thing that may both process the
  -			 transformation instructions, and perform the transformation.</dd>
  -<dt>
  +<br>A general term for the thing that may both process the
  +			 transformation instructions, and perform the transformation.</p>
  +</li>
  +<li>
  +<p>
   <b>DOM</b>
  -</dt>
  -<dd>Document Object Model, specifically refering to the
  -			 Document Object Model
  -			 (DOM) Level 2 Specification.</dd>
  -<dt>
  +<br>Document Object Model, specifically referring to the
  +			 <A href="#http://www.w3.org/TR/DOM-Level-2 ">Document Object Model
  +			 (DOM) Level 2 Specification</A>.</p>
  +</li>
  +<li>
  +<p>
   <b>SAX</b>
  -</dt>
  -<dd>Simple API for XML, specifically refering to the
  -			 SAX 2.0
  -			 release.</dd>
  -</dl> 
  +<br>Simple API for XML, specifically referring to the
  +			 <A href="#http://www.megginson.com/SAX/SAX2">SAX 2.0
  +			 release</A>.</p>
  +</li>
  +</ul> 
      
     <h3>Requirements</h3> 
     <p>The following requirements have been determined from broad experience
   	 with XML projects from the various members participating on the JCP.</p> 
     <ol>
  -<li>TrAX must provide a clean, simple interface for simple
  -		uses.</li>
  -<li>TrAX must be powerful enough to be applied to a wide range of
  -		uses, such as, e-commerce, content management, server content delivery, and
  -		client applications.</li>
  -<li>A processor that implements a TrAX interface must be
  -		optimizeable. Performance is a critical issue for most transformation use
  -		cases.</li>
  -<li>As a specialization of the above requirement, a TrAX processor
  -		must be able to support a compiled model, so that a single set of
  -		transformation instructions can be compiled, optimized, and applied to a large
  -		set of input sources.</li>
  -<li>TrAX must not be dependent an any given type of transformation
  -		instructions. For instance, it must remain independent of XSLT.</li>
  -<li>TrAX must be able to allow processors to transform DOM
  -		trees.</li>
  -<li>TrAX must be able to allow processors to produce DOM
  -		trees.</li>
  -<li>TrAX must be able to allow processors to transform SAX
  -		events.</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
  -		other types of streams.</li>
  -<li>TrAX must be able to allow processors to implement the various
  -		combinations of inputs and outputs within a single processor.</li>
  -<li>TrAX must be able to allow processors to implement only a limited
  -		set of inputs. For instance, it should be possible to write a processor that
  -		implements the TrAX interfaces that only processor DOM trees, not streams or
  -		SAX events.</li>
  -<li>TrAX should allow a processor to implement transformations of
  -		proprietary data structures. For instance, it should be possible to implement a
  -		processor that provides TrAX interfaces that performs transformation of JDOM
  -		trees.</li>
  -<li>TrAX must be able to allow the setting of serialization
  -		properties, without constraint as to what the details of those properties
  -		are.</li>
  -<li>TrAX must allow the setting of parameters to the transformation
  -		instructions.</li>
  -<li>TrAX must be able to support the setting of parameters and
  -		properties as XML Namespaced items (i.e. qualified names).</li>
  -<li>TrAX must be able to support URL resolution from within the
  -		transformation, and have it return the needed data structure.</li>
  +<li>TrAX must provide a clean, simple
  +		interface for simple uses.</li>
  +<li>TrAX must be powerful enough to be
  +		applied to a wide range of uses, such as, e-commerce, content management,
  +		server content delivery, and client applications.</li>
  +<li>A processor that implements a TrAX
  +		interface must be optimizeable. Performance is a critical issue for most
  +		transformation use cases.</li>
  +<li>As a specialization of the above
  +		requirement, a TrAX processor must be able to support a compiled model, so that
  +		a single set of transformation instructions can be compiled, optimized, and
  +		applied to a large set of input sources.</li>
  +<li>TrAX must not be dependent an any
  +		given type of transformation instructions. For instance, it must remain
  +		independent of <A href="http://www.w3.org/TR/xslt">XSLT</A>.</li>
  +<li>TrAX must be able to allow processors
  +		to transform DOM trees.</li>
  +<li>TrAX must be able to allow processors to
  +		produce DOM trees.</li>
  +<li>TrAX must be able to allow processors
  +		to transform SAX events.</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 other types of streams.</li>
  +<li>TrAX must be able to allow
  +		processors to implement the various combinations of inputs and outputs within a
  +		single processor.</li>
  +<li>TrAX must be able to allow
  +		processors to implement only a limited set of inputs. For instance, it should
  +		be possible to write a processor that implements the TrAX interfaces that only
  +		processor DOM trees, not streams or SAX events.</li>
  +<li>TrAX should allow a
  +		processor to implement transformations of proprietary data structures. For
  +		instance, it should be possible to implement a processor that provides TrAX
  +		interfaces that performs transformation of JDOM trees.</li>
  +<li>TrAX must be able to allow
  +		the setting of serialization properties, without constraint as to what the
  +		details of those properties are.</li>
  +<li>TrAX must allow the setting
  +		of parameters to the transformation instructions.</li>
  +<li>TrAX must be able to
  +		support the setting of parameters and properties as XML Namespaced items (i.e.
  +		qualified names).</li>
  +<li>TrAX must be able to
  +		support URL resolution from within the transformation, and have it return the
  +		needed data structure.</li>
  +<li>TrAX must have a mechanism for
  +		reporting of errors and warnings by the calling application.</li>
   </ol>   
     <h3>Model</h3> 
     <p>The section defines the abstract model for TrAX, apart from the details
   	 of the interfaces.</p> 
  -  <p>A TRaX TransformerFactory is an object that
  -	 processes transformation instructions, and produces
  -	 Templates (in the technical termonology). The
  -	 Templates provide Transformers, which
  -	 transform one or more Sources into one or more
  -	 Results.</p> 
  +  <p>A TRaX <A href="#pattern-TransformerFactory">TransformerFactory</A> is an object
  +	 that processes transformation instructions, and produces
  +	 <A href="#pattern-Templates">Templates</A> (in the technical
  +	 terminology). The <A href="#pattern-Templates">Templates</A>
  +	 provide <A href="#pattern-Transformer">Transformer</A>, which
  +	 transform 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
  -	 TransformerFactory, which may directly provide Transformers,
  -	 or which can provide Templates from a variety of
  -	 Sources. The Templates object is normally a compiled
  -	 representation of the transformation instructions, and provides a
  -	 Transformer. The Transformer processes an
  -	 InputSource according to the instructions found in the
  -	 Templates, and produces a Result.</p> 
  +	 <A href="#pattern-TransformerFactory">TransformerFactory</A>,
  +	 which may directly provide <A href="#pattern-Transformers">Transformers</A>, or which can provide
  +	 <A href="#pattern-Templates">Templates</A> from a variety of
  +	 <A href="#pattern-Source">Source</A>s. The
  +	 <A href="#pattern-Templates">Templates</A> object is normally a
  +	 processed or compiled representation of the transformation instructions, and
  +	 provides a <A href="#pattern-Transformer">Transformer</A>. The
  +	 <A href="#pattern-Transformer">Transformer</A> processes a
  +	 <A href="#pattern-Transformer">Source</A> according to the
  +	 instructions found in the <A href="#pattern-Templates">Templates</A>, and produces a
  +	 <A href="#pattern-Result">Result</A>.</p> 
     <p>The process of transformation from a tree, either in the form of an
   	 object model, or in the form of parse events, into a stream, is known as
  -	 Serialization. This term, although it overlaps with Java
  +	 <U>serialization</U>. This term, although it overlaps with Java
   	 object serialization, is the best description of this process.</p>
     <H3>TRaX Patterns</H3>
  -<dl>
  -<dt>
  -<b>Processor</b>
  -</dt>
  -<dd>
  +<ul>
   <p>
  +<b><a name="pattern-Processor">Processor</a></b>
  +<br>
  +<br>
   <i>Intent: </i>Generic concept for the
     set of objects that implement the TrAX
  -  interfaces.</p>
  -<p>
  +  interfaces.<br>
   <i>Responsibilities: </i>Create compiled transformation
     instructions, transform resources, and manager parameters and properties of
  -  those transformations.</p>
  -<p>
  +  those transformations.<br>
   <i>Thread safety: </i>Only the Templates
     object can be used concurrently in multiple threads. The rest of the processor
     does not do synchronized blocking, and so can not be used
     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.</p>
   <p>
  +<b><a name="pattern-TransformerFactory">TransformerFactory</a></b>
  +<br>
  +<br>
  +<i>Intent: </i>Serve as a vendor neutral Processor interface for
  +  <A href="http://www.w3.org/TR/xslt">XSLT</A> processors and similar
  +  processors.<br>
   <i>Responsibilities: </i>Serve as a factory for a concrete
     implementation of an TransformerFactory, serve as a direct factory for
     Transformer objects, serve as a factory for Templates objects, and manage
  -  processor specific features.</p>
  -<p>
  +  processor specific features.<br>
   <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>
  +<b><a name="pattern-Templates">Templates</a></b>
  +<br>
  +<br>
  +<i>Intent: </i>The run time
  +  representation of the transformation instructions.<br>
   <i>Responsibilities: </i>Acts as a data bag for transformation instructions, act as a
  -  factory for Transformers.</p>
  -<p>
  +  factory for Transformers.<br>
   <i>Thread safety: </i>Threadsafe
     concurrently over multiple threads once construction is
     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.</p>
   <p>
  -<i>Responsibilities: </i>Perfom the
  -  transformation.</p>
  -<p>
  +<b><a name="pattern-Transformer">Transformer</a></b>
  +<br>
  +<br>
  +<i>Intent: </i>Act
  +  as a per-thread execution context for transformations, act as an interface for
  +  performing the transformation.<br>
  +<i>Responsibilities: </i>Perform the
  +  transformation.<br>
   <i>Thread safety: </i>Only safe one instance per
  -  thread.</p>
  -<p>
  +  thread.<br>
   <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>
  +<b><a name="pattern-Source">Source</a></b>
  +<br>
  +<br>
  +<i>Intent: </i>Serve as a single
  +  vendor-neutral object for multiple types of input.<br>
  +<i>Responsibilities: </i>Act as simple data holder for System IDs, DOM nodes, streams,
  +  etc.<br>
  +<i>Thread safety: </i>Threadsafe concurrently over multiple
  +  threads for read-only, must be synchronized for edit.</p>
  +<p>
  +<b><a name="pattern-Result">Result</a></b>
  +<br>
  +<br>
  +<i>Potential alternate name: </i>ResultTarget<br>
   <i>Intent: </i>Serve
     as a single object for multiple types of output, so there can be simple process
  -  method signatures.</p>
  -<p>
  +  method signatures.<br>
   <i>Responsibilities: </i>Act as simple data holder for
  -  output stream, DOM node, ContentHandler, etc.</p>
  -<p>
  +  output stream, DOM node, ContentHandler, etc.<br>
   <i>Thread safety: </i>Threadsafe concurrently over multiple threads for read-only,
     must be synchronized for edit.</p>
  -</dd>
  -</dl> 
  +</ul> 
      
   	 <h3>Interfaces and Usage</h3> 
  -	 <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
  -		of a transform. It acheaves this by defining org.javax.xml.trax.Source and
  -		org.javax.xml.trax.Result interfaces, which, at the current time, hold no
  -		methods, though this may change over time.</p> 
  -	 <p>In order to define concrete, useable classes for the user, TrAX
  +	 <p> TrAX defines a top-level series of interfaces in
  +		{@link javax.xml.transform}. These interfaces have no dependencies on
  +		SAX or the DOM standard, and try to make as few assumptions as possible about
  +		the details of the source and result of a transform. It achieves this by
  +		defining {@link javax.xml.transform.Source} and
  +		{@link javax.xml.transform.Result} interfaces.</p> 
  +	 <p>In order to define concrete, usable 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, and
  -		javax.xml.trax.stream.</p> 
  +		interfaces are found in {@link javax.xml.transform.sax},
  +		{@link javax.xml.transform.dom}, and
  +		{@link javax.xml.transform.stream}.</p> 
  +	 <p>The following illustrates a very simple transformation from input URI
  +		to result stream.</p> 
  +	 <code>
  +<pre>    // Create a transform factory instance.
  +    TransformerFactory tfactory = TransformerFactory.newInstance();
  +    
  +    // Create a transformer for the stylesheet.
  +    Transformer transformer 
  +      = tfactory.newTransformer(new StreamSource(xslID));
  +    
  +    // Transform the source XML to System.out.
  +    transformer.transform( new StreamSource(sourceID),
  +                           new StreamResult(System.out));
  +</pre>
  +</code> 
   	  
   		<h3>Creating Objects</h3> 
  -		<p>TrAX allows a concrete TransformerFactory object to be created from
  -		  static functions implemented by the TransformerFactory abstract class. The
  -		  system property that controls which Factory implementation to create is named
  +		<p>TrAX allows a concrete
  +		  {@link javax.xml.transform.TransformerFactory} object to be created from
  +		  the static function
  +		  {@link javax.xml.transform.TransformerFactory#newInstance}. 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 three concrete representations of Source
  -		  and Result pairs: StreamSource and StreamResult, SAXSource and SAXResult, and
  -		  DOMSource and DOMResult.</p> 
  +		<p>TrAX defines two interface objects called
  +		  {@link javax.xml.transform.Source} and
  +		  {@link javax.xml.transform.Result}. In order to pass Source and Result
  +		  objects to the TrAX interfaces, concrete classes need to be used. TrAX defines
  +		  three concrete representations of source and result pairs:
  +		  {@link javax.xml.transform.stream.StreamSource} and
  +		  {@link javax.xml.transform.stream.StreamResult},
  +		  {@link javax.xml.transform.sax.SAXSource} and
  +		  {@link javax.xml.transform.sax.SAXResult}, and
  +		  {@link javax.xml.transform.dom.DOMSource} and
  +		  {@link javax.xml.transform.dom.DOMResult}.</p> 
   	  
   	  
  -		<h3>Qualified Name representation</h3> 
  -		<p>One of the facts of dealing with XML objects is having to deal
  -		  withNamespaces.
  -		  Qualified Names appear in XML markup as prefixed names. But the prefixes
  -		  themselves do not hold identity, rather, it is the URIs that they contextually
  -		  map to that hold the identity. Therefore, when passing Qualified Names in among
  -		  Java programs, it is impossible to pass "xyz:foo" without have some sort of
  -		  object that maps "xyz" to a namespace. </p> 
  -		<p>One solution to this as been to create a QName object that holds
  +		<h3>
  +<a name="qname-delimiter">Qualified Name representation</a>
  +</h3> 
  +		<p>One of the facts of dealing with XML objects is having to deal with
  +		  <A href="http://www.w3.org/TR/REC-xml-names">Namespaces</A>. Qualified
  +		  Names appear in XML markup as prefixed names. But the prefixes themselves do
  +		  not hold identity, rather, it is the URIs that they contextually map to that
  +		  hold the identity. Therefore, when passing Qualified Names in among Java
  +		  programs, it is impossible to pass "xyz:foo" without have some sort of object
  +		  that maps "xyz" to a namespace. </p> 
  +		<p>One solution to this has been to create a "QName" object that holds
   		  the namespace URI, as well as the prefix and local name. But this is not a
   		  great solution when you want to use unique strings as keys in a dictionary
   		  object, for instance. Not having a string representation also makes it very
  @@ -349,16 +376,27 @@
   		  the prefix is lost.</p> 
   	  
   	  
  -		<h3>Serialization</h3> 
  -		<p>
  -</p> 
  +		<h3>Result Tree Serialization</h3> 
  +		<p>Serialization of the result tree to a stream can be controlled with
  +		  the {@link javax.xml.transform.Transformer#setOutputProperties} and the
  +		  {@link javax.xml.transform.Transformer#setOutputProperty} methods.
  +		  Strings that match the <A href="http://www.w3.org/TR/xslt#output">XSLT
  +		  specification for xsl:output attributes</A> can be referenced from the
  +		  {@link javax.xml.transform.OutputKeys} class. Other strings can be
  +		  specified as well, however, if the transformer does not recognize one, a
  +		  {@link java.lang.IllegalArgumentException} will be thrown,
  +		  if the key name is not <A href="#qname-delimiter">namespace qualified</A>. Output key names that are
  +		  qualified by a namespace will be silently ignored, or passed on to the
  +		  serializer mechanism.</p> 
   		<p>If all that is desired is the simple identity transformation of a
  -		  source to a result, then the TransformerFactory provides a newTransformer
  -		  method that does not have any arguments. The method will create a Transformer
  -		  that will simply perform a copy of the source to the result. The most common
  -		  uses of this will be to create a DOM from SAX events, or creates an XML or HTML
  -		  stream from DOM or SAX events. The following example illustrates the
  -		  serialization of a DOM node to an XML stream.</p> 
  +		  source to a result, then {@link javax.xml.transform.TransformerFactory}
  +		  provides a
  +		  {@link javax.xml.transform.TransformerFactory#newTransformer()} method
  +		  that does not have any arguments. The method will create a Transformer that
  +		  will simply perform a copy of the source to the result. The most common uses of
  +		  this will be to create a DOM from SAX events, or create an XML or HTML stream
  +		  from DOM or SAX events. The following example illustrates the serialization of
  +		  a DOM node to an XML stream.</p> 
   		<code>
   <pre>    TransformerFactory tfactory = TransformerFactory.newInstance();    
       Transformer serializer = tfactory.newTransformer();
  @@ -371,9 +409,121 @@
   </code> 
      
      
  -	 <h3>Resolution of URIs within a transformation</h3> 
  -	 <p>TBD</p> 
  +	 <h3>Exceptions and Error Reporting</h3> 
  +	 <p>The TrAX APIs throw three types of specialized exceptions. A
  +		{@link javax.xml.transform.TFactoryConfigurationError} is parallel to
  +		the {@link javax.xml.parsers.FactoryConfigurationError}, and is thrown
  +		when a problem with configuration with the Transformer Factories exists. This
  +		error will typically be thrown when the class of a transformation factory
  +		specified in the system properties cannot be found or instantiated.</p> 
  +	 <p>A
  +		{@link javax.xml.transform.TransformerConfigurationException} may be
  +		thrown if for any reason a Transformer can not be created. A
  +		TransformerConfigurationException may be thrown if there is a syntax error in
  +		the transformation instructions, when, for example,
  +		{@link javax.xml.transform.TransformerFactory#newTransformer} is
  +		called.</p> 
  +	 <p>{@link javax.xml.transform.TransformerException} is a general
  +		exception that occurs during the course of a transformation. A transformer
  +		exception may wrap another exception, and if any of the
  +		{@link javax.xml.transform.TransformerException#printStackTrace()}
  +		methods are called on it, it will produce a list of stack dumps, starting from
  +		the most recent. The transformer exception also provides a
  +		{@link javax.xml.transform.SourceLocator} object which indicates where
  +		in the source tree or transformation instructions the error
  +		occured.{@link javax.xml.transform.TransformerException#getMessageAndLocation()}
  +		may be called to get an error message with location info, and
  +		{@link javax.xml.transform.TransformerException#getLocationAsString()}
  +		may be called to get just the location string.</p> 
  +	 <p>Transformation warnings and errors are normally first sent to a
  +		{@link javax.xml.transform.ErrorListener}, at which point the
  +		implementor may decide to report the error or warning, and may decide to throw
  +		an exception for a non-fatal error. The error listener may be set via
  +		{@link javax.xml.transform.TransformerFactory#setErrorListener} for
  +		reporting errors that have to do with syntax errors in the transformation
  +		instructions, or via
  +		{@link javax.xml.transform.Transformer#setErrorListener} to report
  +		errors that occur during the transformation. The error listener on both objects
  +		should always be valid and non-null, whether set by the user or a default
  +		implementation provided by the processor.</p> 
      
  +   
  +	 <h3>Resolution of URIs within a transformation</h3> 
  +	 <p>TrAX provides a way for URLs that are referenced from within the
  +		stylesheet instructions or within the transformation to be reused, by creating
  +		a class that implements the {@link javax.xml.transform.URIResolver}
  +		interface, and using
  +		{@link javax.xml.transform.TransformerFactory#setURIResolver} and
  +		{@link javax.xml.transform.Transformer#setURIResolver} to set the URI
  +		resolution for the transformation instructions and the transformation. The URI
  +		resolver needs to implement only one method,
  +		{@link javax.xml.transform.URIResolver#resolve}. The TrAX implementation
  +		will pass into this method a string that represents the URL, found in the
  +		stylesheet instructions or built as part of the transformation process, as the
  +		first argument. The second argument will be the base URI in effect when the URL
  +		passed as the first argument was encountered. The
  +		{@link javax.xml.transform.Source} object must be usable by the
  +		transformer, according to it's implemented features.</p> 
  +	 <p>The following example illustrates the use of the URI resolver to
  +		resolve URIs to DOM nodes, in a transformation whose input is totally DOM
  +		based.</p> 
  +	 <code>
  +<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  +
  +    if (tfactory.getFeature(Features.DOM))
  +    {
  +      DocumentBuilderFactory dfactory =
  +                                       DocumentBuilderFactory.newInstance();
  +      dfactory.setNamespaceAware(true); // Always, required for XSLT
  +      DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
  +      
  +      // Set up to resolve URLs that correspond to our inc1.xsl, 
  +      // to a DOM node. Use an anonymous class for the URI resolver.
  +      final Node xslInc1 = docBuilder.parse("xsl/inc1/inc1.xsl");
  +      final Node xslInc2 = docBuilder.parse("xsl/inc1/inc2/inc2.xsl");
  +      tfactory.setURIResolver(new URIResolver() { 
  +        public Source resolve(String href, String base) 
  +        throws TransformerException
  +        {
  +        // ignore base because we're lazy, or we don't care.
  +        return (href.equals("inc1/inc1.xsl"))  
  +        ? new DOMSource(xslInc1) : 
  +          (href.equals("inc2/inc2.xsl")) 
  +          ? new DOMSource(xslInc2) : null;
  +        }});
  +
  +      // The TransformerFactory will call the anonymous URI 
  +      // resolver set above when it encounters 
  +      // &lt;xsl:include href="inc1/inc1.xsl"/&gt;
  +      Templates templates 
  +        = tfactory.newTemplates(new DOMSource(docBuilder.parse(xslID), xslID));
  +
  +      // Get a transformer from the templates.
  +      Transformer transformer = templates.newTransformer();
  +      
  +      // Set up to resolve URLs that correspond to our foo2.xml, to 
  +      // a DOM node.  Use an anonymous class for the URI resolver.
  +      // Be sure to return the same DOM tree every time for the 
  +      // given URI.
  +      final Node xmlSubdir1Foo2Node = docBuilder.parse("xml/subdir1/foo2.xml");
  +      transformer.setURIResolver(new URIResolver() { 
  +        public Source resolve(String href, String base) 
  +        throws TransformerException
  +        {
  +        // ignore base because we're lazy, or we don't care.
  +        return (href.equals("subdir1/foo2.xml"))  
  +        ? new DOMSource(xmlSubdir1Foo2Node) : null;
  +        }});
  +
  +      // Now the transformer will call our anonymous URI resolver 
  +      // when it encounters the document('subdir1/foo2.xml') invocation.
  +      transformer.transform(new DOMSource(docBuilder.parse(sourceID), sourceID), 
  +                            new StreamResult(System.out));
  +    }
  +</pre>
  +</code>
  + 
  +
   
   </body>
   </html>
  
  
  
  1.1                  xml-xalan/java/src/javax/xml/transform/ErrorListener.java
  
  Index: ErrorListener.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.transform;
  
  /**
   * <p>If a client of a transformation needs to implement customized error
   * handling, it must implement this interface and then register an
   * instance with the Transformer using the setErrorListener
   * method.  The Transformer will then report all errors and warnings
   * through this interface.</p>
   *
   * <p>If an application does <em>not</em>
   * register an ErrorListener, errors will be reported to System.err.</p>
   *
   * <p>For transformation errors, a transformer must use this interface 
   * instead of throwing an exception: it is up to the application 
   * to decide whether to throw an exception for different types of 
   * errors and warnings.  Note, however, that there is no requirement that 
   * the transformer continue with the transformation after a call to 
   * fatalError.</p>
   * 
   * <p>Transformers may use this mechanism to report XML parsing errors 
   * as well as transformation errors</p>
   */
  public interface ErrorListener 
  {
    
    /**
     * Receive notification of a warning.
     *
     * <p>Transformers will use this method to report conditions that
     * are not errors or fatal errors.  The default behaviour is to 
     * take no action.</p>
     *
     * <p>The Transformer must continue to with the transformation
     * after invoking this method: it should still be possible for the
     * application to process the document through to the end.</p>
     *
     * @param exception The warning information encapsulated in a
     *                  transformer exception.
     * 
     * @throws javax.xml.transform.TransformerException if the application
     * chooses to discontinue the transformation.
     * 
     * @see javax.xml.transform.TransformerException 
     */
    public abstract void warning (TransformerException exception)
      throws TransformerException;
    
    
    /**
     * Receive notification of a recoverable error.
     *
     * <p>The transformer must continue to provide normal parsing events
     * after invoking this method: it should still be possible for the
     * application to process the document through to the end.</p>
     *
     * @param exception The error information encapsulated in a
     *                  transformer exception.
     * 
     * @throws javax.xml.transform.TransformerException if the application
     * chooses to discontinue the transformation.
     * 
     * @see javax.xml.transform.TransformerException 
     */
    public abstract void error (TransformerException exception)
      throws TransformerException;
    
    
    /**
     * Receive notification of a non-recoverable error.
     *
     * <p>The application must assume that the transformation can 
     * not continue after the transformer has invoked this method, 
     * and should continue (if at all) only for the sake of collecting 
     * addition error messages: in fact, transformers are free 
     * to stop reporting any other events once this method has 
     * been invoked.</p>
     *
     * @param exception The error information encapsulated in a
     *                  transformer exception.
     * 
     * @throws javax.xml.transform.TransformerException if the application
     * chooses to discontinue the transformation.
     * 
     * @see javax.xml.transform.TransformerException 
     */
    public abstract void fatalError (TransformerException exception)
      throws TransformerException;
    
  }
  
  
  
  1.1                  xml-xalan/java/src/javax/xml/transform/OutputKeys.java
  
  Index: OutputKeys.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.transform;
  
  /**
   * Class OutputKeys provides string constants that can be used to set
   * output properties on the Transformer class, or to retrieve
   * 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>
   */
  public class OutputKeys
  {
    /**
     * method = "xml" | "html" | "text" | <var>qname-but-not-ncname</var>.
     *
     * <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>
     */
    public static final String METHOD = "method";
  
    /**
     * version = <var>nmtoken</var>.
     *
     * <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> 
     */
    public static final String VERSION = "version";
  
    /**
     * encoding = <var>string</var>.
     *
     * <p><code>encoding</code> specifies the preferred character
     * encoding that the XSLT processor should use to encode sequences of
     * characters as sequences of bytes; the value of the attribute should be
     * treated case-insensitively; the value must contain only characters in
     * the range #x21 to #x7E (i.e. printable ASCII characters); the value
     * should either be a <code>charset</code> registered with the Internet
     * Assigned Numbers Authority <a href="#IANA">[IANA]</a>,
     * <a href="#RFC2278">[RFC2278]</a> or start with <code>X-</code>.</p>
     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
     * XSL Transformations (XSLT) W3C Recommendation</a>
     */
    public static final String ENCODING = "encoding";
  
    /**
     * omit-xml-declaration = "yes" | "no".
     *
     * <p><code>omit-xml-declaration</code> specifies whether the XSLT
     * processor should output an XML declaration; the value must be
     * <code>yes</code> or <code>no</code>.</p>
     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
     * XSL Transformations (XSLT) W3C Recommendation</a>
     */
    public static final String OMIT_XML_DECLARATION = "omit-xml-declaration";
  
    /**
     * standalone = "yes" | "no".
     *
     * <p><code>standalone</code> specifies whether the XSLT processor
     * should output a standalone document declaration; the value must be
     * <code>yes</code> or <code>no</code>.</p>
     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
     * XSL Transformations (XSLT) W3C Recommendation</a>
     */
    public static final String STANDALONE = "standalone";
  
    /**
     * doctype-public = <var>string</var>.
     *
     * <p><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>
     */
    public static final String DOCTYPE_PUBLIC = "doctype-public";
  
    /**
     * doctype-system = <var>string</var>.
     *
     * <p><code>doctype-system</code> specifies the system identifier
     * to be used in the document type declaration.</p>
     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
     * XSL Transformations (XSLT) W3C Recommendation</a>
     */
    public static final String DOCTYPE_SYSTEM = "doctype-system";
  
    /**
     * cdata-section-elements = <var>qnames</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>
     * 
     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
     * XSL Transformations (XSLT) W3C Recommendation.</a>
     */
    public static final String CDATA_SECTION_ELEMENTS =
      "cdata-section-elements";
  
    /**
     * indent = "yes" | "no".
     *
     * <p><code>indent</code> specifies whether the XSLT processor may
     * add additional whitespace when outputting the result tree; the value
     * must be <code>yes</code> or <code>no</code>.  </p>
     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
     * XSL Transformations (XSLT) W3C Recommendation</a>
     */
    public static final String INDENT = "indent";
  
    /**
     * media-type = <var>string</var>.
     *
     * <p><code>media-type</code> specifies the media type (MIME
     * content type) of the data that results from outputting the result
     * tree; the <code>charset</code> parameter should not be specified
     * explicitly; instead, when the top-level media type is
     * <code>text</code>, a <code>charset</code> parameter should be added
     * according to the character encoding actually used by the output
     * method.  </p>
     * @see <a href="http://www.w3.org/TR/xslt#output">section 16 of the
     * XSL Transformations (XSLT) W3C Recommendation</a>
     */
    public static final String MEDIA_TYPE = "media-type";
  }
  
  
  
  1.3       +1 -4      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMLocator.java	2000/11/07 17:25:23	1.2
  +++ DOMLocator.java	2000/11/13 16:26:32	1.3
  @@ -63,14 +63,11 @@
   /**
    * 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 reporting.  In order to use this, the receiver 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>
    */
   public interface DOMLocator extends SourceLocator
   {
  
  
  
  1.3       +50 -10    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMResult.java	2000/11/07 17:25:24	1.2
  +++ DOMResult.java	2000/11/13 16:26:32	1.3
  @@ -69,20 +69,17 @@
    * 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 
  + * for the result of the transformation, which may be retrieved 
    * 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.  If this constructor 
  -   * is used, and setNode is not called, the transformer will 
  -   * create a Document node for the result.
  +   * Zero-argument default constructor.  If this constructor is used, and 
  +   * no output DOM source is set, then the transformer will 
  +   * create an output {@link org.w3c.dom.Document} using 
  +   * {@link javax.xml.parsers.DocumentBuilder#newDocument}.
      */
     public DOMResult(){}
   
  @@ -91,12 +88,25 @@
      *
      * @param n The DOM node that will contain the result tree.
      */
  -  public DOMResult(Node n)
  +  public DOMResult(Node node)
     {
  -    setNode(n);
  +    setNode(node);
     }
   
     /**
  +   * Create a new output target with a DOM node.
  +   *
  +   * @param node The DOM node that will contain the result tree.
  +   * @param systemID The system identifier which may be used in association 
  +   * with this node.
  +   */
  +  public DOMResult(Node node, String systemID)
  +  {
  +    setNode(node);
  +    setSystemId(systemID);
  +  }
  +
  +  /**
      * Set the node that will contain the result DOM tree.
      *
      * @param node The node to which the transformation 
  @@ -120,7 +130,30 @@
     {
       return node;
     }
  +  
  +  /**
  +   * Method setSystemId Set the systemID that may be used in association
  +   * with the node.
  +   *
  +   * @param systemId The system identifier as a URL string.
  +   */
  +  public void setSystemId(String systemId)
  +  {
  +    this.systemId = systemId;
  +  }
   
  +  /**
  +   * Get the system identifier that was set with setSystemId.
  +   *
  +   * @return The system identifier that was set with setSystemId, or null
  +   * if setSystemId was not called.
  +   */
  +  public String getSystemId()
  +  {
  +    return systemId;
  +  }
  +
  +
     //////////////////////////////////////////////////////////////////////
     // Internal state.
     //////////////////////////////////////////////////////////////////////
  @@ -129,4 +162,11 @@
      * The node to which the transformation will be appended.
      */
     private Node node;
  +  
  +  /**
  +   * The systemID that may be used in association
  +   * with the node.
  +   */
  +  private String systemId;
  +
   }
  
  
  
  1.3       +22 -6     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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMSource.java	2000/11/07 17:25:24	1.2
  +++ DOMSource.java	2000/11/13 16:26:32	1.3
  @@ -69,20 +69,23 @@
    * 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
   {
   
     /**
  -   * Zero-argument default constructor.
  +   * Zero-argument default constructor.  If this is used, and 
  +   * no output DOM source is set, then the transformer will 
  +   * create an empty source Document using 
  +   * {@link javax.xml.parsers.DocumentBuilder#newDocument}.
  +   * The created node may be retrieved once the transformation 
  +   * is complete, via the getNode method.
      */
     public DOMSource(){}
   
     /**
  -   * Create a new output target with a DOM node.
  +   * Create a new input source with a DOM node.
      *
      * @param n The DOM node that will contain the Source tree.
      */
  @@ -92,6 +95,19 @@
     }
   
     /**
  +   * Create a new input source with a DOM node, and with the 
  +   * system ID also passed in as the base URI.
  +   *
  +   * @param node The DOM node that will contain the Source tree.
  +   * @param systemID Specifies the base URI associated with node.
  +   */
  +  public DOMSource(Node node, String systemID)
  +  {
  +    setNode(node);
  +    setSystemId(systemID);
  +  }
  +
  +  /**
      * Set the node that will represents a Source DOM tree.
      *
      * @param node The node that is to be transformed.
  @@ -117,7 +133,7 @@
      * 
      * @param baseID Base URL for this DOM tree.
      */
  -  public void setBaseID(String baseID)
  +  public void setSystemId(String baseID)
     {
       this.baseID = baseID;
     }
  @@ -128,7 +144,7 @@
      * 
      * @return Base URL for this DOM tree.
      */
  -  public String getBaseID()
  +  public String getSystemId()
     {
       return this.baseID;
     }
  
  
  
  1.2       +73 -5     xml-xalan/java/src/javax/xml/transform/dom/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/dom/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	2000/11/07 17:25:25	1.1
  +++ package.html	2000/11/13 16:26:32	1.2
  @@ -1,6 +1,74 @@
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
   <html>
  -  <title>javax.xml.transform.dom Package</title>
  -  <body>
  -    <p>DOM specific TrAX APIs.<p>
  - </body>
  -</html>
  \ No newline at end of file
  +<head>
  +<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  +<title>javax.xml.transform.dom</title>
  +</head>
  +<body>
  +<p>This package implements DOM specific transformation APIs.</p>
  +<p>The {@link javax.xml.transform.dom.DOMSource} class allows the
  +client of the TrAX implementation to specify a
  +DOM{@link org.w3c.dom.Node} as the source of the input tree. The model
  +of how the transformer deals with the DOM tree in terms of mismatches with
  +the<A href="http://www.w3.org/TR/xslt#data-model">XSLT data model</A> or
  +other data models is beyond the scope of this API specification. Any of the
  +nodes derived from {@link org.w3c.dom.Node} are legal input.</p>
  +<p>The {@link javax.xml.transform.dom.DOMResult} class allows
  +a{@link org.w3c.dom.Node} to be specified to which result DOM nodes will
  +be appended, or, if an output node is not specified, the transformer will
  +create an output {@link org.w3c.dom.Document} node
  +using{@link javax.xml.parsers.DocumentBuilder#newDocument}. If a node is
  +specified, it should be one of
  +{@link org.w3c.dom.Document},{@link org.w3c.dom.Element},
  +or{@link org.w3c.dom.DocumentFragment}. Specification of any other type
  +of nodes is implementation dependent and undefined by this API. If the result
  +is a{@link org.w3c.dom.Document}, the output of the transformation must
  +have a single element root to set as the document element.</p>
  +<p>The {@link javax.xml.transform.dom.DOMLocator} node may be passed
  +to {@link javax.xml.transform.TransformerException} objects, and
  +retrieved by trying to cast the result of
  +the{@link javax.xml.transform.TransformerException#getLocator()} method.
  +The implementation has no responsibility to use a DOMLocator instead of
  +a{@link javax.xml.transform.SourceLocator} (though line numbers and the
  +like doesn't make much sense for a DOM), so the result of getLocator must
  +always be tested with an instanceof. </p>
  +<p>The following example performs a transformation using DOM nodes as input
  +for the transformer factory, as input for the transformer, and as the output of
  +the transformation.</p>
  +<code>
  +<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  +
  +    // Make sure the TransformerFactory supports the DOM feature.
  +    if (tfactory.getFeature(Features.DOM))
  +    {
  +      // Use javax.xml.parsers to create our DOMs.
  +      DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
  +      dfactory.setNamespaceAware(true); // do this always for XSLT
  +      DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
  +      
  +      // Create the Templates from a DOM.
  +      Node xslDOM = docBuilder.parse(xslID);
  +      DOMSource dsource = new DOMSource(xslDOM, xslID);
  +      Templates templates = tfactory.newTemplates(dsource);
  +
  +      // Create the source tree in the form of a DOM.
  +      Node sourceNode = docBuilder.parse(sourceID);
  +      
  +      // Create a DOMResult that the transformation will fill in.
  +      DOMResult dresult = new DOMResult();
  +      
  +      // And transform from the source DOM tree to a result DOM tree.
  +      Transformer transformer = templates.newTransformer();
  +      transformer.transform(new DOMSource(sourceNode, sourceID), dresult);
  +      
  +      // The root of the result tree may now be obtained from 
  +      // the DOMResult object.
  +      Node out = dresult.getNode();
  +      
  +      // Serialize it to System.out for diagnostics.
  +      Transformer serializer = tfactory.newTransformer();
  +      serializer.transform(new DOMSource(out), new StreamResult(System.out));
  +    }</pre>
  +</code>
  +</body>
  +</html>
  
  
  
  1.4       +29 -3     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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SAXResult.java	2000/11/07 17:25:32	1.3
  +++ SAXResult.java	2000/11/13 16:26:32	1.4
  @@ -69,9 +69,6 @@
   
   /**
    * Acts as an holder for a transformation result tree.
  - *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public class SAXResult implements Result
   {
  @@ -135,7 +132,30 @@
     {
       return lexhandler;
     }
  +  
  +  /**
  +   * Method setSystemId Set the systemID that may be used in association
  +   * with the ContentHandler.
  +   *
  +   * @param systemId The system identifier as a URL string.
  +   */
  +  public void setSystemId(String systemId)
  +  {
  +    this.systemId = systemId;
  +  }
  +
  +  /**
  +   * Get the system identifier that was set with setSystemId.
  +   *
  +   * @return The system identifier that was set with setSystemId, or null
  +   * if setSystemId was not called.
  +   */
  +  public String getSystemId()
  +  {
  +    return systemId;
  +  }
   
  +
     //////////////////////////////////////////////////////////////////////
     // Internal state.
     //////////////////////////////////////////////////////////////////////
  @@ -149,4 +169,10 @@
      * The handler for lexical events.
      */
     private LexicalHandler lexhandler;
  +  
  +  /**
  +   * The systemID that may be used in association
  +   * with the node.
  +   */
  +  private String systemId;
   }
  
  
  
  1.3       +27 -6     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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SAXSource.java	2000/11/07 17:25:33	1.2
  +++ SAXSource.java	2000/11/13 16:26:32	1.3
  @@ -71,15 +71,14 @@
   
   /**
    * Acts as an holder for SAX-style Source tree input.
  - *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
    */
   public class SAXSource implements Source
   {
   
     /**
  -   * Zero-argument default constructor.
  +   * Zero-argument default constructor.  If this constructor 
  +   * is used, and no other method is called, the transformer 
  +   * will assume an empty input tree, with a default root node.
      */
     public SAXSource(){}
   
  @@ -142,7 +141,7 @@
      */
     public void setInputSource(InputSource inputSource)
     {
  -    this.inputSource = inputSource;
  +    inputSource = inputSource;
     }
     
     /**
  @@ -156,12 +155,34 @@
     }
     
     /**
  +   * Set the system identifier for this Source.
  +   *
  +   * <p>The system identifier is optional if there is a byte stream
  +   * or a character stream, but it is still useful to provide one,
  +   * since the application can use it to resolve relative URIs
  +   * and can include it in error messages and warnings (the parser
  +   * will attempt to open a connection to the URI only if
  +   * there is no byte stream or character stream specified).</p>
  +   *
  +   * @param systemId The system identifier as a URL string.
  +   */
  +  public void setSystemId(String systemId)
  +  {
  +    if(null == inputSource)
  +    {
  +      inputSource = new InputSource(systemId);
  +    }
  +    else
  +      inputSource.setSystemId(systemId);
  +  }
  +  
  +  /**
      * 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()
  +  public String getSystemId()
     {
       return (null != inputSource) ? inputSource.getSystemId() : null;
     }
  
  
  
  1.4       +14 -91    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SAXTransformerFactory.java	2000/11/07 17:25:34	1.3
  +++ SAXTransformerFactory.java	2000/11/13 16:26:32	1.4
  @@ -63,15 +63,19 @@
   import org.xml.sax.SAXNotSupportedException;
   import org.xml.sax.SAXNotRecognizedException;
   import org.xml.sax.XMLReader;
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.EntityResolver;
   import org.xml.sax.XMLFilter;
   
   /**
  - * Interface SAXTransformerFactory
  - *
  - * @version Alpha
  - * @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
  + * This class extends TransformerFactory to provide SAX specific 
  + * factory methods.  It provides two types of ContentHandlers, 
  + * one for creating Transformers, the other for creating Templates 
  + * objects.
  + * 
  + * <p>If applications need to set the ErrorHandler or EntityResolver 
  + * for XMLReaders created during the course of a transform, it can 
  + * do so by setting a URIResolver that returns  SAXSource that holds 
  + * an application created XMLReader, which the user can customize 
  + * by setting an error handler and entity resolver.</p>
    */
   public abstract class SAXTransformerFactory extends TransformerFactory
   {
  @@ -83,9 +87,10 @@
      *
      * @param src 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(Source src)
       throws TransformerConfigurationException;
  @@ -122,13 +127,11 @@
      * Get a TemplatesHandler object that can process SAX
      * ContentHandler events into a Templates object.
      *
  -   * @param src The source of the transformation instructions.
  -   *
      * @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.
  +   * TemplatesHandler can not be created.
      */
     public abstract TemplatesHandler newTemplatesHandler()
       throws TransformerConfigurationException;
  @@ -142,84 +145,4 @@
      * @return An XMLFilter object, or null if this feature is not supported.
      */
     public abstract XMLFilter newXMLFilter(Source src);
  -  
  -  /** The error handler used to report parse or transformation errors. */
  -  private ErrorHandler errorHandler;
  -
  -  /**
  -   * Allow an application to register an error event handler.
  -   *
  -   * <p>If the application does not register an error handler, all
  -   * error events reported by the SAX parser will be silently
  -   * ignored; however, normal processing may not continue.  It is
  -   * highly recommended that all SAX applications implement an
  -   * error handler to avoid unexpected bugs.</p>
  -   *
  -   * <p>Applications may register a new or different handler in the
  -   * middle of a parse, and the SAX parser must begin using the new
  -   * handler immediately.</p>
  -   *
  -   * @param handler The error handler.
  -   * @exception java.lang.NullPointerException If the handler
  -   *            argument is null.
  -   * @see #getErrorHandler
  -   */
  -  public void setErrorHandler(ErrorHandler handler)
  -  {
  -
  -    if (handler == null)
  -    {
  -      throw new NullPointerException("Null error handler");
  -    }
  -
  -    errorHandler = handler;
  -  }
  -
  -  /**
  -   * Return the current error handler.
  -   *
  -   * @return The current error handler, or null if none
  -   *         has been registered.
  -   * @see #setErrorHandler
  -   */
  -  public ErrorHandler getErrorHandler()
  -  {
  -    return errorHandler;
  -  }
  -
  -  /** The entity resolver that will be passed to the reader.  */
  -  private EntityResolver entityResolver;
  -
  -  /**
  -   * Allow an application to register an entity resolver.
  -   *
  -   * <p>If the application does not register an entity resolver,
  -   * the XMLReader will perform its own default resolution.</p>
  -   *
  -   * <p>Applications may register a new or different resolver in the
  -   * middle of a parse, and the SAX parser must begin using the new
  -   * resolver immediately.</p>
  -   *
  -   * @param resolver The entity resolver.
  -   * @exception java.lang.NullPointerException If the resolver
  -   *            argument is null.
  -   * @see #getEntityResolver
  -   */
  -  public void setEntityResolver(EntityResolver resolver)
  -  {
  -    entityResolver = resolver;
  -  }
  -
  -  /**
  -   * Return the current entity resolver.
  -   *
  -   * @return The current entity resolver, or null if none
  -   *         has been registered.
  -   * @see #setEntityResolver
  -   */
  -  public EntityResolver getEntityResolver()
  -  {
  -    return entityResolver;
  -  }
  -
   }
  
  
  
  1.2       +2 -4      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TemplatesHandler.java	2000/11/03 23:22:13	1.1
  +++ TemplatesHandler.java	2000/11/13 16:26:32	1.2
  @@ -63,9 +63,7 @@
   
   /**
    * This is a SAX ContentHandler that may be used to process SAX
  - * events into an Templates objects.  This is an abstract class
  - * instead of an interface, so it can be a ContentHandler object,
  - * for passing into the JAXP SAXParser interface.
  + * parse events into an Templates objects.
    * 
    * <p>Note that TemplatesHandler doesn't need to implement LexicalHandler.</p>
    */
  @@ -91,5 +89,5 @@
      * resolve relative URLs in the stylesheet.
      * @param baseID Base URL for this stylesheet.
      */
  -  public void setBaseID(String baseID);
  +  public void setSystemID(String systemID);
   }
  
  
  
  1.2       +9 -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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TransformerHandler.java	2000/11/03 23:22:13	1.1
  +++ TransformerHandler.java	2000/11/13 16:26:32	1.2
  @@ -10,19 +10,25 @@
   import org.xml.sax.ContentHandler;
   import org.xml.sax.ext.LexicalHandler;
   
  +/**
  + * The SAXTransformerFactory provides a reference to an 
  + * object, which implements this interface, and which can 
  + * listen to SAX ContentHandler parse events, and transform 
  + * them to a Result.
  + */
   public interface TransformerHandler 
     extends ContentHandler, LexicalHandler
  -{
  +{  
     /**
      * Method setResult allows the user of the TransformerHandler
      * to set the result of the transform.
      *
      * @param result A Result instance, should not be null.
      * 
  -   * @throws TransformerException if result is invalid for some reason.
  +   * @throws IllegalArgumentException if result is invalid for some reason.
      */
     public void setResult(Result result)
  -    throws TransformerException;
  +    throws IllegalArgumentException;
       
     /**
      * Set the base ID (URL or system ID) from where relative 
  
  
  
  1.2       +212 -5    xml-xalan/java/src/javax/xml/transform/sax/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	2000/11/07 17:25:35	1.1
  +++ package.html	2000/11/13 16:26:32	1.2
  @@ -1,6 +1,213 @@
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
   <html>
  -  <title>javax.xml.transform.sax Package</title>
  -  <body>
  -    <p>SAX2 specific TrAX APIs.<p>
  - </body>
  -</html>
  \ No newline at end of file
  +<head>
  +<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  +<title>javax.xml.transform.sax</title>
  +</head>
  +<body>
  +<p>This package implements SAX2 specific transformation APIs. It provides
  +	 classes which allow the transformation from
  +	 {@link org.xml.sax.ContentHandler} events, and also classes that produce
  +	 {@link org.xml.sax.ContentHandler} events. It also provides methods to
  +	 set the input source as an {@link org.xml.sax.XMLReader}, or to use a
  +	 {@link org.xml.sax.InputSource} as the source. It also allows the
  +	 creation of a {@link org.xml.sax.XMLFilter}, which allows
  +	 transformations to "pull" from other transformations, and allows the
  +	 transformer to be used polymorphically as an
  +	 {@link org.xml.sax.XMLReader}.</p>
  +<p>The {@link javax.xml.transform.sax.SAXSource} class allows the
  +	 setting of a {@link org.xml.sax.XMLReader} to be used for "pulling"
  +	 parse events, and a {@link org.xml.sax.InputSource} that may be used to
  +	 specify the SAX source.</p>
  +<p>The {@link javax.xml.transform.sax.SAXResult} class allows the
  +	 setting of a {@link org.xml.sax.ContentHandler} to be the receiver of
  +	 SAX2 events from the transformation. The following code fragment illustrates
  +	 both the use of the source and result objects.</p>
  +<code>
  +<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  +
  +    // Does this factory support SAX features?
  +    if (tfactory.getFeature(Features.SAX))
  +    {      
  +      // Get a transformer.
  +      Transformer transformer 
  +        = tfactory.newTransformer(new StreamSource(xslID));
  +      
  +      // Create an reader for reading.
  +      XMLReader reader = XMLReaderFactory.createXMLReader();
  +
  +      transformer.transform(new SAXSource(reader, new InputSource(sourceID)),
  +                            new SAXResult(new ExampleContentHandler()));
  +    }
  +</pre>
  +</code>
  +<p>The {@link javax.xml.transform.sax.SAXTransformerFactory}
  +	 extends {@link javax.xml.transform.TransformerFactory} to provide
  +	 factory methods for creating
  +	 {@link javax.xml.transform.sax.TemplatesHandler},
  +	 {@link javax.xml.transform.sax.TransformerHandler}, and
  +	 {@link org.xml.sax.XMLReader} instances.</p>
  +<p>To obtain a
  +	 {@link javax.xml.transform.sax.SAXTransformerFactory}, the caller must
  +	 cast the {@link javax.xml.transform.TransformerFactory} instance
  +	 returned from
  +	 {@link javax.xml.transform.TransformerFactory#newInstance}. For
  +	 example:</p>
  +<code>
  +<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  +
  +    // Does this factory support SAX features?
  +    if (tfactory.getFeature(Features.SAX))
  +    {
  +      // If so, we can safely cast.
  +      SAXTransformerFactory stfactory = ((SAXTransformerFactory) tfactory);
  +      
  +      // A TransformerHandler is a ContentHandler that will listen for 
  +      // SAX events, and transform them to the result.
  +      TransformerHandler handler 
  +        = stfactory.newTransformerHandler(new StreamSource(xslID));
  +      // ...
  +    }
  +</pre>
  +</code>
  +<p>The {@link javax.xml.transform.sax.TransformerHandler} interface
  +	 allows a transformation to be created from SAX2 parse events, which is a "push"
  +	 model rather than the "pull" model that normally occurs for a transformation.
  +	 Normal parse events are received through the
  +	 {@link org.xml.sax.ContentHandler} interface, lexical events such as
  +	 startCDATA and endCDATA are received through the
  +	 {@link org.xml.sax.ext.LexicalHandler} interface, and events that signal
  +	 the start of end of disabling output escaping are received via
  +	 {@link org.xml.sax.ContentHandler#processingInstruction}, with the
  +	 target parameter being
  +	 {@link javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING} and
  +	 {@link javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING}. If
  +	 parameters, output properties, or other features need to be set on the
  +	 transformer handler, a {@link javax.xml.transform.Transformer} reference
  +	 will need to be obtained from
  +	 {@link javax.xml.transform.sax.TransformerHandler#getTransformer}, and
  +	 the methods invoked from that reference. The following illustrates the feeding
  +	 of SAX events from an {@link org.xml.sax.XMLReader} to a
  +	 transformer.</p>
  +<code>
  +<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  +
  +    // Does this factory support SAX features?
  +    if (tfactory.getFeature(Features.SAX))
  +    {
  +      // If so, we can safely cast.
  +      SAXTransformerFactory stfactory = ((SAXTransformerFactory) tfactory);
  +      
  +      // A TransformerHandler is a ContentHandler that will listen for 
  +      // SAX events, and transform them to the result.
  +      TransformerHandler handler 
  +        = stfactory.newTransformerHandler(new StreamSource(xslID));
  +
  +      // Set the result handling to be a serialization to System.out.
  +      handler.setResult(new StreamResult(System.out));
  +      
  +      handler.getTransformer().setParameter("a-param",
  +                                            "hello to you!");
  +      
  +      // Create a reader, and set it's content handler to be the TransformerHandler.
  +      XMLReader reader = XMLReaderFactory.createXMLReader();
  +      reader.setContentHandler(handler);
  +      
  +      // It's a good idea for the parser to send lexical events.
  +      // The TransformerHandler is also a LexicalHandler.
  +      reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
  +      
  +      // Parse the source XML, and send the parse events to the TransformerHandler.
  +      reader.parse(sourceID);
  +    }
  +</pre>
  +</code>
  +<p>The {@link javax.xml.transform.sax.TemplatesHandler} interface
  +	 allows the creation of {@link javax.xml.transform.Templates} objects
  +	 from SAX2 parse events. Once the {@link org.xml.sax.ContentHandler}
  +	 events are complete, the templates object may be obtained from
  +	 {@link javax.xml.transform.sax.TemplatesHandler#getTemplates}. Note that
  +	 {@link javax.xml.transform.sax.TemplatesHandler#setSystemID} should
  +	 normally be called in order to establish a base system ID from where relative
  +	 URLs may be resolved. The following code fragment illustrates the creation of a
  +	 templates object from SAX2 events sent from an XMLReader.</p>
  +<code>
  +<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  +
  +    // Does this factory support SAX features?
  +    if (tfactory.getFeature(Features.SAX))
  +    {
  +      // If so, we can safely cast.
  +      SAXTransformerFactory stfactory = ((SAXTransformerFactory) tfactory);
  +      
  +      // Have the factory create a special ContentHandler that will 
  +      // create a Templates object.
  +      TemplatesHandler handler = stfactory.newTemplatesHandler();
  +      
  +      // If you don't do this, the TemplatesHandler won't know how to 
  +      // resolve relative URLs.
  +      handler.setSystemID(xslID);
  +      
  +      // Create a reader, and set it's content handler to be the TemplatesHandler.
  +      XMLReader reader = XMLReaderFactory.createXMLReader();
  +      reader.setContentHandler(handler);
  +      
  +      // Parse the source XML, and send the parse events to the TemplatesHandler.
  +      reader.parse(xslID);
  +      
  +      // Get the Templates reference from the handler.
  +      Templates templates = handler.getTemplates();
  +      
  +      // Ready to transform.
  +      Transformer transformer = templates.newTransformer();
  +      transformer.transform(new StreamSource(sourceID), new StreamResult(System.out));
  +    }
  +</pre>
  +</code>
  +<p>The
  +	 {@link javax.xml.transform.sax.SAXTransformerFactory#newXMLFilter}
  +	 method allows the creation of a {@link org.xml.sax.XMLFilter}, which is
  +	 the SAX2 notion of a "pull" transformation. The following illustrates several
  +	 transformations chained together. Each filter points to a parent
  +	 {@link org.xml.sax.XMLReader}, and the final transformation is caused by
  +	 invoking {@link org.xml.sax.XMLReader#parse} on the final reader in the
  +	 chain.</p>
  +<code>
  +<pre>    TransformerFactory tfactory = TransformerFactory.newInstance();
  +    
  +    // Does this factory support SAX features?
  +    if (tfactory.getFeature(Features.SAX))
  +    {
  +      Templates stylesheet1 = tfactory.newTemplates(new StreamSource(xslID_1));
  +      Transformer transformer1 = stylesheet1.newTransformer();
  +      
  +      SAXTransformerFactory stf = (SAXTransformerFactory)tfactory;
  +      XMLReader reader = XMLReaderFactory.createXMLReader();
  +
  +      XMLFilter filter1 = stf.newXMLFilter(new StreamSource(xslID_1));
  +      XMLFilter filter2 = stf.newXMLFilter(new StreamSource(xslID_2));
  +      XMLFilter filter3 = stf.newXMLFilter(new StreamSource(xslID_3));
  +
  +      // transformer1 will use a SAX parser as it's reader.    
  +      filter1.setParent(reader);
  +
  +      // transformer2 will use transformer1 as it's reader.
  +      filter2.setParent(filter1);
  +
  +      // transform3 will use transform2 as it's reader.
  +      filter3.setParent(filter2);
  +
  +      filter3.setContentHandler(new ExampleContentHandler());
  +      // filter3.setContentHandler(new org.xml.sax.helpers.DefaultHandler());
  +
  +      // Now, when you call transformer3 to parse, it will set  
  +      // itself as the ContentHandler for transform2, and 
  +      // call transform2.parse, which will set itself as the 
  +      // content handler for transform1, and call transform1.parse, 
  +      // which will set itself as the content listener for the 
  +      // SAX parser, and call parser.parse(new InputSource("xml/foo.xml")).
  +      filter3.parse(new InputSource(sourceID));
  +    }</pre>
  +</code>
  +</body>
  +</html>
  
  
  
  1.3       +0 -4      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StreamResult.java	2000/11/07 17:25:39	1.2
  +++ StreamResult.java	2000/11/13 16:26:32	1.3
  @@ -63,10 +63,6 @@
   import java.io.OutputStream;
   import java.io.Writer;
   
  -import org.xml.sax.ContentHandler;
  -import org.xml.sax.ext.DeclHandler;
  -import org.xml.sax.ext.LexicalHandler;
  -
   /**
    * Acts as an holder for a transformation result, 
    * which may be XML, plain Text, HTML, or some other form of markup.
  
  
  
  1.3       +21 -15    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StreamSource.java	2000/11/07 17:25:40	1.2
  +++ StreamSource.java	2000/11/13 16:26:33	1.3
  @@ -72,7 +72,9 @@
   {
   
     /**
  -   * Zero-argument default constructor.
  +   * Zero-argument default constructor. If this constructor 
  +   * is used, and no other method is called, the transformer 
  +   * will assume an empty input tree, with a default root node.
      */
     public StreamSource(){}
   
  @@ -127,7 +129,25 @@
     {
       setCharacterStream(characterStream);
     }
  +  
  +  /**
  +   * 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 A valid Reader reference to an XML character stream.
  +   * @param systemId Must be a string that conforms to the URL syntax.
  +   */
  +  public StreamSource(Reader characterStream, String systemId)
  +  {
  +    setCharacterStream(characterStream);
  +    setSystemId(systemId);
  +  }
   
  +
     /**
      * Construct a StreamSource from a URL.
      *
  @@ -245,20 +265,6 @@
       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.
     //////////////////////////////////////////////////////////////////////
  
  
  
  1.2       +52 -5     xml-xalan/java/src/javax/xml/transform/stream/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/stream/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	2000/11/07 17:25:41	1.1
  +++ package.html	2000/11/13 16:26:34	1.2
  @@ -1,6 +1,53 @@
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
   <html>
  -  <title>javax.xml.transform.stream</title>
  -  <body>
  -    <p>Stream and URL specific TrAX APIs.<p>
  - </body>
  -</html>
  \ No newline at end of file
  +<head>
  +<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  +<title>javax.xml.transform.stream</title>
  +</head>
  +<body>
  +<p>This package implements stream and URL specific transformation APIs.
  +		</p>
  +<p>The {@link javax.xml.transform.stream.StreamSource} class
  +		provides methods for specifying {@link java.io.InputStream} input,
  +		{@link java.io.Reader} input, and URL input in the form of strings. Even
  +		if an input stream or reader is specified as the source,
  +		{@link javax.xml.transform.stream.StreamSource#setSystemId} should still
  +		be called, so that the transformer can know from where it should resolve
  +		relative URIs. The public identifier is always optional: if the application
  +		writer includes one, it will be provided as part of the
  +		{@link javax.xml.transform.SourceLocator} information.</p>
  +<p>The {@link javax.xml.transform.stream.StreamResult} class
  +		provides methods for specifying {@link java.io.OutputStream},
  +		{@link java.io.Writer}, or an output system ID, as the output of the
  +		transformation result.</p>
  +<p>In both the stream and result, normally streams should be used rather
  +		than readers or writers, since readers and writers already have the encoding
  +		establish to and from the internal Unicode format. However, there are times
  +		when it is useful to write to a character stream, such as when using a
  +		StringWriter in order to write to a String, or in the case of reading source
  +		XML from a StringReader.</p>
  +<p>The following code fragment illustrates the use of the stream source
  +		and result objects.</p>
  +<code>
  +<pre>    // Create a transform factory instance.
  +    TransformerFactory tfactory = TransformerFactory.newInstance();
  +
  +    InputStream xslIS = new BufferedInputStream(new FileInputStream(xslID));
  +    StreamSource xslSource = new StreamSource(xslIS);
  +    // Note that if we don't do this, relative URLs can not be resolved correctly!
  +    xslSource.setSystemId(xslID);
  +
  +    // Create a transformer for the stylesheet.
  +    Transformer transformer = tfactory.newTransformer(xslSource);
  +    
  +    InputStream xmlIS = new BufferedInputStream(new FileInputStream(sourceID));
  +    StreamSource xmlSource = new StreamSource(xmlIS);
  +    // Note that if we don't do this, relative URLs can not be resolved correctly!
  +    xmlSource.setSystemId(sourceID);
  +    
  +    // Transform the source XML to System.out.
  +    transformer.transform( xmlSource, new StreamResult(System.out));
  +</pre>
  +</code>
  +</body>
  +</html>
  
  
  
  1.8       +28 -26    xml-xalan/java/src/org/apache/xalan/client/XSLTProcessorApplet.java
  
  Index: XSLTProcessorApplet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/client/XSLTProcessorApplet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSLTProcessorApplet.java	2000/11/03 23:28:01	1.7
  +++ XSLTProcessorApplet.java	2000/11/13 16:26:35	1.8
  @@ -95,7 +95,7 @@
   // Needed SAX classes
   import org.xml.sax.InputSource;
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.XMLReader;
   import org.xml.sax.helpers.ParserAdapter;
   import org.xml.sax.helpers.XMLReaderFactory;
  @@ -105,9 +105,9 @@
   import org.w3c.dom.Document;
   
   // Needed Serializer classes
  -import org.apache.serialize.OutputFormat;
  -import org.apache.serialize.Serializer;
  -import org.apache.serialize.SerializerFactory;
  +import org.apache.xalan.serialize.OutputFormat;
  +import org.apache.xalan.serialize.Serializer;
  +import org.apache.xalan.serialize.SerializerFactory;
   
   /**
    * <meta name="usage" content="general"/>
  @@ -357,24 +357,20 @@
      * applet cannot use because it reads a system property.
      *
      * @throws IOException
  -   * @throws SAXException
      * @throws TransformerException
  +   * @throws TransformerException
      */
     void transform(TransformerImpl transformer, InputSource xmlSource)
  -          throws SAXException, TransformerException, IOException
  +          throws TransformerException, TransformerException, IOException
     {
   
       try
       {
         m_reader.setFeature("http://xml.org/sax/features/namespace-prefixes",
                             true);
  -    }
  -    catch (SAXException se)
  -    {
  -
  -      // What can we do?
  -      // TODO: User diagnostics.
       }
  +    catch (org.xml.sax.SAXNotSupportedException snse) {}
  +    catch (org.xml.sax.SAXNotRecognizedException snre) {}
   
       try
       {
  @@ -384,8 +380,14 @@
         ContentHandler inputHandler = new SourceTreeHandler(transformer);
   
         m_reader.setContentHandler(inputHandler);
  -      m_reader.setProperty("http://xml.org/sax/properties/lexical-handler",
  -                           inputHandler);
  +      try
  +      {
  +        m_reader.setProperty("http://xml.org/sax/properties/lexical-handler",
  +                             inputHandler);
  +      }
  +      catch(org.xml.sax.SAXNotRecognizedException snre)
  +      {
  +      }
   
         // Set the reader for cloning purposes.
         transformer.getXPathContext().setPrimaryReader(m_reader);
  @@ -394,7 +396,7 @@
         // the startDocument event, it will call transformNode( node ).
         m_reader.parse(xmlSource);
       }
  -    catch (SAXException se)
  +    catch (org.xml.sax.SAXException se)
       {
         se.printStackTrace();
   
  @@ -477,11 +479,11 @@
           TransformerHandler serializer =
             m_tfactory.newTransformerHandler();
   
  -        // org.apache.serialize.Serializer serializer = new org.apache.xml.serialize.transition.HTMLSerializer();
  -        // org.apache.serialize.Serializer serializer = org.apache.serialize.SerializerFactory.getSerializer( "HTML" );
  +        // org.apache.xalan.serialize.Serializer serializer = new org.apache.xml.serialize.transition.HTMLSerializer();
  +        // org.apache.xalan.serialize.Serializer serializer = org.apache.xalan.serialize.SerializerFactory.getSerializer( "HTML" );
           serializer.setResult(new StreamResult(pw));
   
  -        // new org.apache.xml.org.apache.serialize.HTMLSerializer(pw, new OutputFormat()).asContentHandler();
  +        // new org.apache.xml.org.apache.xalan.serialize.HTMLSerializer(pw, new OutputFormat()).asContentHandler();
           transformer.setContentHandler(serializer);
           // transformer.setParent(m_reader);
           transform(transformer, new InputSource(xmlbuf));
  @@ -824,9 +826,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  private String doTransformation(TransformerFactory processor) throws SAXException
  +  private String doTransformation(TransformerFactory processor) throws TransformerException
     {
   
       URL documentURL = null;
  @@ -860,8 +862,8 @@
           transformer.setParameter(m_key, null, m_expression);
   
         // Result result = new Result(pw);
  -      // org.apache.serialize.Serializer serializer = new org.apache.xml.serialize.transition.HTMLSerializer(); this.showStatus("serializer is "+ serializer);
  -      //org.apache.serialize.Serializer serializer = org.apache.serialize.SerializerFactory.getSerializer( "HTML" );
  +      // org.apache.xalan.serialize.Serializer serializer = new org.apache.xml.serialize.transition.HTMLSerializer(); this.showStatus("serializer is "+ serializer);
  +      //org.apache.xalan.serialize.Serializer serializer = org.apache.xalan.serialize.SerializerFactory.getSerializer( "HTML" );
         TransformerHandler serializer =
           m_tfactory.newTransformerHandler();
         
  @@ -871,9 +873,9 @@
         // transformer.setParent(m_reader);
         transform(transformer, xmlSource);
       }
  -    catch (TransformerException tfe)
  +    catch (org.xml.sax.SAXException se)
       {
  -      tfe.printStackTrace();
  +      se.printStackTrace();
         System.exit(-1);
       }
       catch (TransformerConfigurationException tfe)
  @@ -904,9 +906,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  private String processTransformation() throws SAXException
  +  private String processTransformation() throws TransformerException
     {
   
       String htmlData = null;
  
  
  
  1.6       +5 -5      xml-xalan/java/src/org/apache/xalan/extensions/ExtensionHandler.java
  
  Index: ExtensionHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/ExtensionHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ExtensionHandler.java	2000/10/30 18:56:27	1.5
  +++ ExtensionHandler.java	2000/11/13 16:26:36	1.6
  @@ -60,7 +60,7 @@
   
   import java.io.IOException;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
  @@ -128,11 +128,11 @@
      *
      * @return the return value of the function evaluation.
      *
  -   * @exception SAXException          if parsing trouble
  +   * @exception TransformerException          if parsing trouble
      */
     public abstract Object callFunction(
       String funcName, Vector args, Object methodKey,
  -      ExpressionContext exprContext) throws SAXException;
  +      ExpressionContext exprContext) throws TransformerException;
   
     /**
      * Process a call to this extension namespace via an element. As a side
  @@ -153,10 +153,10 @@
      * @exception MalformedURLException if loading trouble
      * @exception FileNotFoundException if loading trouble
      * @exception IOException           if loading trouble
  -   * @exception SAXException          if parsing trouble
  +   * @exception TransformerException          if parsing trouble
      */
     public abstract void processElement(
       String localPart, Element element, TransformerImpl transformer,
         Stylesheet stylesheetTree, Node sourceTree, Node sourceNode,
  -        QName mode, Object methodKey) throws SAXException, IOException;
  +        QName mode, Object methodKey) throws TransformerException, IOException;
   }
  
  
  
  1.7       +13 -13    xml-xalan/java/src/org/apache/xalan/extensions/ExtensionHandlerGeneral.java
  
  Index: ExtensionHandlerGeneral.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/ExtensionHandlerGeneral.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExtensionHandlerGeneral.java	2000/10/30 18:56:27	1.6
  +++ ExtensionHandlerGeneral.java	2000/11/13 16:26:36	1.7
  @@ -68,7 +68,7 @@
   import org.apache.xalan.templates.Stylesheet;
   import org.apache.xalan.utils.QName;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   // Temp??
   import org.apache.xalan.transformer.TransformerImpl;
  @@ -177,11 +177,11 @@
      * NEEDSDOC @param scriptSrcURL
      * @param scriptSrc    the actual script code (if any)
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public ExtensionHandlerGeneral(
             String namespaceUri, StringVector elemNames, StringVector funcNames, String scriptLang, String scriptSrcURL, String scriptSrc)
  -            throws SAXException
  +            throws TransformerException
     {
   
       super(namespaceUri, scriptLang);
  @@ -217,12 +217,12 @@
   
       if (m_scriptSrcURL != null)
       {
  -      throw new SAXException("src attribute not yet supported for "
  +      throw new TransformerException("src attribute not yet supported for "
                                + scriptLang);
       }
   
       if (null == managerClass)
  -      throw new SAXException("Could not initialize BSF manager");
  +      throw new TransformerException("Could not initialize BSF manager");
   
       try
       {
  @@ -238,7 +238,7 @@
       {
         e.printStackTrace();
   
  -      throw new SAXException("Could not compile extension", e);
  +      throw new TransformerException("Could not compile extension", e);
       }
     }
   
  @@ -279,11 +279,11 @@
      * @exception MalformedURLException if loading trouble
      * @exception FileNotFoundException if loading trouble
      * @exception IOException           if loading trouble
  -   * @exception SAXException          if parsing trouble
  +   * @exception TransformerException          if parsing trouble
      */
     public Object callFunction(
             String funcName, Vector args, Object methodKey, ExpressionContext exprContext)
  -            throws SAXException
  +            throws TransformerException
     {
   
       Object[] argArray;
  @@ -316,13 +316,13 @@
           }
   
           // System.out.println("Call to extension function failed: "+msg);
  -        throw new SAXException(e);
  +        throw new TransformerException(e);
         }
         else
         {
   
           // Should probably make a TRaX Extension Exception.
  -        throw new SAXException("Could not create extension: " + funcName
  +        throw new TransformerException("Could not create extension: " + funcName
                                  + " because of: " + e);
         }
       }
  @@ -347,11 +347,11 @@
      * @exception MalformedURLException if loading trouble
      * @exception FileNotFoundException if loading trouble
      * @exception IOException           if loading trouble
  -   * @exception SAXException          if parsing trouble
  +   * @exception TransformerException          if parsing trouble
      */
     public void processElement(
             String localPart, Element element, TransformerImpl transformer, Stylesheet stylesheetTree, Node sourceTree, Node sourceNode, QName mode, Object methodKey)
  -            throws SAXException, IOException
  +            throws TransformerException, IOException
     {
   
       Object result = null;
  @@ -372,7 +372,7 @@
       {
   
         // e.printStackTrace ();
  -      throw new SAXException(e.getMessage(), e);
  +      throw new TransformerException(e.getMessage(), e);
       }
   
       if (result != null)
  
  
  
  1.6       +10 -10    xml-xalan/java/src/org/apache/xalan/extensions/ExtensionHandlerJavaClass.java
  
  Index: ExtensionHandlerJavaClass.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/ExtensionHandlerJavaClass.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ExtensionHandlerJavaClass.java	2000/10/29 22:28:13	1.5
  +++ ExtensionHandlerJavaClass.java	2000/11/13 16:26:36	1.6
  @@ -71,7 +71,7 @@
   import org.apache.xalan.utils.QName;
   
   import org.apache.xpath.objects.XObject;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -213,14 +213,14 @@
      * @param methodKey A key that uniquely identifies this class and method call.
      * @param exprContext The context in which this expression is being executed.
      * @return the return value of the function evaluation.
  -   * @exception SAXException
  +   * @exception TransformerException
      */
   
     public Object callFunction (String funcName, 
                                 Vector args, 
                                 Object methodKey,
                                 ExpressionContext exprContext)
  -    throws SAXException 
  +    throws TransformerException 
     {
   
       Object[] methodArgs;
  @@ -346,14 +346,14 @@
       {
         Throwable realException = ite.getTargetException();
         if (realException instanceof Exception)
  -        throw new SAXException((Exception) realException);
  +        throw new TransformerException((Exception) realException);
         else
  -        throw new SAXException(ite);
  +        throw new TransformerException(ite);
       }
       catch (Exception e)
       {
         // e.printStackTrace();
  -      throw new SAXException(e);
  +      throw new TransformerException(e);
       }
     }
   
  @@ -375,7 +375,7 @@
      * @param mode           The current mode.
      * @param methodKey      A key that uniquely identifies this element call.
      * @exception IOException           if loading trouble
  -   * @exception SAXException          if parsing trouble
  +   * @exception TransformerException          if parsing trouble
      */
   
     public void processElement(String localPart,
  @@ -386,7 +386,7 @@
                                Node sourceNode,
                                QName mode,
                                Object methodKey)
  -    throws SAXException, IOException
  +    throws TransformerException, IOException
     {
       Object result = null;
   
  @@ -402,7 +402,7 @@
         catch (Exception e)
         {
           // e.printStackTrace ();
  -        throw new SAXException (e.getMessage (), e);
  +        throw new TransformerException (e.getMessage (), e);
         }
         putToCache(methodKey, null, null, m);
       }
  @@ -420,7 +420,7 @@
       catch (Exception e)
       {
         // e.printStackTrace ();
  -      throw new SAXException (e.getMessage (), e);
  +      throw new TransformerException (e.getMessage (), e);
       }
   
       if (result != null)
  
  
  
  1.6       +16 -16    xml-xalan/java/src/org/apache/xalan/extensions/ExtensionHandlerJavaPackage.java
  
  Index: ExtensionHandlerJavaPackage.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/ExtensionHandlerJavaPackage.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ExtensionHandlerJavaPackage.java	2000/10/29 22:28:13	1.5
  +++ ExtensionHandlerJavaPackage.java	2000/11/13 16:26:36	1.6
  @@ -71,7 +71,7 @@
   import org.apache.xalan.utils.QName;
   
   import org.apache.xpath.objects.XObject;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -236,14 +236,14 @@
      * @exception MalformedURLException if loading trouble
      * @exception FileNotFoundException if loading trouble
      * @exception IOException           if loading trouble
  -   * @exception SAXException          if parsing trouble
  +   * @exception TransformerException          if parsing trouble
      */
   
     public Object callFunction (String funcName, 
                                 Vector args, 
                                 Object methodKey,
                                 ExpressionContext exprContext)
  -    throws SAXException 
  +    throws TransformerException 
     {
   
       String className;
  @@ -287,7 +287,7 @@
           }
           catch (ClassNotFoundException e) 
           {
  -          throw new SAXException(e);
  +          throw new TransformerException(e);
           }
           c = MethodResolver.getConstructor(classObj, 
                                             methodArgs,
  @@ -327,7 +327,7 @@
           }
           catch (ClassNotFoundException e) 
           {
  -          throw new SAXException(e);
  +          throw new TransformerException(e);
           }
           m = MethodResolver.getMethod(classObj,
                                        methodName,
  @@ -343,7 +343,7 @@
   
           if (args.size() < 1)
           {
  -          throw new SAXException("Instance method call to method " + funcName
  +          throw new TransformerException("Instance method call to method " + funcName
                                       + " requires an Object instance as first argument");
           }
           targetObject = args.elementAt(0);
  @@ -384,14 +384,14 @@
       {
         Throwable realException = ite.getTargetException();
         if (realException instanceof Exception)
  -        throw new SAXException((Exception) realException);
  +        throw new TransformerException((Exception) realException);
         else
  -        throw new SAXException(ite);
  +        throw new TransformerException(ite);
       }
       catch (Exception e)
       {
         // e.printStackTrace();
  -      throw new SAXException(e);
  +      throw new TransformerException(e);
       }
     }
   
  @@ -412,7 +412,7 @@
      * @param mode           The current mode.
      * @param methodKey      A key that uniquely identifies this element call.
      * @exception IOException           if loading trouble
  -   * @exception SAXException          if parsing trouble
  +   * @exception TransformerException          if parsing trouble
      */
   
     public void processElement (String localPart,
  @@ -423,7 +423,7 @@
                                 Node sourceNode,
                                 QName mode,
                                 Object methodKey)
  -    throws SAXException, IOException
  +    throws TransformerException, IOException
     {
       Object result = null;
       Class classObj;
  @@ -436,24 +436,24 @@
           String fullName = m_className + localPart;
           int lastDot = fullName.lastIndexOf(".");
           if (lastDot < 0)
  -          throw new SAXException("Invalid element name specified " + fullName);
  +          throw new TransformerException("Invalid element name specified " + fullName);
           try
           {
             classObj = Class.forName(fullName.substring(0, lastDot));
           }
           catch (ClassNotFoundException e) 
           {
  -          throw new SAXException(e);
  +          throw new TransformerException(e);
           }
           localPart = fullName.substring(lastDot + 1);
           m = MethodResolver.getElementMethod(classObj, localPart);
           if (!Modifier.isStatic(m.getModifiers()))
  -          throw new SAXException("Element name method must be static " + fullName);
  +          throw new TransformerException("Element name method must be static " + fullName);
         }
         catch (Exception e)
         {
           // e.printStackTrace ();
  -        throw new SAXException (e);
  +        throw new TransformerException (e);
         }
         putToCache(methodKey, null, null, m);
       }
  @@ -471,7 +471,7 @@
       catch (Exception e)
       {
         // e.printStackTrace ();
  -      throw new SAXException (e);
  +      throw new TransformerException (e);
       }
   
       if (result != null)
  
  
  
  1.10      +9 -9      xml-xalan/java/src/org/apache/xalan/extensions/ExtensionsTable.java
  
  Index: ExtensionsTable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/ExtensionsTable.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ExtensionsTable.java	2000/10/30 18:56:28	1.9
  +++ ExtensionsTable.java	2000/11/13 16:26:36	1.10
  @@ -140,10 +140,10 @@
      *
      * @return whether the given function is available or not.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public boolean functionAvailable(String ns, String funcName)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       boolean isAvailable = false;
  @@ -179,10 +179,10 @@
      *
      * @return whether the given function is available or not.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public boolean elementAvailable(String ns, String elemName)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       boolean isAvailable = false;
  @@ -223,11 +223,11 @@
      *
      * @return result of executing the function
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public Object extFunction(
             String ns, String funcName, Vector argVec, Object methodKey, ExpressionContext exprContext)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       Object result = null;
  @@ -272,7 +272,7 @@
               // System.out.println("Call to extension function failed: "+msg);
               result = new XNull();
   
  -            // throw new org.xml.sax.SAXException(e);
  +            // throw new javax.xml.transform.TransformerException(e);
             }
           }
         }
  @@ -291,10 +291,10 @@
      * @param ns        the URI of namespace in which the function is needed
      * @return          an ExtensionHandler for this namespace
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public ExtensionHandler makeJavaNamespace(String ns)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       // First, prepare the name of the actual class or package.  We strip
  
  
  
  1.17      +14 -14    xml-xalan/java/src/org/apache/xalan/extensions/MethodResolver.java
  
  Index: MethodResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/MethodResolver.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- MethodResolver.java	2000/10/29 22:28:13	1.16
  +++ MethodResolver.java	2000/11/13 16:26:36	1.17
  @@ -69,7 +69,7 @@
   import org.apache.xpath.objects.XString;
   import org.apache.xpath.objects.XRTreeFrag;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * Utility class to help resolve method overloading with Xalan XSLT 
  @@ -110,7 +110,7 @@
      * @param argsOut An array of the exact size as argsIn, which will be 
      * populated with converted arguments if a suitable method is found.
      * @return A constructor that will work with the argsOut array.
  -   * @exception SAXException may be thrown for Xalan conversion
  +   * @exception TransformerException may be thrown for Xalan conversion
      * exceptions.
      */
     public static Constructor getConstructor(Class classObj, 
  @@ -119,7 +119,7 @@
                                              ExpressionContext exprContext)
       throws NoSuchMethodException,
              SecurityException,
  -           SAXException
  +           TransformerException
     {
       Constructor bestConstructor = null;
       Class[] bestParamTypes = null;
  @@ -182,7 +182,7 @@
       }
       /*** This is commented out until we can do a better object -> object scoring 
       else if (bestScoreCount > 1)
  -      throw new SAXException("More than one best match for constructor for "
  +      throw new TransformerException("More than one best match for constructor for "
                                                                      + classObj.getName());
       ***/
       else
  @@ -202,7 +202,7 @@
      * @param argsOut An array of the exact size as argsIn, which will be 
      * populated with converted arguments if a suitable method is found.
      * @return A method that will work with the argsOut array.
  -   * @exception SAXException may be thrown for Xalan conversion
  +   * @exception TransformerException may be thrown for Xalan conversion
      * exceptions.
      */
     public static Method getMethod(Class classObj,
  @@ -213,7 +213,7 @@
                                    int searchMethod)
       throws NoSuchMethodException,
              SecurityException,
  -           SAXException
  +           TransformerException
     {
       // System.out.println("---> Looking for method: "+name);
       // System.out.println("---> classObj: "+classObj);
  @@ -309,7 +309,7 @@
       }
       /*** This is commented out until we can do a better object -> object scoring 
       else if (bestScoreCount > 1)
  -      throw new SAXException("More than one best match for method " + name);
  +      throw new TransformerException("More than one best match for method " + name);
       ***/
       else
         convertParams(argsIn, argsOut, bestParamTypes, exprContext);
  @@ -324,14 +324,14 @@
      * @param classObj The Class of the object that should have the method.
      * @param name The name of the method to be invoked.
      * @return A method that will work to be called as an element.
  -   * @exception SAXException may be thrown for Xalan conversion
  +   * @exception TransformerException may be thrown for Xalan conversion
      * exceptions.
      */
     public static Method getElementMethod(Class classObj,
                                           String name)
       throws NoSuchMethodException,
              SecurityException,
  -           SAXException
  +           TransformerException
     {
       // System.out.println("---> Looking for element method: "+name);
       // System.out.println("---> classObj: "+classObj);
  @@ -385,7 +385,7 @@
                                                                           name, 0, null));
       }
       else if (bestScoreCount > 1)
  -      throw new SAXException("More than one best match for element method " + name);
  +      throw new TransformerException("More than one best match for element method " + name);
       
       return bestMethod;
     }
  @@ -398,13 +398,13 @@
      * populated with converted arguments.
      * @param paramTypes An array of class objects, of the exact same 
      * size as argsIn and argsOut.
  -   * @exception SAXException may be thrown for Xalan conversion
  +   * @exception TransformerException may be thrown for Xalan conversion
      * exceptions.
      */
     public static void convertParams(Object[] argsIn, 
                                      Object[][] argsOut, Class[] paramTypes,
                                      ExpressionContext exprContext)
  -    throws org.xml.sax.SAXException
  +    throws javax.xml.transform.TransformerException
     {
       // System.out.println("In convertParams");
       if (paramTypes == null)
  @@ -662,11 +662,11 @@
      * @param javaClass The type of object to convert to.
      * @returns An object suitable for passing to the Method.invoke 
      * function in the args array, which may be null in some cases.
  -   * @exception SAXException may be thrown for Xalan conversion
  +   * @exception TransformerException may be thrown for Xalan conversion
      * exceptions.
      */
     static Object convert(Object xsltObj, Class javaClass)
  -    throws org.xml.sax.SAXException
  +    throws javax.xml.transform.TransformerException
     {
       if(xsltObj instanceof XObject)
       {
  
  
  
  1.6       +92 -85    xml-xalan/java/src/org/apache/xalan/extensions/XSLProcessorContext.java
  
  Index: XSLProcessorContext.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/XSLProcessorContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSLProcessorContext.java	2000/10/30 18:56:28	1.5
  +++ XSLProcessorContext.java	2000/11/13 16:26:36	1.6
  @@ -65,7 +65,7 @@
   import org.apache.xalan.templates.Stylesheet;
   import org.apache.xalan.utils.QName;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xpath.objects.XObject;
   import org.apache.xpath.objects.XString;
  @@ -182,121 +182,128 @@
      * @param obj the Java object to output. If its of an X<something> type
      *        then that conversion is done first and then sent out.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      * @throws java.io.FileNotFoundException
      * @throws java.io.IOException
      * @throws java.net.MalformedURLException
      */
     public void outputToResultTree(Stylesheet stylesheetTree, Object obj)
  -          throws SAXException, java.net.MalformedURLException,
  +          throws TransformerException, java.net.MalformedURLException,
                    java.io.FileNotFoundException, java.io.IOException
     {
   
  -    ResultTreeHandler rtreeHandler = transformer.getResultTreeHandler();
  -    XObject value;
  -
  -    // Make the return object into an XObject because it
  -    // will be easier below.  One of the reasons to do this
  -    // is to keep all the conversion functionality in the
  -    // XObject classes.
  -    if (obj instanceof XObject)
  -    {
  -      value = (XObject) obj;
  -    }
  -    else if (obj instanceof String)
  -    {
  -      value = new XString((String) obj);
  -    }
  -    else if (obj instanceof Boolean)
  -    {
  -      value = new XBoolean(((Boolean) obj).booleanValue());
  -    }
  -    else if (obj instanceof Double)
  -    {
  -      value = new XNumber(((Double) obj).doubleValue());
  -    }
  -    else if (obj instanceof DocumentFragment)
  -    {
  -      value = new XRTreeFrag((DocumentFragment) obj);
  -    }
  -    else if (obj instanceof Node)
  -    {
  -      value = new XNodeSet((Node) obj);
  -    }
  -    else if (obj instanceof NodeIterator)
  +    try
       {
  -      value = new XNodeSet((NodeIterator) obj);
  -    }
  -    else
  -    {
  -      value = new XString(obj.toString());
  -    }
  +      ResultTreeHandler rtreeHandler = transformer.getResultTreeHandler();
  +      XObject value;
   
  -    int type = value.getType();
  -    String s;
  +      // Make the return object into an XObject because it
  +      // will be easier below.  One of the reasons to do this
  +      // is to keep all the conversion functionality in the
  +      // XObject classes.
  +      if (obj instanceof XObject)
  +      {
  +        value = (XObject) obj;
  +      }
  +      else if (obj instanceof String)
  +      {
  +        value = new XString((String) obj);
  +      }
  +      else if (obj instanceof Boolean)
  +      {
  +        value = new XBoolean(((Boolean) obj).booleanValue());
  +      }
  +      else if (obj instanceof Double)
  +      {
  +        value = new XNumber(((Double) obj).doubleValue());
  +      }
  +      else if (obj instanceof DocumentFragment)
  +      {
  +        value = new XRTreeFrag((DocumentFragment) obj);
  +      }
  +      else if (obj instanceof Node)
  +      {
  +        value = new XNodeSet((Node) obj);
  +      }
  +      else if (obj instanceof NodeIterator)
  +      {
  +        value = new XNodeSet((NodeIterator) obj);
  +      }
  +      else
  +      {
  +        value = new XString(obj.toString());
  +      }
   
  -    switch (type)
  -    {
  -    case XObject.CLASS_BOOLEAN :
  -    case XObject.CLASS_NUMBER :
  -    case XObject.CLASS_STRING :
  -      s = value.str();
  -
  -      rtreeHandler.characters(s.toCharArray(), 0, s.length());
  -      break;
  -    case XObject.CLASS_NODESET :  // System.out.println(value);
  -      NodeIterator nl = value.nodeset();
  -      Node pos;
  +      int type = value.getType();
  +      String s;
   
  -      while (null != (pos = nl.nextNode()))
  +      switch (type)
         {
  -        Node top = pos;
  +      case XObject.CLASS_BOOLEAN :
  +      case XObject.CLASS_NUMBER :
  +      case XObject.CLASS_STRING :
  +        s = value.str();
  +
  +        rtreeHandler.characters(s.toCharArray(), 0, s.length());
  +        break;
  +      case XObject.CLASS_NODESET :  // System.out.println(value);
  +        NodeIterator nl = value.nodeset();
  +        Node pos;
   
  -        while (null != pos)
  +        while (null != (pos = nl.nextNode()))
           {
  -          rtreeHandler.flushPending();
  -          rtreeHandler.cloneToResultTree(pos, true);
  -
  -          Node nextNode = pos.getFirstChild();
  +          Node top = pos;
   
  -          while (null == nextNode)
  +          while (null != pos)
             {
  -            if (Node.ELEMENT_NODE == pos.getNodeType())
  -            {
  -              rtreeHandler.endElement("", "", pos.getNodeName());
  -            }
  -
  -            if (top == pos)
  -              break;
  +            rtreeHandler.flushPending();
  +            rtreeHandler.cloneToResultTree(pos, true);
   
  -            nextNode = pos.getNextSibling();
  +            Node nextNode = pos.getFirstChild();
   
  -            if (null == nextNode)
  +            while (null == nextNode)
               {
  -              pos = pos.getParentNode();
  +              if (Node.ELEMENT_NODE == pos.getNodeType())
  +              {
  +                rtreeHandler.endElement("", "", pos.getNodeName());
  +              }
   
                 if (top == pos)
  +                break;
  +
  +              nextNode = pos.getNextSibling();
  +
  +              if (null == nextNode)
                 {
  -                if (Node.ELEMENT_NODE == pos.getNodeType())
  +                pos = pos.getParentNode();
  +
  +                if (top == pos)
                   {
  -                  rtreeHandler.endElement("", "", pos.getNodeName());
  -                }
  +                  if (Node.ELEMENT_NODE == pos.getNodeType())
  +                  {
  +                    rtreeHandler.endElement("", "", pos.getNodeName());
  +                  }
   
  -                nextNode = null;
  +                  nextNode = null;
   
  -                break;
  +                  break;
  +                }
                 }
               }
  -          }
   
  -          pos = nextNode;
  +            pos = nextNode;
  +          }
           }
  +        break;
  +      case XObject.CLASS_RTREEFRAG :
  +        rtreeHandler.outputResultTreeFragment(value,
  +                                              transformer.getXPathContext());
  +        break;
         }
  -      break;
  -    case XObject.CLASS_RTREEFRAG :
  -      rtreeHandler.outputResultTreeFragment(value,
  -                                            transformer.getXPathContext());
  -      break;
  +    }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
       }
     }
   
  
  
  
  1.8       +3 -3      xml-xalan/java/src/org/apache/xalan/lib/Extensions.java
  
  Index: Extensions.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/lib/Extensions.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Extensions.java	2000/11/07 09:42:28	1.7
  +++ Extensions.java	2000/11/13 16:26:37	1.8
  @@ -151,7 +151,7 @@
   	 * in ni2
   	 */	
   	public static NodeSet intersection(NodeIterator ni1, NodeIterator ni2)
  -			throws org.xml.sax.SAXException
  +			throws javax.xml.transform.TransformerException
   	{
   		NodeSet ns1 = new NodeSet(ni1);
   		NodeSet ns2 = new NodeSet(ni2);
  @@ -174,7 +174,7 @@
   	 * in ni2
   	 */	
   	public static NodeSet difference(NodeIterator ni1, NodeIterator ni2)
  -			throws org.xml.sax.SAXException	
  +			throws javax.xml.transform.TransformerException	
   	{
   		NodeSet ns1 = new NodeSet(ni1);
   		NodeSet ns2 = new NodeSet(ni2);
  @@ -198,7 +198,7 @@
   	 * only include the first such node found.
   	 */	
   	public static NodeSet distinct(NodeIterator ni)
  -			throws org.xml.sax.SAXException	
  +			throws javax.xml.transform.TransformerException	
   	{
   		NodeSet ns = new NodeSet(ni);
   		NodeSet dist = new NodeSet();
  
  
  
  1.9       +31 -10    xml-xalan/java/src/org/apache/xalan/lib/Redirect.java
  
  Index: Redirect.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/lib/Redirect.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Redirect.java	2000/11/03 23:28:01	1.8
  +++ Redirect.java	2000/11/13 16:26:37	1.9
  @@ -62,7 +62,7 @@
   
   import org.xml.sax.ContentHandler;
   
  -import org.apache.serialize.OutputFormat;
  +import org.apache.xalan.serialize.OutputFormat;
   import org.apache.xalan.extensions.XSLProcessorContext;
   import org.apache.xalan.transformer.TransformerImpl;
   import org.apache.xalan.templates.StylesheetRoot;
  @@ -158,7 +158,7 @@
       throws java.net.MalformedURLException,
              java.io.FileNotFoundException,
              java.io.IOException,
  -           org.xml.sax.SAXException
  +           javax.xml.transform.TransformerException
     {
       String fileName = getFilename(context, elem);
       Object flistener = m_formatterListeners.get(fileName);
  @@ -183,7 +183,7 @@
       throws java.net.MalformedURLException,
              java.io.FileNotFoundException,
              java.io.IOException,
  -           org.xml.sax.SAXException
  +           javax.xml.transform.TransformerException
     {
       String fileName = getFilename(context, elem);
       Object flObject = m_formatterListeners.get(fileName);
  @@ -216,7 +216,14 @@
         OutputStream ostream = (OutputStream)m_outputStreams.get(fileName);
         if(null != ostream)
         {
  -        formatter.endDocument();
  +        try
  +        {
  +          formatter.endDocument();
  +        }
  +        catch(org.xml.sax.SAXException se)
  +        {
  +          throw new TransformerException(se);
  +        }
           ostream.close();
           m_outputStreams.remove(fileName);
           m_formatterListeners.remove(fileName);
  @@ -232,14 +239,21 @@
       throws java.net.MalformedURLException,
       java.io.FileNotFoundException,
       java.io.IOException,
  -    org.xml.sax.SAXException
  +    javax.xml.transform.TransformerException
     {
       String fileName = getFilename(context, elem);
       Object formatterObj = m_formatterListeners.get(fileName);
       if(null != formatterObj)
       {
         ContentHandler fl = (ContentHandler)formatterObj;
  -      fl.endDocument();
  +      try
  +      {
  +        fl.endDocument();
  +      }
  +      catch(org.xml.sax.SAXException se)
  +      {
  +        throw new TransformerException(se);
  +      }
         OutputStream ostream = (OutputStream)m_outputStreams.get(fileName);
         if(null != ostream)
         {
  @@ -257,7 +271,7 @@
       throws java.net.MalformedURLException,
       java.io.FileNotFoundException,
       java.io.IOException,
  -    org.xml.sax.SAXException
  +    javax.xml.transform.TransformerException
     {
       String fileName;
       String fileNameExpr 
  @@ -333,7 +347,7 @@
       throws java.net.MalformedURLException,
       java.io.FileNotFoundException,
       java.io.IOException,
  -    org.xml.sax.SAXException
  +    javax.xml.transform.TransformerException
     {
       File file = new File(fileName);
       TransformerImpl transformer = context.getTransformer();
  @@ -368,7 +382,14 @@
       {
         ContentHandler flistener 
           = transformer.createResultContentHandler(new StreamResult(ostream), format);
  -      flistener.startDocument();
  +      try
  +      {
  +        flistener.startDocument();
  +      }
  +      catch(org.xml.sax.SAXException se)
  +      {
  +        throw new TransformerException(se);
  +      }
         if(shouldPutInTable)
         {
           m_outputStreams.put(fileName, ostream);
  @@ -378,7 +399,7 @@
       }
       catch(TransformerException te)
       {
  -      throw new org.xml.sax.SAXException(te);
  +      throw new javax.xml.transform.TransformerException(te);
       }
       
     }
  
  
  
  1.10      +3 -4      xml-xalan/java/src/org/apache/xalan/processor/CompiledStylesheetBundle.java
  
  Index: CompiledStylesheetBundle.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/CompiledStylesheetBundle.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CompiledStylesheetBundle.java	2000/11/09 18:30:29	1.9
  +++ CompiledStylesheetBundle.java	2000/11/13 16:26:42	1.10
  @@ -85,12 +85,11 @@
   import org.xml.sax.ContentHandler;
   import org.xml.sax.DTDHandler;
   import org.xml.sax.EntityResolver;
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.ErrorHandler;
   import org.xml.sax.helpers.NamespaceSupport;
   import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
  +
  +import javax.xml.transform.TransformerException;
  +import javax.xml.transform.ErrorListener;
   
   /**
    * <meta name="usage" content="advanced"/>
  
  
  
  1.7       +1 -1      xml-xalan/java/src/org/apache/xalan/processor/CompiledTemplate.java
  
  Index: CompiledTemplate.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/CompiledTemplate.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CompiledTemplate.java	2000/11/03 23:28:02	1.6
  +++ CompiledTemplate.java	2000/11/13 16:26:42	1.7
  @@ -171,7 +171,7 @@
   			  org.apache.xalan.transformer.TransformerImpl transformer,
   		      org.w3c.dom.Node sourceNode,
   		      org.apache.xalan.utils.QName mode)
  -       throws org.xml.sax.SAXException;
  +       throws javax.xml.transform.TransformerException;
     
     /** During deserialization, reinstantiate the transient thread-table
      */
  
  
  
  1.16      +56 -50    xml-xalan/java/src/org/apache/xalan/processor/CompilingStylesheetHandler.java
  
  Index: CompilingStylesheetHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/CompilingStylesheetHandler.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CompilingStylesheetHandler.java	2000/11/09 18:30:30	1.15
  +++ CompilingStylesheetHandler.java	2000/11/13 16:26:42	1.16
  @@ -85,13 +85,12 @@
   import org.xml.sax.ContentHandler;
   import org.xml.sax.DTDHandler;
   import org.xml.sax.EntityResolver;
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.ErrorHandler;
   import org.xml.sax.helpers.NamespaceSupport;
   import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
   
  +import javax.xml.transform.ErrorListener;
  +import javax.xml.transform.TransformerException;
  +
   // Java Compiler support.
   import org.apache.xalan.utils.synthetic.JavaUtils;
   
  @@ -125,21 +124,23 @@
      * Run standard cleanup of the internal representation,
      * then start trying to replace that rep with custom code.
      *
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#endDocument
      */
     public void endDocument ()
  -    throws SAXException
  +    throws org.xml.sax.SAXException
     {
  -    super.endDocument();
  -	
  -	Vector compiledTemplates=new Vector();
  -	 
  -    Stylesheet current=getStylesheet();
  -    if(isStylesheetParsingComplete())
  -    {    
  -		// Begin compiling. Loop modeled on StylesheetRoot.recompose()
  +    try
  +    {
  +      super.endDocument();
  +      
  +      Vector compiledTemplates=new Vector();
  +      
  +      Stylesheet current=getStylesheet();
  +      if(isStylesheetParsingComplete())
  +      {    
  +        // Begin compiling. Loop modeled on StylesheetRoot.recompose()
           // calling recomposeTemplates().
           StylesheetRoot root=(StylesheetRoot)getStylesheetRoot();
           
  @@ -147,35 +148,35 @@
           int nImports = root.getGlobalImportCount();
           for(int imp = 0; imp < nImports; imp++)
           {
  -            org.apache.xalan.templates.StylesheetComposed
  -                sheet = root.getGlobalImport(imp);
  +          org.apache.xalan.templates.StylesheetComposed
  +            sheet = root.getGlobalImport(imp);
   
  -            // loop from sheet.recomposeTemplates
  -            // Scan both main and included stylesheets
  -            int nIncludes = sheet.getIncludeCountComposed();
  -            for(int k = nIncludes-1; k >= -1; k--)
  +          // loop from sheet.recomposeTemplates
  +          // Scan both main and included stylesheets
  +          int nIncludes = sheet.getIncludeCountComposed();
  +          for(int k = nIncludes-1; k >= -1; k--)
  +          {
  +            Stylesheet included = (-1 == k) ? sheet : sheet.getIncludeComposed(k);
  +            int n = included.getTemplateCount();
  +            for(int i = 0; i < n; i++)
               {
  -                Stylesheet included = (-1 == k) ? sheet : sheet.getIncludeComposed(k);
  -                int n = included.getTemplateCount();
  -                for(int i = 0; i < n; i++)
  +              ElemTemplate t=included.getTemplate(i);
  +              
  +              if(!(t instanceof CompiledTemplate))
  +              {
  +                ElemTemplate newT=compileTemplate(t);
  +                if(newT!=t)
                   {
  -                    ElemTemplate t=included.getTemplate(i);
  -					
  -					if(!(t instanceof CompiledTemplate))
  -					{
  -	                    ElemTemplate newT=compileTemplate(t);
  -		                if(newT!=t)
  -						{
  -			                included.replaceTemplate(newT,i);
  -							compiledTemplates.addElement(newT);
  -						}
  -				    }
  -				}
  +                  included.replaceTemplate(newT,i);
  +                  compiledTemplates.addElement(newT);
  +                }
  +              }
               }
  -			// Need to rebuild each sheet's cache.
  -			sheet.recomposeTemplates(true); 
  +          }
  +          // Need to rebuild each sheet's cache.
  +          sheet.recomposeTemplates(true); 
           }
  -    
  +        
           // After compiling I think we have to reconstruct the cached
           // "composed templates" set. 
           // NOTE: RECOMPOSE WAS A ONE-TIME OP
  @@ -184,9 +185,14 @@
           // entry point... Or flush might be made the new default
           // behavior; I don't know whether that would be appropriate.
           root.recomposeTemplates(true); 
  -		
  -		// TODO: Should bundling occur elsewhere?
  -		CompiledStylesheetBundle.createBundle(root,compiledTemplates);
  +        
  +        // TODO: Should bundling occur elsewhere?
  +        CompiledStylesheetBundle.createBundle(root,compiledTemplates);
  +      }
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
       }
     }
     
  @@ -275,7 +281,7 @@
           exec.addParameter(
               tClass.forClass(org.apache.xalan.utils.QName.class),"mode");
           exec.addExceptionType(
  -            tClass.forClass(org.xml.sax.SAXException.class));
  +            tClass.forClass(javax.xml.transform.TransformerException.class));
   
           // If there are no kids, the body is a no-op.
           ElemTemplateElement firstChild = source.getFirstChildElem();
  @@ -300,7 +306,7 @@
                 +"org.apache.xalan.transformer.ResultTreeHandler rhandler = transformer.getResultTreeHandler();\n"
                 +"org.xml.sax.ContentHandler saxChandler = rhandler.getContentHandler();\n"
                 +"if(null == sourceNode) {\n"
  -              // throws(org.xml.sax.SAXException
  +              // throws(javax.xml.transform.TransformerException
                 +"  transformer.getMsgMgr().error(this, sourceNode,\n" 
                 +"    org.apache.xalan.res.XSLTErrorResources.ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES);\n"
                 //sourceNode is null in handleApplyTemplatesInstruction!
  @@ -473,7 +479,7 @@
                       avtValueExpression=makeQuotedString(
                           avt.evaluate(null,null,null)
                           );
  -                }catch(SAXException e)
  +                }catch(TransformerException e)
                   {
                   }
               }
  @@ -558,7 +564,7 @@
                       /**/System.err.println(errmsg);
                       /**/body.append("// ***** "+errmsg+" *****/\n");
                       /**/return;
  -                    //throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_XSLATTRSET_USED_ITSELF, new Object[]{attrSet.getName().getLocalPart()})); //"xsl:attribute-set '"+m_qname.m_localpart+
  +                    //throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_XSLATTRSET_USED_ITSELF, new Object[]{attrSet.getName().getLocalPart()})); //"xsl:attribute-set '"+m_qname.m_localpart+
                   }
                   attrSetStack.push(attrSet);
   
  @@ -585,7 +591,7 @@
             try
             {
               return makeQuotedString(avt.evaluate(null,null,null));
  -          } catch(SAXException e)
  +          } catch(TransformerException e)
             {
                 // Should never arise
                 String s=">UNEXPECTED ERROR evaluating context-insensitive AVT<";
  @@ -649,14 +655,14 @@
                   +"java.io.StringWriter "+sw+";\n"
                   
                   +"try\n{\n"
  -                +"org.apache.xml.org.apache.serialize.SerializerFactory "+sfactory+"=org.apache.xml.org.apache.serialize.SerializerFactory.getSerializerFactory(\"text\");\n"
  +                +"org.apache.xml.org.apache.xalan.serialize.SerializerFactory "+sfactory+"=org.apache.xml.org.apache.xalan.serialize.SerializerFactory.getSerializerFactory(\"text\");\n"
                   +sw+"=new java.io.StringWriter();\n"
  -                +"org.apache.xml.org.apache.serialize.OutputFormat "+format+"=new org.apache.xml.org.apache.serialize.OutputFormat();\n"
  +                +"org.apache.xml.org.apache.xalan.serialize.OutputFormat "+format+"=new org.apache.xml.org.apache.xalan.serialize.OutputFormat();\n"
                   +format+".setPreserveSpace(true);\n"
  -                +"org.apache.xml.org.apache.serialize.Serializer "+serializer+"="+sfactory+".makeSerializer("+sw+","+format+");\n"
  +                +"org.apache.xml.org.apache.xalan.serialize.Serializer "+serializer+"="+sfactory+".makeSerializer("+sw+","+format+");\n"
                   +shandler+"="+serializer+".asContentHandler();\n"
                   +"}\ncatch (java.io.IOException "+ioe+")\n{\n"
  -                +"throw new org.xml.sax.SAXException("+ioe+");\n}\n"
  +                +"throw new javax.xml.transform.TransformerException("+ioe+");\n}\n"
                   // TODO: ***** DO WE NEED transformer.setResultTreeHandler()?
                   +"rhandler=new org.apache.xalan.transformer.ResultTreeHandler(transformer,"+shandler+");\n\n"
                   +"rhandler.startDocument();\n"
  
  
  
  1.5       +1 -1      xml-xalan/java/src/org/apache/xalan/processor/CompilingStylesheetProcessor.java
  
  Index: CompilingStylesheetProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/CompilingStylesheetProcessor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CompilingStylesheetProcessor.java	2000/11/03 23:28:02	1.4
  +++ CompilingStylesheetProcessor.java	2000/11/13 16:26:42	1.5
  @@ -61,7 +61,7 @@
   import org.xml.sax.InputSource;
   import org.xml.sax.helpers.XMLReaderFactory;
   import org.xml.sax.XMLReader;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.w3c.dom.Node;
   
  
  
  
  1.4       +12 -13    xml-xalan/java/src/org/apache/xalan/processor/ProcessorAttributeSet.java
  
  Index: ProcessorAttributeSet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorAttributeSet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorAttributeSet.java	2000/10/30 18:40:35	1.3
  +++ ProcessorAttributeSet.java	2000/11/13 16:26:42	1.4
  @@ -60,7 +60,7 @@
   import org.apache.xalan.templates.ElemTemplateElement;
   
   import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * This class processes parse events for an xsl:attribute-set.
  @@ -86,24 +86,28 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
      * @see org.apache.xalan.processor.StylesheetHandler#startElement
      * @see org.xml.sax.ContentHandler#startElement
      * @see org.xml.sax.ContentHandler#endElement
      * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       ElemAttributeSet eat = new ElemAttributeSet();
   
       eat.setLocaterInfo(handler.getLocator());
  -    eat.setPrefixes(handler.getNamespaceSupport());
  +    try
  +    {
  +      eat.setPrefixes(handler.getNamespaceSupport());
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
  +
       eat.setDOMBackPointer(handler.getOriginatingNode());
       setPropertiesFromAttributes(handler, rawName, attributes, eat);
       handler.getStylesheet().setAttributeSet(eat);
  @@ -125,15 +129,10 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#endElement
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       handler.popElemTemplateElement();
     }
  
  
  
  1.5       +13 -14    xml-xalan/java/src/org/apache/xalan/processor/ProcessorCharacters.java
  
  Index: ProcessorCharacters.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorCharacters.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProcessorCharacters.java	2000/10/30 18:40:36	1.4
  +++ ProcessorCharacters.java	2000/11/13 16:26:42	1.5
  @@ -58,7 +58,7 @@
   
   import java.lang.StringBuffer;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.templates.ElemText;
   import org.apache.xalan.templates.ElemTextLiteral;
  @@ -79,10 +79,8 @@
      * is sent to the current processor when any non-text event occurs.
      *
      * NEEDSDOC @param handler
  -   *
  -   * @throws SAXException
      */
  -  public void startNonText(StylesheetHandler handler) throws SAXException
  +  public void startNonText(StylesheetHandler handler) throws org.xml.sax.SAXException
     {
   
       if (this == handler.getCurrentProcessor())
  @@ -98,7 +96,14 @@
   
         elem.setDOMBackPointer(handler.getOriginatingNode());
         elem.setLocaterInfo(handler.getLocator());
  -      elem.setPrefixes(handler.getNamespaceSupport());
  +      try
  +      {
  +        elem.setPrefixes(handler.getNamespaceSupport());
  +      }
  +      catch(TransformerException te)
  +      {
  +        throw new org.xml.sax.SAXException(te);
  +      }
   
         boolean doe = (null != m_xslTextElement)
                       ? m_xslTextElement.getDisableOutputEscaping() : false;
  @@ -128,15 +133,13 @@
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
      *               character array.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#characters
  -   *
  -   * @throws SAXException
      */
     public void characters(
             StylesheetHandler handler, char ch[], int start, int length)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       m_accumulator.append(ch, start, length);
  @@ -161,19 +164,15 @@
      * @param atts The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
      * @see org.apache.xalan.processor.StylesheetHandler#startElement
      * @see org.apache.xalan.processor.StylesheetHandler#endElement
      * @see org.xml.sax.ContentHandler#startElement
      * @see org.xml.sax.ContentHandler#endElement
      * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       // Since this has been installed as the current processor, we 
  
  
  
  1.3       +2 -6      xml-xalan/java/src/org/apache/xalan/processor/ProcessorDecimalFormat.java
  
  Index: ProcessorDecimalFormat.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorDecimalFormat.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProcessorDecimalFormat.java	2000/10/30 18:40:36	1.2
  +++ ProcessorDecimalFormat.java	2000/11/13 16:26:42	1.3
  @@ -58,7 +58,7 @@
   
   import org.apache.xalan.templates.DecimalFormatProperties;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   /**
  @@ -84,19 +84,15 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
      * @see org.apache.xalan.processor.StylesheetHandler#startElement
      * @see org.apache.xalan.processor.StylesheetHandler#endElement
      * @see org.xml.sax.ContentHandler#startElement
      * @see org.xml.sax.ContentHandler#endElement
      * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       DecimalFormatProperties dfp = new DecimalFormatProperties();
  
  
  
  1.4       +4 -9      xml-xalan/java/src/org/apache/xalan/processor/ProcessorGlobalParamDecl.java
  
  Index: ProcessorGlobalParamDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorGlobalParamDecl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorGlobalParamDecl.java	2000/10/30 18:40:36	1.3
  +++ ProcessorGlobalParamDecl.java	2000/11/13 16:26:42	1.4
  @@ -59,7 +59,7 @@
   import org.apache.xalan.templates.ElemTemplateElement;
   import org.apache.xalan.templates.ElemParam;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   /**
  @@ -78,11 +78,11 @@
      * NEEDSDOC @param handler
      * NEEDSDOC @param elem
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       // Just push, but don't append.
  @@ -99,15 +99,10 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#endElement
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       ElemParam v = (ElemParam) handler.getElemTemplateElement();
  
  
  
  1.4       +4 -9      xml-xalan/java/src/org/apache/xalan/processor/ProcessorGlobalVariableDecl.java
  
  Index: ProcessorGlobalVariableDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorGlobalVariableDecl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorGlobalVariableDecl.java	2000/10/30 18:40:37	1.3
  +++ ProcessorGlobalVariableDecl.java	2000/11/13 16:26:42	1.4
  @@ -59,7 +59,7 @@
   import org.apache.xalan.templates.ElemTemplateElement;
   import org.apache.xalan.templates.ElemVariable;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   /**
  @@ -78,11 +78,11 @@
      * NEEDSDOC @param handler
      * NEEDSDOC @param elem
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       // Just push, but don't append.
  @@ -99,15 +99,10 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#endElement
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       ElemVariable v = (ElemVariable) handler.getElemTemplateElement();
  
  
  
  1.7       +3 -12     xml-xalan/java/src/org/apache/xalan/processor/ProcessorImport.java
  
  Index: ProcessorImport.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorImport.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ProcessorImport.java	2000/11/03 23:28:02	1.6
  +++ ProcessorImport.java	2000/11/13 16:26:49	1.7
  @@ -62,7 +62,7 @@
   import org.apache.xalan.res.XSLMessages;
   import org.apache.xalan.res.XSLTErrorResources;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   import org.xml.sax.XMLReader;
   import org.xml.sax.helpers.XMLReaderFactory;
  @@ -101,19 +101,10 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.apache.xalan.processor.StylesheetHandler#startElement
  -   * @see org.apache.xalan.processor.StylesheetHandler#endElement
  -   * @see org.xml.sax.ContentHandler#startElement
  -   * @see org.xml.sax.ContentHandler#endElement
  -   * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       setPropertiesFromAttributes(handler, rawName, attributes, this);
  @@ -122,7 +113,7 @@
   
       if (handler.importStackContains(hrefUrl))
       {
  -      throw new SAXException(
  +      throw new org.xml.sax.SAXException(
           XSLMessages.createMessage(
             XSLTErrorResources.ER_IMPORTING_ITSELF, new Object[]{ hrefUrl }));  //"(StylesheetHandler) "+hrefUrl+" is directly or indirectly importing itself!");
       }
  
  
  
  1.10      +18 -34    xml-xalan/java/src/org/apache/xalan/processor/ProcessorInclude.java
  
  Index: ProcessorInclude.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorInclude.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ProcessorInclude.java	2000/11/09 00:00:26	1.9
  +++ ProcessorInclude.java	2000/11/13 16:26:49	1.10
  @@ -61,7 +61,7 @@
   import org.apache.xalan.res.XSLMessages;
   import org.apache.xalan.res.XSLTErrorResources;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   import org.xml.sax.XMLReader;
   import org.xml.sax.InputSource;
  @@ -135,19 +135,10 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.apache.xalan.processor.StylesheetHandler#startElement
  -   * @see org.apache.xalan.processor.StylesheetHandler#endElement
  -   * @see org.xml.sax.ContentHandler#startElement
  -   * @see org.xml.sax.ContentHandler#endElement
  -   * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       setPropertiesFromAttributes(handler, rawName, attributes, this);
  @@ -180,11 +171,11 @@
      * NEEDSDOC @param rawName
      * NEEDSDOC @param attributes
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected void parse(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       TransformerFactoryImpl processor = handler.getStylesheetProcessor();
       URIResolver uriresolver = processor.getURIResolver();
  @@ -195,22 +186,22 @@
   
         if (null != uriresolver)
         {
  -        try
  -        {
  -          source = uriresolver.resolve(getHref(),
  -                                       handler.getBaseIdentifier());
  -        }
  -        catch(TransformerException te)
  -        {
  -          handler.error("Error with URI Resolver!", te);
  -        }
  +        source = uriresolver.resolve(getHref(),
  +                                     handler.getBaseIdentifier());
   
           if (null != source && source instanceof DOMSource)
           {
             Node node = ((DOMSource)source).getNode();
             TreeWalker walker = new TreeWalker(handler);
   
  -          walker.traverse(node);
  +          try
  +          {
  +            walker.traverse(node);
  +          }
  +          catch(org.xml.sax.SAXException se)
  +          {
  +            throw new TransformerException(se);
  +          }
             return;
           }
         }
  @@ -238,20 +229,14 @@
   
         if (null != reader)
         {
  -        EntityResolver entityResolver = processor.getEntityResolver();
  -        if (null != entityResolver)
  -          reader.setEntityResolver(entityResolver);
  -
           reader.setContentHandler(handler);
           try
           {
             reader.setFeature("http://apache.org/xml/features/validation/dynamic",
                               true);
  -        }
  -        catch(org.xml.sax.SAXNotRecognizedException snre)
  -        {
  -          // We don't care.
           }
  +        catch(org.xml.sax.SAXException se) {}
  +        
           handler.pushBaseIndentifier(inputSource.getSystemId());
   
           try
  @@ -269,10 +254,9 @@
         handler.error(XSLTErrorResources.ER_IOEXCEPTION,
                       new Object[]{ getHref() }, ioe);
       }
  -    catch (SAXException ioe)
  +    catch(TransformerException te)
       {
  -      handler.error(XSLTErrorResources.ER_IOEXCEPTION,
  -                    new Object[]{ getHref() }, ioe);
  +      handler.error(te.getMessage(), te);
       }
     }
   }
  
  
  
  1.7       +3 -14     xml-xalan/java/src/org/apache/xalan/processor/ProcessorKey.java
  
  Index: ProcessorKey.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorKey.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ProcessorKey.java	2000/11/03 23:28:02	1.6
  +++ ProcessorKey.java	2000/11/13 16:26:50	1.7
  @@ -58,7 +58,7 @@
   
   import org.apache.xalan.templates.KeyDeclaration;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   import org.apache.xalan.res.XSLMessages;
  @@ -101,19 +101,10 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.apache.xalan.processor.StylesheetHandler#startElement
  -   * @see org.apache.xalan.processor.StylesheetHandler#endElement
  -   * @see org.xml.sax.ContentHandler#startElement
  -   * @see org.xml.sax.ContentHandler#endElement
  -   * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       KeyDeclaration kd = new KeyDeclaration();
  @@ -132,12 +123,10 @@
      *                error reporting.
      * @param attributes The list of attributes.
      * @param target The target element where the properties will be set.
  -   *
  -   * @throws SAXException
      */
     void setPropertiesFromAttributes(
             StylesheetHandler handler, String rawName, Attributes attributes, Object target)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       XSLTElementDef def = getElemDef();
  
  
  
  1.12      +168 -171  xml-xalan/java/src/org/apache/xalan/processor/ProcessorLRE.java
  
  Index: ProcessorLRE.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorLRE.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ProcessorLRE.java	2000/11/08 17:13:59	1.11
  +++ ProcessorLRE.java	2000/11/13 16:26:50	1.12
  @@ -65,7 +65,7 @@
   import org.apache.xpath.XPath;
   import org.apache.xalan.templates.StylesheetRoot;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   import org.xml.sax.Locator;
   import org.xml.sax.helpers.AttributesImpl;
  @@ -90,224 +90,226 @@
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
      * @param attributes The specified or defaulted attributes.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#startElement
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
  -
  -    ElemTemplateElement p = handler.getElemTemplateElement();
  -    boolean excludeXSLDecl = false;
  -    boolean isLREAsStyleSheet = false;
   
  -    if (null == p)
  +    try
       {
  -
  -      // Literal Result Template as stylesheet.
  -      XSLTElementProcessor lreProcessor = handler.popProcessor();
  -      XSLTElementProcessor stylesheetProcessor =
  -        handler.getProcessorFor(Constants.S_XSLNAMESPACEURL, "stylesheet",
  -                                "xsl:stylesheet");
  -
  -      handler.pushProcessor(lreProcessor);
  +      ElemTemplateElement p = handler.getElemTemplateElement();
  +      boolean excludeXSLDecl = false;
  +      boolean isLREAsStyleSheet = false;
   
  -      Stylesheet stylesheet;
  -      try
  -      {
  -        stylesheet = new StylesheetRoot();
  -      }
  -      catch(TransformerConfigurationException tfe)
  +      if (null == p)
         {
  -        throw new SAXException(tfe);
  -      }
   
  -      // stylesheet.setDOMBackPointer(handler.getOriginatingNode());
  -	  // ***** Note that we're assigning an empty locator. Is this necessary?
  -      SAXSourceLocator slocator = new SAXSourceLocator();
  -      Locator locator = handler.getLocator();
  -      if(null != locator)
  -      {
  -        slocator.setLineNumber(locator.getLineNumber());
  -        slocator.setColumnNumber(locator.getColumnNumber());
  -        slocator.setPublicId(locator.getPublicId());
  -        slocator.setSystemId(locator.getSystemId());
  -      }
  -      stylesheet.setLocaterInfo(slocator);
  -      stylesheet.setPrefixes(handler.getNamespaceSupport());
  -      handler.pushStylesheet(stylesheet);
  -
  -      isLREAsStyleSheet = true;
  +        // Literal Result Template as stylesheet.
  +        XSLTElementProcessor lreProcessor = handler.popProcessor();
  +        XSLTElementProcessor stylesheetProcessor =
  +                                                  handler.getProcessorFor(Constants.S_XSLNAMESPACEURL, "stylesheet",
  +                                                                          "xsl:stylesheet");
   
  -      AttributesImpl stylesheetAttrs = new AttributesImpl();
  -      AttributesImpl lreAttrs = new AttributesImpl();
  -      int n = attributes.getLength();
  +        handler.pushProcessor(lreProcessor);
   
  -      for (int i = 0; i < n; i++)
  -      {
  -        String attrLocalName = attributes.getLocalName(i);
  -        String attrUri = attributes.getURI(i);
  -        String value = attributes.getValue(i);
  -
  -        if ((null != attrUri) && attrUri.equals(Constants.S_XSLNAMESPACEURL))
  +        Stylesheet stylesheet;
  +        try
           {
  -          stylesheetAttrs.addAttribute(null, attrLocalName, attrLocalName,
  -                                       attributes.getType(i),
  -                                       attributes.getValue(i));
  +          stylesheet = new StylesheetRoot();
           }
  -        else if ((attrLocalName.startsWith("xmlns:") || attrLocalName.equals(
  -                "xmlns")) && value.equals(Constants.S_XSLNAMESPACEURL))
  +        catch(TransformerConfigurationException tfe)
           {
  -
  -          // ignore
  +          throw new TransformerException(tfe);
           }
  -        else
  +
  +        // stylesheet.setDOMBackPointer(handler.getOriginatingNode());
  +        // ***** Note that we're assigning an empty locator. Is this necessary?
  +        SAXSourceLocator slocator = new SAXSourceLocator();
  +        Locator locator = handler.getLocator();
  +        if(null != locator)
           {
  -          lreAttrs.addAttribute(attrUri, attrLocalName,
  -                                attributes.getQName(i),
  -                                attributes.getType(i),
  -                                attributes.getValue(i));
  +          slocator.setLineNumber(locator.getLineNumber());
  +          slocator.setColumnNumber(locator.getColumnNumber());
  +          slocator.setPublicId(locator.getPublicId());
  +          slocator.setSystemId(locator.getSystemId());
           }
  -      }
  -
  -      attributes = lreAttrs;
  +        stylesheet.setLocaterInfo(slocator);
  +        stylesheet.setPrefixes(handler.getNamespaceSupport());
  +        handler.pushStylesheet(stylesheet);
   
  -      // Set properties from the attributes, but don't throw 
  -      // an error if there is an attribute defined that is not 
  -      // allowed on a stylesheet.
  -      stylesheetProcessor.setPropertiesFromAttributes(handler, "stylesheet",
  -              stylesheetAttrs, stylesheet);
  -      handler.pushElemTemplateElement(stylesheet);
  +        isLREAsStyleSheet = true;
   
  -      ElemTemplate template = new ElemTemplate();
  +        AttributesImpl stylesheetAttrs = new AttributesImpl();
  +        AttributesImpl lreAttrs = new AttributesImpl();
  +        int n = attributes.getLength();
   
  -      appendAndPush(handler, template);
  +        for (int i = 0; i < n; i++)
  +        {
  +          String attrLocalName = attributes.getLocalName(i);
  +          String attrUri = attributes.getURI(i);
  +          String value = attributes.getValue(i);
  +
  +          if ((null != attrUri) && attrUri.equals(Constants.S_XSLNAMESPACEURL))
  +          {
  +            stylesheetAttrs.addAttribute(null, attrLocalName, attrLocalName,
  +                                         attributes.getType(i),
  +                                         attributes.getValue(i));
  +          }
  +          else if ((attrLocalName.startsWith("xmlns:") || attrLocalName.equals(
  +                                                                               "xmlns")) && value.equals(Constants.S_XSLNAMESPACEURL))
  +          {
  +
  +            // ignore
  +          }
  +          else
  +          {
  +            lreAttrs.addAttribute(attrUri, attrLocalName,
  +                                  attributes.getQName(i),
  +                                  attributes.getType(i),
  +                                  attributes.getValue(i));
  +          }
  +        }
   
  -      XPath rootMatch = new XPath("/", stylesheet, stylesheet, XPath.MATCH);
  +        attributes = lreAttrs;
   
  -      template.setMatch(rootMatch);
  +        // Set properties from the attributes, but don't throw 
  +        // an error if there is an attribute defined that is not 
  +        // allowed on a stylesheet.
  +        stylesheetProcessor.setPropertiesFromAttributes(handler, "stylesheet",
  +                                                        stylesheetAttrs, stylesheet);
  +        handler.pushElemTemplateElement(stylesheet);
   
  -      // template.setDOMBackPointer(handler.getOriginatingNode());
  -      stylesheet.setTemplate(template);
  +        ElemTemplate template = new ElemTemplate();
   
  -      p = handler.getElemTemplateElement();
  -      excludeXSLDecl = true;
  -    }
  +        appendAndPush(handler, template);
   
  -    XSLTElementDef def = getElemDef();
  -    Class classObject = def.getClassObject();
  -    boolean isExtension = false;
  -    boolean isComponentDecl = false;
  -    boolean isUnknownTopLevel = false;
  +        XPath rootMatch = new XPath("/", stylesheet, stylesheet, XPath.MATCH);
   
  -    while (null != p)
  -    {
  +        template.setMatch(rootMatch);
   
  -      // System.out.println("Checking: "+p);
  -      if (p instanceof ElemLiteralResult)
  -      {
  -        ElemLiteralResult parentElem = (ElemLiteralResult) p;
  +        // template.setDOMBackPointer(handler.getOriginatingNode());
  +        stylesheet.setTemplate(template);
   
  -        isExtension = parentElem.containsExtensionElementURI(uri);
  +        p = handler.getElemTemplateElement();
  +        excludeXSLDecl = true;
         }
  -      else if (p instanceof Stylesheet)
  -      {
  -        Stylesheet parentElem = (Stylesheet) p;
  +
  +      XSLTElementDef def = getElemDef();
  +      Class classObject = def.getClassObject();
  +      boolean isExtension = false;
  +      boolean isComponentDecl = false;
  +      boolean isUnknownTopLevel = false;
   
  -        isExtension = parentElem.containsExtensionElementURI(uri);
  +      while (null != p)
  +      {
   
  -        if ((false == isExtension) && (null != uri)
  -                && uri.equals(Constants.S_BUILTIN_EXTENSIONS_URL))
  +        // System.out.println("Checking: "+p);
  +        if (p instanceof ElemLiteralResult)
           {
  -          isComponentDecl = true;
  +          ElemLiteralResult parentElem = (ElemLiteralResult) p;
  +
  +          isExtension = parentElem.containsExtensionElementURI(uri);
           }
  -        else
  +        else if (p instanceof Stylesheet)
           {
  -          isUnknownTopLevel = true;
  +          Stylesheet parentElem = (Stylesheet) p;
  +
  +          isExtension = parentElem.containsExtensionElementURI(uri);
  +
  +          if ((false == isExtension) && (null != uri)
  +              && uri.equals(Constants.S_BUILTIN_EXTENSIONS_URL))
  +          {
  +            isComponentDecl = true;
  +          }
  +          else
  +          {
  +            isUnknownTopLevel = true;
  +          }
           }
  -      }
   
  -      if (isExtension)
  -        break;
  +        if (isExtension)
  +          break;
   
  -      p = p.getParentElem();
  -    }
  +        p = p.getParentElem();
  +      }
   
  -    ElemTemplateElement elem = null;
  +      ElemTemplateElement elem = null;
   
  -    try
  -    {
  -      if (isExtension)
  +      try
         {
  +        if (isExtension)
  +        {
   
  -        // System.out.println("Creating extension(1): "+uri);
  -        elem = new ElemExtensionCall();
  -      }
  -      else if (isComponentDecl)
  -      {
  -        elem = (ElemTemplateElement) classObject.newInstance();
  -      }
  -      else if (isUnknownTopLevel)
  -      {
  +          // System.out.println("Creating extension(1): "+uri);
  +          elem = new ElemExtensionCall();
  +        }
  +        else if (isComponentDecl)
  +        {
  +          elem = (ElemTemplateElement) classObject.newInstance();
  +        }
  +        else if (isUnknownTopLevel)
  +        {
   
  -        // TBD: Investigate, not sure about this.  -sb
  -        elem = (ElemTemplateElement) classObject.newInstance();
  +          // TBD: Investigate, not sure about this.  -sb
  +          elem = (ElemTemplateElement) classObject.newInstance();
  +        }
  +        else
  +        {
  +          elem = (ElemTemplateElement) classObject.newInstance();
  +        }
  +
  +        elem.setDOMBackPointer(handler.getOriginatingNode());
  +        elem.setLocaterInfo(handler.getLocator());
  +        elem.setPrefixes(handler.getNamespaceSupport(), excludeXSLDecl);
  +
  +        if (elem instanceof ElemLiteralResult)
  +        {
  +          ((ElemLiteralResult) elem).setNamespace(uri);
  +          ((ElemLiteralResult) elem).setLocalName(localName);
  +          ((ElemLiteralResult) elem).setRawName(rawName);
  +          ((ElemLiteralResult) elem).setIsLiteralResultAsStylesheet(
  +                                                                    isLREAsStyleSheet);
  +        }
         }
  -      else
  +      catch (InstantiationException ie)
         {
  -        elem = (ElemTemplateElement) classObject.newInstance();
  +        handler.error("Failed creating ElemLiteralResult instance!", ie);
         }
  -
  -      elem.setDOMBackPointer(handler.getOriginatingNode());
  -      elem.setLocaterInfo(handler.getLocator());
  -      elem.setPrefixes(handler.getNamespaceSupport(), excludeXSLDecl);
  -
  -      if (elem instanceof ElemLiteralResult)
  +      catch (IllegalAccessException iae)
         {
  -        ((ElemLiteralResult) elem).setNamespace(uri);
  -        ((ElemLiteralResult) elem).setLocalName(localName);
  -        ((ElemLiteralResult) elem).setRawName(rawName);
  -        ((ElemLiteralResult) elem).setIsLiteralResultAsStylesheet(
  -          isLREAsStyleSheet);
  +        handler.error("Failed creating ElemLiteralResult instance!", iae);
         }
  -    }
  -    catch (InstantiationException ie)
  -    {
  -      handler.error("Failed creating ElemLiteralResult instance!", ie);
  -    }
  -    catch (IllegalAccessException iae)
  -    {
  -      handler.error("Failed creating ElemLiteralResult instance!", iae);
  -    }
   
  -    setPropertiesFromAttributes(handler, rawName, attributes, elem);
  -
  -    // bit of a hack here...
  -    if (!isExtension && (elem instanceof ElemLiteralResult))
  -    {
  -      isExtension =
  -        ((ElemLiteralResult) elem).containsExtensionElementURI(uri);
  +      setPropertiesFromAttributes(handler, rawName, attributes, elem);
   
  -      if (isExtension)
  +      // bit of a hack here...
  +      if (!isExtension && (elem instanceof ElemLiteralResult))
         {
  +        isExtension =
  +                     ((ElemLiteralResult) elem).containsExtensionElementURI(uri);
   
  -        // System.out.println("Creating extension(2): "+uri);
  -        elem = new ElemExtensionCall();
  +        if (isExtension)
  +        {
   
  -        elem.setLocaterInfo(handler.getLocator());
  -        elem.setPrefixes(handler.getNamespaceSupport());
  -        ((ElemLiteralResult) elem).setNamespace(uri);
  -        ((ElemLiteralResult) elem).setLocalName(localName);
  -        ((ElemLiteralResult) elem).setRawName(rawName);
  -        setPropertiesFromAttributes(handler, rawName, attributes, elem);
  +          // System.out.println("Creating extension(2): "+uri);
  +          elem = new ElemExtensionCall();
  +
  +          elem.setLocaterInfo(handler.getLocator());
  +          elem.setPrefixes(handler.getNamespaceSupport());
  +          ((ElemLiteralResult) elem).setNamespace(uri);
  +          ((ElemLiteralResult) elem).setLocalName(localName);
  +          ((ElemLiteralResult) elem).setRawName(rawName);
  +          setPropertiesFromAttributes(handler, rawName, attributes, elem);
  +        }
         }
  -    }
   
  -    appendAndPush(handler, elem);
  +      appendAndPush(handler, elem);
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  @@ -320,15 +322,10 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#endElement
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       ElemTemplateElement elem = handler.getElemTemplateElement();
  
  
  
  1.4       +2 -11     xml-xalan/java/src/org/apache/xalan/processor/ProcessorNamespaceAlias.java
  
  Index: ProcessorNamespaceAlias.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorNamespaceAlias.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorNamespaceAlias.java	2000/11/03 23:28:03	1.3
  +++ ProcessorNamespaceAlias.java	2000/11/13 16:26:50	1.4
  @@ -58,7 +58,7 @@
   
   import org.apache.xalan.templates.NamespaceAlias;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   /**
  @@ -94,19 +94,10 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.apache.xalan.processor.StylesheetHandler#startElement
  -   * @see org.apache.xalan.processor.StylesheetHandler#endElement
  -   * @see org.xml.sax.ContentHandler#startElement
  -   * @see org.xml.sax.ContentHandler#endElement
  -   * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       NamespaceAlias na = new NamespaceAlias();
  
  
  
  1.6       +3 -12     xml-xalan/java/src/org/apache/xalan/processor/ProcessorOutputElem.java
  
  Index: ProcessorOutputElem.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorOutputElem.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProcessorOutputElem.java	2000/11/03 23:28:03	1.5
  +++ ProcessorOutputElem.java	2000/11/13 16:26:50	1.6
  @@ -56,7 +56,7 @@
    */
   package org.apache.xalan.processor;
   
  -import org.apache.serialize.OutputFormat;
  +import org.apache.xalan.serialize.OutputFormat;
   
   import java.util.Hashtable;
   
  @@ -64,7 +64,7 @@
   import org.apache.xalan.templates.StylesheetRoot;
   import org.apache.xalan.templates.Stylesheet;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   /**
  @@ -91,19 +91,10 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.apache.xalan.processor.StylesheetHandler#startElement
  -   * @see org.apache.xalan.processor.StylesheetHandler#endElement
  -   * @see org.xml.sax.ContentHandler#startElement
  -   * @see org.xml.sax.ContentHandler#endElement
  -   * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       OutputFormatExtended ofe = new OutputFormatExtended();
  
  
  
  1.4       +2 -11     xml-xalan/java/src/org/apache/xalan/processor/ProcessorPreserveSpace.java
  
  Index: ProcessorPreserveSpace.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorPreserveSpace.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorPreserveSpace.java	2000/11/03 23:28:03	1.3
  +++ ProcessorPreserveSpace.java	2000/11/13 16:26:50	1.4
  @@ -56,7 +56,7 @@
    */
   package org.apache.xalan.processor;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   import java.util.Vector;
  @@ -113,19 +113,10 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.apache.xalan.processor.StylesheetHandler#startElement
  -   * @see org.apache.xalan.processor.StylesheetHandler#endElement
  -   * @see org.xml.sax.ContentHandler#startElement
  -   * @see org.xml.sax.ContentHandler#endElement
  -   * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       setPropertiesFromAttributes(handler, rawName, attributes, this);
       handler.getStylesheet().setPreserveSpaces(getElements());
  
  
  
  1.4       +2 -11     xml-xalan/java/src/org/apache/xalan/processor/ProcessorStripSpace.java
  
  Index: ProcessorStripSpace.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorStripSpace.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorStripSpace.java	2000/11/03 23:28:03	1.3
  +++ ProcessorStripSpace.java	2000/11/13 16:26:50	1.4
  @@ -56,7 +56,7 @@
    */
   package org.apache.xalan.processor;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   import java.util.Vector;
  @@ -87,19 +87,10 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.apache.xalan.processor.StylesheetHandler#startElement
  -   * @see org.apache.xalan.processor.StylesheetHandler#endElement
  -   * @see org.xml.sax.ContentHandler#startElement
  -   * @see org.xml.sax.ContentHandler#endElement
  -   * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       setPropertiesFromAttributes(handler, rawName, attributes, this);
       handler.getStylesheet().setStripSpaces(getElements());
  
  
  
  1.5       +42 -49    xml-xalan/java/src/org/apache/xalan/processor/ProcessorStylesheetElement.java
  
  Index: ProcessorStylesheetElement.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorStylesheetElement.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProcessorStylesheetElement.java	2000/11/03 23:28:03	1.4
  +++ ProcessorStylesheetElement.java	2000/11/13 16:26:50	1.5
  @@ -60,7 +60,7 @@
   import org.apache.xalan.templates.Stylesheet;
   import org.apache.xalan.templates.StylesheetComposed;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   import javax.xml.transform.TransformerConfigurationException;
  @@ -89,62 +89,60 @@
      *        there are no attributes, it shall be an empty
      *        Attributes object.
      * NEEDSDOC @param attributes
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.apache.xalan.processor.StylesheetHandler#startElement
  -   * @see org.apache.xalan.processor.StylesheetHandler#endElement
  -   * @see org.xml.sax.ContentHandler#startElement
  -   * @see org.xml.sax.ContentHandler#endElement
  -   * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
  -
  -    int stylesheetType = handler.getStylesheetType();
  -    Stylesheet stylesheet;
   
  -    if (stylesheetType == StylesheetHandler.STYPE_ROOT)
  -    {
  -      try
  -      {
  -        stylesheet = new StylesheetRoot();
  -      }
  -      catch(TransformerConfigurationException tfe)
  -      {
  -        throw new SAXException(tfe);
  -      }
  -    }
  -    else
  +    try
       {
  -      Stylesheet parent = handler.getStylesheet();
  +      int stylesheetType = handler.getStylesheetType();
  +      Stylesheet stylesheet;
   
  -      if (stylesheetType == StylesheetHandler.STYPE_IMPORT)
  +      if (stylesheetType == StylesheetHandler.STYPE_ROOT)
         {
  -        StylesheetComposed sc = new StylesheetComposed(parent);
  -
  -        parent.setImport(sc);
  -
  -        stylesheet = sc;
  +        try
  +        {
  +          stylesheet = new StylesheetRoot();
  +        }
  +        catch(TransformerConfigurationException tfe)
  +        {
  +          throw new TransformerException(tfe);
  +        }
         }
         else
         {
  -        stylesheet = new Stylesheet(parent);
  +        Stylesheet parent = handler.getStylesheet();
   
  -        parent.setInclude(stylesheet);
  +        if (stylesheetType == StylesheetHandler.STYPE_IMPORT)
  +        {
  +          StylesheetComposed sc = new StylesheetComposed(parent);
  +
  +          parent.setImport(sc);
  +
  +          stylesheet = sc;
  +        }
  +        else
  +        {
  +          stylesheet = new Stylesheet(parent);
  +
  +          parent.setInclude(stylesheet);
  +        }
         }
  -    }
   
  -    stylesheet.setDOMBackPointer(handler.getOriginatingNode());
  -    stylesheet.setLocaterInfo(handler.getLocator());
  -    stylesheet.setPrefixes(handler.getNamespaceSupport());
  -    handler.pushStylesheet(stylesheet);
  -    setPropertiesFromAttributes(handler, rawName, attributes,
  -                                handler.getStylesheet());
  -    handler.pushElemTemplateElement(handler.getStylesheet());
  +      stylesheet.setDOMBackPointer(handler.getOriginatingNode());
  +      stylesheet.setLocaterInfo(handler.getLocator());
  +      stylesheet.setPrefixes(handler.getNamespaceSupport());
  +      handler.pushStylesheet(stylesheet);
  +      setPropertiesFromAttributes(handler, rawName, attributes,
  +                                  handler.getStylesheet());
  +      handler.pushElemTemplateElement(handler.getStylesheet());
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  @@ -157,15 +155,10 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#endElement
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       handler.popElemTemplateElement();
       handler.popStylesheet();
  
  
  
  1.5       +3 -3      xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplate.java
  
  Index: ProcessorTemplate.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplate.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProcessorTemplate.java	2000/11/03 23:28:03	1.4
  +++ ProcessorTemplate.java	2000/11/13 16:26:50	1.5
  @@ -59,7 +59,7 @@
   import org.apache.xalan.templates.ElemTemplate;
   import org.apache.xalan.templates.ElemTemplateElement;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   /**
  @@ -76,11 +76,11 @@
      * NEEDSDOC @param handler
      * NEEDSDOC @param elem
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       super.appendAndPush(handler, elem);
  
  
  
  1.5       +30 -33    xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplateElem.java
  
  Index: ProcessorTemplateElem.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplateElem.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProcessorTemplateElem.java	2000/10/30 18:40:40	1.4
  +++ ProcessorTemplateElem.java	2000/11/13 16:26:50	1.5
  @@ -58,7 +58,7 @@
   
   import org.apache.xalan.templates.ElemTemplateElement;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   import java.lang.reflect.Method;
  @@ -87,41 +87,43 @@
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
      * @param attributes The specified or defaulted attributes.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#startElement
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
  -    // ElemTemplateElement parent = handler.getElemTemplateElement();
  -    XSLTElementDef def = getElemDef();
  -    Class classObject = def.getClassObject();
  -    ElemTemplateElement elem = null;
  -
       try
       {
  -      elem = (ElemTemplateElement) classObject.newInstance();
  +      // ElemTemplateElement parent = handler.getElemTemplateElement();
  +      XSLTElementDef def = getElemDef();
  +      Class classObject = def.getClassObject();
  +      ElemTemplateElement elem = null;
  +
  +      try
  +      {
  +        elem = (ElemTemplateElement) classObject.newInstance();
  +
  +        elem.setDOMBackPointer(handler.getOriginatingNode());
  +        elem.setLocaterInfo(handler.getLocator());
  +        elem.setPrefixes(handler.getNamespaceSupport());
  +      }
  +      catch (InstantiationException ie)
  +      {
  +        handler.error("Failed creating ElemTemplateElement instance!", ie);
  +      }
  +      catch (IllegalAccessException iae)
  +      {
  +        handler.error("Failed creating ElemTemplateElement instance!", iae);
  +      }
   
  -      elem.setDOMBackPointer(handler.getOriginatingNode());
  -      elem.setLocaterInfo(handler.getLocator());
  -      elem.setPrefixes(handler.getNamespaceSupport());
  -    }
  -    catch (InstantiationException ie)
  -    {
  -      handler.error("Failed creating ElemTemplateElement instance!", ie);
  +      setPropertiesFromAttributes(handler, rawName, attributes, elem);
  +      appendAndPush(handler, elem);
       }
  -    catch (IllegalAccessException iae)
  +    catch(TransformerException te)
       {
  -      handler.error("Failed creating ElemTemplateElement instance!", iae);
  +      throw new org.xml.sax.SAXException(te);
       }
  -
  -    setPropertiesFromAttributes(handler, rawName, attributes, elem);
  -    appendAndPush(handler, elem);
     }
   
     /**
  @@ -132,11 +134,11 @@
      * NEEDSDOC @param handler
      * NEEDSDOC @param elem
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       ElemTemplateElement parent = handler.getElemTemplateElement();
  @@ -155,15 +157,10 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#endElement
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       handler.popElemTemplateElement();
     }
  
  
  
  1.4       +7 -11     xml-xalan/java/src/org/apache/xalan/processor/ProcessorText.java
  
  Index: ProcessorText.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorText.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorText.java	2000/10/30 18:40:41	1.3
  +++ ProcessorText.java	2000/11/13 16:26:50	1.4
  @@ -59,7 +59,7 @@
   import org.apache.xalan.templates.ElemTemplateElement;
   import org.apache.xalan.templates.ElemText;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * Process xsl:text.
  @@ -77,11 +77,11 @@
      * NEEDSDOC @param handler
      * NEEDSDOC @param elem
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       // Don't push this element onto the element stack.
  @@ -106,20 +106,16 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#endElement
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
  -    ProcessorCharacters charProcessor =
  -      (ProcessorCharacters) handler.getProcessorFor(null, "text()", "text");
  +    ProcessorCharacters charProcessor 
  +      = (ProcessorCharacters) handler.getProcessorFor(null, "text()", "text");
   
       charProcessor.setXslTextElement(null);
  +
     }
   }
  
  
  
  1.3       +3 -13     xml-xalan/java/src/org/apache/xalan/processor/ProcessorUnknown.java
  
  Index: ProcessorUnknown.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorUnknown.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProcessorUnknown.java	2000/10/30 18:40:41	1.2
  +++ ProcessorUnknown.java	2000/11/13 16:26:50	1.3
  @@ -65,7 +65,7 @@
   import org.apache.xpath.XPath;
   import org.apache.xalan.templates.StylesheetRoot;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   /**
  @@ -85,15 +85,10 @@
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
      * @param attributes The specified or defaulted attributes.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#startElement
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException{}
  +            throws org.xml.sax.SAXException{}
   
     /**
      * Receive notification of the end of an element.
  @@ -105,13 +100,8 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#endElement
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException{}
  +            throws org.xml.sax.SAXException{}
   }
  
  
  
  1.3       +1 -3      xml-xalan/java/src/org/apache/xalan/processor/StopParseException.java
  
  Index: StopParseException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/StopParseException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StopParseException.java	2000/10/30 18:40:41	1.2
  +++ StopParseException.java	2000/11/13 16:26:50	1.3
  @@ -56,13 +56,11 @@
    */
   package org.apache.xalan.processor;
   
  -import org.xml.sax.SAXException;
  -
   /**
    * <meta name="usage" content="internal"/>
    * NEEDSDOC Class StopParseException <needs-comment/>
    */
  -public class StopParseException extends SAXException
  +public class StopParseException extends org.xml.sax.SAXException
   {
   
     /**
  
  
  
  1.20      +125 -116  xml-xalan/java/src/org/apache/xalan/processor/StylesheetHandler.java
  
  Index: StylesheetHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/StylesheetHandler.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- StylesheetHandler.java	2000/11/09 18:30:30	1.19
  +++ StylesheetHandler.java	2000/11/13 16:26:50	1.20
  @@ -57,6 +57,7 @@
   package org.apache.xalan.processor;
   
   import java.net.URL;
  +import java.io.IOException;
   
   import javax.xml.transform.sax.TemplatesHandler;
   import javax.xml.transform.Templates;
  @@ -91,17 +92,15 @@
   import org.xml.sax.ContentHandler;
   import org.xml.sax.DTDHandler;
   import org.xml.sax.EntityResolver;
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.ErrorHandler;
   import org.xml.sax.InputSource;
   import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
   
   import org.xml.sax.helpers.NamespaceSupport;
   import org.xml.sax.helpers.DefaultHandler;
   
   import javax.xml.transform.SourceLocator;
  +import javax.xml.transform.ErrorListener;
  +import javax.xml.transform.TransformerException;
   import org.apache.xalan.utils.SAXSourceLocator;
   
   /**
  @@ -188,9 +187,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XPath createXPath(String str) throws org.xml.sax.SAXException
  +  public XPath createXPath(String str) throws javax.xml.transform.TransformerException
     {
       return new XPath(str, getLocator(), this, XPath.SELECT);
     }
  @@ -202,9 +201,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  XPath createMatchPatternXPath(String str) throws org.xml.sax.SAXException
  +  XPath createMatchPatternXPath(String str) throws javax.xml.transform.TransformerException
     {
       return new XPath(str, getLocator(), this, XPath.MATCH);
     }
  @@ -311,7 +310,7 @@
      * resolve relative URLs in the stylesheet.
      * @param baseID Base URL for this stylesheet.
      */
  -  public void setBaseID(String baseID)
  +  public void setSystemID(String baseID)
     {
       pushBaseIndentifier(baseID);
     }
  @@ -323,26 +322,17 @@
     /**
      * Resolve an external entity.
      *
  -   * <p>Always return null, so that the parser will use the system
  -   * identifier provided in the XML document.  This method implements
  -   * the SAX default behaviour: application writers can override it
  -   * in a subclass to do special translations such as catalog lookups
  -   * or URI redirection.</p>
  -   *
      * @param publicId The public identifer, or null if none is
      *                 available.
      * @param systemId The system identifier provided in the XML
      *                 document.
      * @return The new input source, or null to require the
      *         default behaviour.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.EntityResolver#resolveEntity
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public InputSource resolveEntity(String publicId, String systemId)
  -          throws SAXException
  +    throws org.xml.sax.SAXException
     {
       return getCurrentProcessor().resolveEntity(this, publicId, systemId);
     }
  @@ -396,10 +386,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     XSLTElementProcessor getProcessorFor(
  -          String uri, String localName, String rawName) throws SAXException
  +          String uri, String localName, String rawName) 
  +    throws org.xml.sax.SAXException
     {
   
       XSLTElementProcessor currentProcessor = getCurrentProcessor();
  @@ -407,8 +398,8 @@
       XSLTElementProcessor elemProcessor = def.getProcessorFor(uri, localName);
   
       if (null == elemProcessor
  -            && Double.valueOf(getStylesheet().getVersion()).doubleValue()
  -               > Constants.XSLTVERSUPPORTED)
  +        && Double.valueOf(getStylesheet().getVersion()).doubleValue()
  +           > Constants.XSLTVERSUPPORTED)
       {
         elemProcessor = def.getProcessorForUnknown(uri, localName);
       }
  @@ -450,13 +441,13 @@
     /**
      * Receive notification of the beginning of the document.
      *
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#startDocument
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void startDocument() throws SAXException
  +  public void startDocument() throws org.xml.sax.SAXException
     {
       m_stylesheetLevel++;
     }
  @@ -481,40 +472,47 @@
     /**
      * Receive notification of the end of the document.
      *
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#endDocument
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void endDocument() throws SAXException
  +  public void endDocument() throws org.xml.sax.SAXException
     {
  -
  -    if (null != getStylesheetRoot())
  +    try
       {
  -      if (0 == m_stylesheetLevel)
  -        getStylesheetRoot().recompose();
  +      if (null != getStylesheetRoot())
  +      {
  +        if (0 == m_stylesheetLevel)
  +          getStylesheetRoot().recompose();
   
  -      // Resolve the result prefix tables in the elements.
  -      if(null != getLastPoppedStylesheet())
  -        getLastPoppedStylesheet().resolvePrefixTables();
  -    }
  -    else
  -      throw new SAXException("Did not find the stylesheet root!");
  +        // Resolve the result prefix tables in the elements.
  +        if(null != getLastPoppedStylesheet())
  +          getLastPoppedStylesheet().resolvePrefixTables();
  +      }
  +      else
  +        throw new TransformerException("Did not find the stylesheet root!");
   
  -    XSLTElementProcessor elemProcessor = getCurrentProcessor();
  +      XSLTElementProcessor elemProcessor = getCurrentProcessor();
   
  -    if (null != elemProcessor)
  -      elemProcessor.startNonText(this);
  +      if (null != elemProcessor)
  +        elemProcessor.startNonText(this);
   
  -    m_stylesheetLevel--;
  -	
  -	// WARNING: This test works only as long as stylesheets are parsed
  -	// more or less recursively. If we switch to an iterative "work-list"
  -	// model, this will become true prematurely. In that case, 
  -	// isStylesheetParsingComplete() will have to be adjusted to be aware
  -	// of the worklist.
  -	m_parsingComplete=(m_stylesheetLevel<0);
  +      m_stylesheetLevel--;
  +      
  +      // WARNING: This test works only as long as stylesheets are parsed
  +      // more or less recursively. If we switch to an iterative "work-list"
  +      // model, this will become true prematurely. In that case, 
  +      // isStylesheetParsingComplete() will have to be adjusted to be aware
  +      // of the worklist.
  +      m_parsingComplete=(m_stylesheetLevel<0);
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
  +
     }
   
     /**
  @@ -527,14 +525,14 @@
      *
      * @param prefix The Namespace prefix being declared.
      * @param uri The Namespace URI mapped to the prefix.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#startPrefixMapping
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void startPrefixMapping(String prefix, String uri)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       // m_nsSupport.pushContext();
  @@ -550,13 +548,13 @@
      * output to a file).</p>
      *
      * @param prefix The Namespace prefix being declared.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#endPrefixMapping
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void endPrefixMapping(String prefix) throws SAXException
  +  public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException
     {
   
       // m_nsSupport.popContext();
  @@ -565,9 +563,9 @@
     /**
      * Flush the characters buffer.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  private void flushCharacters() throws SAXException
  +  private void flushCharacters() throws org.xml.sax.SAXException
     {
   
       XSLTElementProcessor elemProcessor = getCurrentProcessor();
  @@ -585,15 +583,10 @@
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
      * @param attributes The specified or defaulted attributes.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#startElement
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       m_elementID++;
  @@ -606,11 +599,12 @@
       flushCharacters();
   
       XSLTElementProcessor elemProcessor = getProcessorFor(uri, localName,
  -                                           rawName);
  +                                                         rawName);
   
       this.pushProcessor(elemProcessor);
       elemProcessor.startElement(this, uri, localName, rawName, attributes);
       this.getNamespaceSupport().pushContext();
  +
     }
   
     /**
  @@ -622,14 +616,14 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#endElement
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void endElement(String uri, String localName, String rawName)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       m_elementID--;
  @@ -656,13 +650,14 @@
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
      *               character array.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#characters
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void characters(char ch[], int start, int length) throws SAXException
  +  public void characters(char ch[], int start, int length) 
  +    throws org.xml.sax.SAXException
     {
   
       if (!m_shouldProcess)
  @@ -694,14 +689,14 @@
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
      *               character array.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#ignorableWhitespace
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void ignorableWhitespace(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       if (!m_shouldProcess)
  @@ -721,14 +716,14 @@
      * @param target The processing instruction target.
      * @param data The processing instruction data, or null if
      *             none is supplied.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#processingInstruction
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void processingInstruction(String target, String data)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       if (!m_shouldProcess)
  @@ -747,13 +742,13 @@
      * invoking other methods.</p>
      *
      * @param name The name of the skipped entity.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#processingInstruction
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void skippedEntity(String name) throws SAXException
  +  public void skippedEntity(String name) throws org.xml.sax.SAXException
     {
   
       if (!m_shouldProcess)
  @@ -762,10 +757,6 @@
       getCurrentProcessor().skippedEntity(this, name);
     }
   
  -  ////////////////////////////////////////////////////////////////////
  -  // Implementation of the ErrorHandler interface.
  -  ////////////////////////////////////////////////////////////////////
  -
     /**
      * <meta name="usage" content="internal"/>
      * Warn the user of an problem.
  @@ -775,17 +766,24 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void warn(int msg, Object args[]) throws SAXException
  +  public void warn(int msg, Object args[]) throws org.xml.sax.SAXException
     {
   
       String formattedMsg = m_XSLMessages.createWarning(msg, args);
       SAXSourceLocator locator = getLocator();
  -    ErrorHandler handler = m_stylesheetProcessor.getErrorHandler();
  +    ErrorListener handler = m_stylesheetProcessor.getErrorListener();
   
  -    if (null != handler)
  -      handler.warning(new SAXParseException(formattedMsg, locator));
  +    try
  +    {
  +      if (null != handler)
  +        handler.warning(new TransformerException(formattedMsg, locator));
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  @@ -812,21 +810,36 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  protected void error(String msg, Exception e) throws SAXException
  +  protected void error(String msg, Exception e) throws org.xml.sax.SAXException
     {
   
       SAXSourceLocator locator = getLocator();
  -    ErrorHandler handler = m_stylesheetProcessor.getErrorHandler();
  -    SAXParseException pe = (null == e)
  -                            ? new SAXParseException(msg, locator)
  -                            : new SAXParseException(msg, locator, e);
  +    ErrorListener handler = m_stylesheetProcessor.getErrorListener();
  +    TransformerException pe;
  +    if(!(e instanceof TransformerException))
  +    {
  +      pe = (null == e)
  +           ? new TransformerException(msg, locator)
  +             : new TransformerException(msg, locator, e);
  +    }
  +    else
  +      pe = (TransformerException)e;
   
       if (null != handler)
  -      handler.fatalError(pe);
  +    {
  +      try
  +      {
  +        handler.fatalError(pe);
  +      }
  +      catch(TransformerException te)
  +      {
  +        throw new org.xml.sax.SAXException(te);
  +      }
  +    }
       else
  -      throw pe;
  +      throw new org.xml.sax.SAXException(pe);
     }
   
     /**
  @@ -840,10 +853,10 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected void error(int msg, Object args[], Exception e)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       String formattedMsg = m_XSLMessages.createMessage(msg, args);
  @@ -855,14 +868,13 @@
      * Receive notification of a parser warning.
      *
      * @param e The warning information encoded as an exception.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
  -   * @see org.xml.sax.ErrorHandler#warning
  -   * @see org.xml.sax.SAXParseException
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void warning(SAXParseException e) throws SAXException
  +  public void warning(org.xml.sax.SAXParseException e) 
  +    throws org.xml.sax.SAXException
     {
   
       // Need to set up a diagnosticsWriter here?
  @@ -876,14 +888,13 @@
      * Receive notification of a recoverable parser error.
      *
      * @param e The warning information encoded as an exception.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
  -   * @see org.xml.sax.ErrorHandler#warning
  -   * @see org.xml.sax.SAXParseException
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void error(SAXParseException e) throws SAXException
  +  public void error(org.xml.sax.SAXParseException e) 
  +    throws org.xml.sax.SAXException
     {
   
       // Need to set up a diagnosticsWriter here?
  @@ -896,7 +907,7 @@
     /**
      * Report a fatal XML parsing error.
      *
  -   * <p>The default implementation throws a SAXParseException.
  +   * <p>The default implementation throws a TransformerException.
      * Application writers may override this method in a subclass if
      * they need to take specific actions for each fatal error (such as
      * collecting all of the errors into a single report): in any case,
  @@ -905,14 +916,12 @@
      * the parser may no longer report parsing events.</p>
      *
      * @param e The error information encoded as an exception.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
  -   * @see org.xml.sax.ErrorHandler#fatalError
  -   * @see org.xml.sax.SAXParseException
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void fatalError(SAXParseException e) throws SAXException
  +  public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
     {
       throw e;
     }
  
  
  
  1.5       +15 -8     xml-xalan/java/src/org/apache/xalan/processor/StylesheetPIHandler.java
  
  Index: StylesheetPIHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/StylesheetPIHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StylesheetPIHandler.java	2000/11/03 23:28:03	1.4
  +++ StylesheetPIHandler.java	2000/11/13 16:26:51	1.5
  @@ -57,7 +57,7 @@
   package org.apache.xalan.processor;
   
   import org.xml.sax.helpers.DefaultHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.InputSource;
   import org.xml.sax.Attributes;
   
  @@ -138,15 +138,15 @@
      * @param target The processing instruction target.
      * @param data The processing instruction data, or null if
      *             none is supplied.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#processingInstruction
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      * @see <a href="http://www.w3.org/TR/xml-stylesheet/">Associating Style Sheets with XML documents, Version 1.0</a>
      */
     public void processingInstruction(String target, String data)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       if (target.equals("xml-stylesheet"))
  @@ -173,7 +173,14 @@
           {
             href = tokenizer.nextToken();
             href = href.substring(1, href.length() - 1);
  -          href = SystemIDResolver.getAbsoluteURI(href, m_baseID);
  +          try
  +          {
  +            href = SystemIDResolver.getAbsoluteURI(href, m_baseID);
  +          }
  +          catch(TransformerException te)
  +          {
  +            throw new org.xml.sax.SAXException(te);
  +          }
           }
           else if (name.equals("title"))
           {
  @@ -241,7 +248,7 @@
   
     /**
      * The spec notes that "The xml-stylesheet processing instruction is allowed only in the prolog of an XML document.",
  -   * so, at least for right now, I'm going to go ahead an throw a SAXException
  +   * so, at least for right now, I'm going to go ahead an throw a TransformerException
      * in order to stop the parse.
      *
      * NEEDSDOC @param namespaceURI
  @@ -249,11 +256,11 @@
      * NEEDSDOC @param qName
      * NEEDSDOC @param atts
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void startElement(
             String namespaceURI, String localName, String qName, Attributes atts)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       throw new StopParseException();
     }
  
  
  
  1.5       +35 -12    xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java
  
  Index: TransformerFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TransformerFactoryImpl.java	2000/11/10 20:55:06	1.4
  +++ TransformerFactoryImpl.java	2000/11/13 16:26:51	1.5
  @@ -59,7 +59,7 @@
   import org.xml.sax.InputSource;
   import org.xml.sax.helpers.XMLReaderFactory;
   import org.xml.sax.XMLReader;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.SAXNotRecognizedException;
   import org.xml.sax.SAXNotSupportedException;
   import org.xml.sax.XMLFilter;
  @@ -68,6 +68,7 @@
   
   import org.apache.xalan.utils.TreeWalker;
   import org.apache.xalan.utils.SystemIDResolver;
  +import org.apache.xalan.utils.DefaultErrorHandler;
   import org.apache.xalan.transformer.TransformerImpl;
   import org.apache.xalan.transformer.TrAXFilter;
   
  @@ -84,6 +85,7 @@
   import javax.xml.transform.sax.SAXSource;
   import javax.xml.transform.dom.DOMSource;
   import javax.xml.transform.stream.StreamSource;
  +import javax.xml.transform.ErrorListener;
   
   import java.io.IOException;
   import java.io.InputStream;
  @@ -199,7 +201,7 @@
   
         return builder.getTemplates();
       }
  -    catch (SAXException se)
  +    catch (org.xml.sax.SAXException se)
       {
         // Should remove this later... but right now diagnostics from 
         // TransformerConfigurationException are not good.
  @@ -289,8 +291,6 @@
       {
         isource = SAXSource.sourceToInputSource(source);
         baseID = isource.getSystemId();
  -      if(source instanceof SAXSource)
  -        reader = ((SAXSource)source).getXMLReader();
       }
       
   
  @@ -324,7 +324,7 @@
   
         // OK, good.
       }
  -    catch (SAXException se)
  +    catch (org.xml.sax.SAXException se)
       {
         throw new TransformerConfigurationException("getAssociatedStylesheets failed", se);
       }
  @@ -568,7 +568,7 @@
         DOMSource dsource = (DOMSource)source;
         Node node = dsource.getNode();
         String baseID = dsource.getSystemId();
  -      builder.setBaseID(baseID);
  +      builder.setSystemID(baseID);
         return processFromNode(node, baseID);
       }
       
  @@ -576,9 +576,6 @@
       {
         InputSource isource = SAXSource.sourceToInputSource(source);
   
  -      if(null != isource)
  -        builder.setBaseID(isource.getSystemId());
  -
         XMLReader reader = null;
         if (source instanceof SAXSource)
           reader = ((SAXSource)source).getXMLReader();
  @@ -594,7 +591,7 @@
           reader.setFeature("http://apache.org/xml/features/validation/dynamic",
                             true);
         }
  -      catch (SAXException ex)
  +      catch (org.xml.sax.SAXException ex)
         {
   
           // feature not recognized
  @@ -607,7 +604,7 @@
       {
         throw new TransformerConfigurationException(ioe);
       }
  -    catch(SAXException se)
  +    catch(org.xml.sax.SAXException se)
       {
         throw new TransformerConfigurationException(se);
       }
  @@ -675,6 +672,32 @@
     {
       return m_uriResolver;
     }
  -
  +  
  +  private ErrorListener m_errorListener = new DefaultErrorHandler();
  +  
  +  /**
  +   * Get the error listener in effect for the TransformerFactory.
  +   * 
  +   * @return A non-null reference to an error listener.
  +   */
  +  public ErrorListener getErrorListener()
  +  {
  +    return m_errorListener;
  +  }
  +  
  +  /**
  +   * Set an error listener for the TransformerFactory.
  +   * 
  +   * @param listener Must be a non-null reference to an ErrorListener.
  +   * 
  +   * @throws IllegalArgumentException if the listener argument is null.
  +   */
  +  public void setErrorListener(ErrorListener listener)
  +    throws IllegalArgumentException
  +  {
  +    if(null == listener)
  +      throw new IllegalArgumentException("ErrorListener");
  +    m_errorListener = listener;
  +  }
   
   }
  
  
  
  1.11      +130 -102  xml-xalan/java/src/org/apache/xalan/processor/XSLTAttributeDef.java
  
  Index: XSLTAttributeDef.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTAttributeDef.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XSLTAttributeDef.java	2000/10/31 19:03:41	1.10
  +++ XSLTAttributeDef.java	2000/11/13 16:26:51	1.11
  @@ -77,7 +77,7 @@
   import org.apache.xalan.utils.StringVector;
   import org.apache.xpath.XPath;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * This class defines an attribute for an element in a XSLT stylesheet,
  @@ -213,54 +213,54 @@
     /** NEEDSDOC Field T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, T_CHAR, T_PRIORITY, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST, T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST          */
     static final int T_CDATA = 1,
   
  -  // <!-- Used for the type of an attribute value that is a URI reference.-->
  -  T_URL = 2,
  +    // <!-- Used for the type of an attribute value that is a URI reference.-->
  +    T_URL = 2,
   
  -  // <!-- Used for the type of an attribute value that is an
  -  // attribute value template.-->
  -  T_AVT = 3,  // Attribute Value Template
  +    // <!-- Used for the type of an attribute value that is an
  +    // attribute value template.-->
  +    T_AVT = 3,  // Attribute Value Template
   
  -  // <!-- Used for the type of an attribute value that is a pattern.-->
  -  T_PATTERN = 4,
  +    // <!-- Used for the type of an attribute value that is a pattern.-->
  +    T_PATTERN = 4,
   
  -  // <!-- Used for the type of an attribute value that is an expression.-->
  -  T_EXPR = 5,
  +    // <!-- Used for the type of an attribute value that is an expression.-->
  +    T_EXPR = 5,
   
  -  // <!-- Used for the type of an attribute value that consists
  -  // of a single character.-->
  -  T_CHAR = 6,
  +    // <!-- Used for the type of an attribute value that consists
  +    // of a single character.-->
  +    T_CHAR = 6,
   
  -  // <!-- Used for the type of an attribute value that is a priority. -->
  -  T_PRIORITY = 7,
  +    // <!-- Used for the type of an attribute value that is a priority. -->
  +    T_PRIORITY = 7,
   
  -  // Used for boolean values
  -  T_YESNO = 8,
  +    // Used for boolean values
  +    T_YESNO = 8,
   
  -  // <!-- Used for the type of an attribute value that is a QName; the prefix
  -  // gets expanded by the XSLT processor. -->
  -  T_QNAME = 9,
  +    // <!-- Used for the type of an attribute value that is a QName; the prefix
  +    // gets expanded by the XSLT processor. -->
  +    T_QNAME = 9,
   
  -  // <!-- Like qname but a whitespace-separated list of QNames. -->
  -  T_QNAMES = 10,
  +    // <!-- Like qname but a whitespace-separated list of QNames. -->
  +    T_QNAMES = 10,
   
  -  // <!-- Used for enumerated values -->
  -  T_ENUM = 11,
  +    // <!-- Used for enumerated values -->
  +    T_ENUM = 11,
   
  -  // Used for simple match patterns, i.e. xsl:strip-space spec.
  -  T_SIMPLEPATTERNLIST = 12,
  +    // Used for simple match patterns, i.e. xsl:strip-space spec.
  +    T_SIMPLEPATTERNLIST = 12,
   
  -  // Used for a known token.
  -  T_NMTOKEN = 13,
  +    // Used for a known token.
  +    T_NMTOKEN = 13,
   
  -  // Used for a list of white-space delimited strings.
  -  T_STRINGLIST = 14,
  +    // Used for a list of white-space delimited strings.
  +    T_STRINGLIST = 14,
   
  -  // Used for a list of white-space delimited strings.
  -  T_PREFIX_URLLIST = 15;
  +    // Used for a list of white-space delimited strings.
  +    T_PREFIX_URLLIST = 15;
   
     /** NEEDSDOC Field m_foreignAttr          */
     static XSLTAttributeDef m_foreignAttr = new XSLTAttributeDef("*", "*",
  -                                            XSLTAttributeDef.T_CDATA, false);
  +                                                               XSLTAttributeDef.T_CDATA, false);
   
     /**
      * The allowed namespace for this element.
  @@ -440,16 +440,23 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     AVT processAVT(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                 StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
  -
  -    AVT avt = new AVT(handler, uri, name, rawName, value);
  +    
  +    try
  +    {
  +      AVT avt = new AVT(handler, uri, name, rawName, value);
   
  -    return avt;
  +      return avt;
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  @@ -464,11 +471,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Object processCDATA(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                      StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
       return value;
     }
  @@ -485,17 +492,17 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Object processCHAR(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                     StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
   
       if (value.length() != 1)
       {
         handler.error(
  -        "An XSLT attribute of type T_CHAR must be only 1 character!", null);
  +                    "An XSLT attribute of type T_CHAR must be only 1 character!", null);
       }
   
       return new Character(value.charAt(0));
  @@ -513,11 +520,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Object processENUM(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                     StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
   
       int enum = this.getEnum(value);
  @@ -537,16 +544,23 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Object processEXPR(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                     StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
   
  -    XPath expr = handler.createXPath(value);
  +    try
  +    {
  +      XPath expr = handler.createXPath(value);
   
  -    return expr;
  +      return expr;
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  @@ -561,11 +575,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Object processNMTOKEN(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                        StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
       return value;
     }
  @@ -582,16 +596,23 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Object processPATTERN(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                        StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
   
  -    XPath pattern = handler.createMatchPatternXPath(value);
  +    try
  +    {
  +      XPath pattern = handler.createMatchPatternXPath(value);
   
  -    return pattern;
  +      return pattern;
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  @@ -606,11 +627,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Object processPRIORITY(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                         StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
       return Double.valueOf(value);
     }
  @@ -627,11 +648,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Object processQNAME(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                      StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
       return new QName(value, handler);
     }
  @@ -648,11 +669,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Vector processQNAMES(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                       StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
   
       StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
  @@ -679,25 +700,32 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Vector processSIMPLEPATTERNLIST(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                                  StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
  -
  -    StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
  -    int nPatterns = tokenizer.countTokens();
  -    Vector patterns = new Vector(nPatterns);
   
  -    for (int i = 0; i < nPatterns; i++)
  +    try
       {
  -      XPath pattern = handler.createMatchPatternXPath(tokenizer.nextToken());
  +      StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
  +      int nPatterns = tokenizer.countTokens();
  +      Vector patterns = new Vector(nPatterns);
   
  -      patterns.addElement(pattern);
  +      for (int i = 0; i < nPatterns; i++)
  +      {
  +        XPath pattern = handler.createMatchPatternXPath(tokenizer.nextToken());
  +
  +        patterns.addElement(pattern);
  +      }
  +      return patterns;
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
       }
   
  -    return patterns;
     }
   
     /**
  @@ -712,11 +740,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     StringVector processSTRINGLIST(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                                 StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
   
       StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
  @@ -743,11 +771,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     StringVector processPREFIX_URLLIST(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                                     StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
   
       StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
  @@ -777,11 +805,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     String processURL(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                    StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
   
       // return SystemIDResolver.getAbsoluteURI(value, 
  @@ -801,11 +829,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     private Boolean processYESNO(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                               StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
       return new Boolean(value.equals("yes") ? true : false);
     }
  @@ -821,11 +849,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     Object processValue(
  -          StylesheetHandler handler, String uri, String name, String rawName, String value)
  -            throws SAXException
  +                      StylesheetHandler handler, String uri, String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
     {
   
       int type = getType();
  @@ -892,10 +920,10 @@
      * NEEDSDOC @param handler
      * NEEDSDOC @param elem
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     void setDefAttrValue(StylesheetHandler handler, Object elem)
  -          throws SAXException
  +    throws org.xml.sax.SAXException
     {
       setAttrValue(handler, this.getNamespace(), this.getName(),
                    this.getName(), this.getDefault(), elem);
  @@ -967,11 +995,11 @@
      * NEEDSDOC @param attrValue
      * NEEDSDOC @param elem
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     void setAttrValue(
  -          StylesheetHandler handler, String attrUri, String attrLocalName, String attrRawName, String attrValue, Object elem)
  -            throws SAXException
  +                    StylesheetHandler handler, String attrUri, String attrLocalName, String attrRawName, String attrValue, Object elem)
  +    throws org.xml.sax.SAXException
     {
   
       String setterString = getSetterMethodName();
  
  
  
  1.6       +13 -53    xml-xalan/java/src/org/apache/xalan/processor/XSLTElementProcessor.java
  
  Index: XSLTElementProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTElementProcessor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSLTElementProcessor.java	2000/10/30 18:40:43	1.5
  +++ XSLTElementProcessor.java	2000/11/13 16:26:51	1.6
  @@ -61,14 +61,13 @@
   import org.xml.sax.EntityResolver;
   import org.xml.sax.DTDHandler;
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
   
   import org.apache.xalan.res.XSLMessages;
   import org.apache.xalan.res.XSLTErrorResources;
   
   import org.xml.sax.helpers.AttributesImpl;
  +import javax.xml.transform.ErrorListener;
  +import javax.xml.transform.TransformerException;
   
   import java.util.Vector;
   
  @@ -122,15 +121,10 @@
      *                 document.
      * @return The new input source, or null to require the
      *         default behaviour.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.EntityResolver#resolveEntity
  -   *
  -   * @throws SAXException
      */
     public InputSource resolveEntity(
             StylesheetHandler handler, String publicId, String systemId)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       return null;
     }
  @@ -178,10 +172,8 @@
      * is sent to the current processor when any non-text event occurs.
      *
      * NEEDSDOC @param handler
  -   *
  -   * @throws SAXException
      */
  -  public void startNonText(StylesheetHandler handler) throws SAXException
  +  public void startNonText(StylesheetHandler handler) throws org.xml.sax.SAXException
     {
   
       // no op
  @@ -197,15 +189,10 @@
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
      * @param attributes The specified or defaulted attributes.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#startElement
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       // no op
  @@ -221,15 +208,10 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param localName
      * NEEDSDOC @param rawName
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#endElement
  -   *
  -   * @throws SAXException
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String rawName)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       // no op
  @@ -244,15 +226,10 @@
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
      *               character array.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#characters
  -   *
  -   * @throws SAXException
      */
     public void characters(
             StylesheetHandler handler, char ch[], int start, int length)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       handler.error("Characters are not allowed at this point in the document!",
                     null);
  @@ -267,15 +244,10 @@
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
      *               character array.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#ignorableWhitespace
  -   *
  -   * @throws SAXException
      */
     public void ignorableWhitespace(
             StylesheetHandler handler, char ch[], int start, int length)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       // no op
  @@ -289,15 +261,10 @@
      * @param target The processing instruction target.
      * @param data The processing instruction data, or null if
      *             none is supplied.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#processingInstruction
  -   *
  -   * @throws SAXException
      */
     public void processingInstruction(
             StylesheetHandler handler, String target, String data)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       // no op
  @@ -309,14 +276,9 @@
      *
      * NEEDSDOC @param handler
      * @param name The name of the skipped entity.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   * @see org.xml.sax.ContentHandler#processingInstruction
  -   *
  -   * @throws SAXException
      */
     public void skippedEntity(StylesheetHandler handler, String name)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       // no op
  @@ -330,12 +292,10 @@
      *                error reporting.
      * @param attributes The list of attributes.
      * @param target The target element where the properties will be set.
  -   *
  -   * @throws SAXException
      */
     void setPropertiesFromAttributes(
             StylesheetHandler handler, String rawName, Attributes attributes, Object target)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
       setPropertiesFromAttributes(handler, rawName, attributes, target, true);
     }
  @@ -352,11 +312,11 @@
      * attribute is not defined.
      * @return the attributes not allowed on this element.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     Attributes setPropertiesFromAttributes(
             StylesheetHandler handler, String rawName, Attributes attributes, Object target, boolean throwError)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       XSLTElementDef def = getElemDef();
  
  
  
  1.3       +32 -32    xml-xalan/java/src/org/apache/xalan/serialize/FormatterToHTML.java
  
  Index: FormatterToHTML.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/serialize/FormatterToHTML.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FormatterToHTML.java	2000/11/10 18:57:39	1.2
  +++ FormatterToHTML.java	2000/11/13 16:27:02	1.3
  @@ -70,9 +70,9 @@
   import org.apache.xalan.utils.Trie;
   import org.apache.xalan.res.XSLMessages;
   import org.apache.xpath.res.XPATHErrorResources;
  -import org.apache.serialize.OutputFormat;
  -import org.apache.serialize.Method;
  -import org.apache.serialize.helpers.HTMLOutputFormat;
  +import org.apache.xalan.serialize.OutputFormat;
  +import org.apache.xalan.serialize.Method;
  +import org.apache.xalan.serialize.helpers.HTMLOutputFormat;
   
   /**
    * <meta name="usage" content="general"/>
  @@ -597,9 +597,9 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void startDocument() throws SAXException
  +  public void startDocument() throws org.xml.sax.SAXException
     {
   
       m_needToOutputDocTypeDecl = true;
  @@ -651,11 +651,11 @@
      *  @see #endElement
      *  @see org.xml.sax.AttributeList
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void startElement(
             String namespaceURI, String localName, String name, Attributes atts)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       boolean savedDoIndent = m_doIndent;
  @@ -740,10 +740,10 @@
      *  @exception org.xml.sax.SAXException Any SAX exception, possibly
      *             wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void endElement(String namespaceURI, String localName, String name)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       m_currentIndent -= this.indent;
  @@ -828,10 +828,10 @@
      * NEEDSDOC @param elemDesc
      * @param   value   The value of the attribute.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     protected void processAttribute(
  -          String name, ElemDesc elemDesc, String value) throws SAXException
  +          String name, ElemDesc elemDesc, String value) throws org.xml.sax.SAXException
     {
   
       String nameUpper = name.toUpperCase();
  @@ -874,9 +874,9 @@
      * @param   encoding    CURRENTLY NOT IMPLEMENTED.
      * @see #backReference
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void writeAttrURI(String string, String encoding) throws SAXException
  +  public void writeAttrURI(String string, String encoding) throws org.xml.sax.SAXException
     {
   
       char[] stringArray = string.toCharArray();
  @@ -926,10 +926,10 @@
      * @param   encoding    CURRENTLY NOT IMPLEMENTED.
      * @see #backReference
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void writeAttrString(String string, String encoding)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       final char chars[] = string.toCharArray();
  @@ -969,7 +969,7 @@
   
               if (i + 1 >= strLen)
               {
  -              throw new SAXException(
  +              throw new org.xml.sax.SAXException(
                   XSLMessages.createXPATHMessage(
                     XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                     new Object[]{ Integer.toHexString(ch) }));  //"Invalid UTF-16 surrogate detected: "
  @@ -981,7 +981,7 @@
                 next = chars[++i];
   
                 if (!(0xdc00 <= next && next < 0xe000))
  -                throw new SAXException(
  +                throw new org.xml.sax.SAXException(
                     XSLMessages.createXPATHMessage(
                       XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                       new Object[]{
  @@ -1071,9 +1071,9 @@
      *
      * NEEDSDOC (copyEntityIntoBuf) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  private int copyEntityIntoBuf(String s, int pos) throws SAXException
  +  private int copyEntityIntoBuf(String s, int pos) throws org.xml.sax.SAXException
     {
   
       int l = s.length();
  @@ -1115,10 +1115,10 @@
      * @see #ignorableWhitespace
      * @see org.xml.sax.Locator
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void characters(char chars[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       if (0 == length)
  @@ -1158,7 +1158,7 @@
         }
         catch (IOException ioe)
         {
  -        throw new SAXException(
  +        throw new org.xml.sax.SAXException(
             XSLMessages.createXPATHMessage(
             XPATHErrorResources.ER_OIERROR, null), ioe);  //"IO error", ioe);
         }
  @@ -1376,7 +1376,7 @@
   
           if (i + 1 >= length)
           {
  -          throw new SAXException(
  +          throw new org.xml.sax.SAXException(
               XSLMessages.createXPATHMessage(
                 XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                 new Object[]{ Integer.toHexString(ch) }));  //"Invalid UTF-16 surrogate detected: "
  @@ -1388,7 +1388,7 @@
             next = chars[++i];
   
             if (!(0xdc00 <= next && next < 0xe000))
  -            throw new SAXException(
  +            throw new org.xml.sax.SAXException(
                 XSLMessages.createXPATHMessage(
                   XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                   new Object[]{
  @@ -1481,9 +1481,9 @@
      *  @see #ignorableWhitespace
      *  @see org.xml.sax.Locator
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void cdata(char ch[], int start, int length) throws SAXException
  +  public void cdata(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       if ((null != m_currentElementName)
  @@ -1504,7 +1504,7 @@
         }
         catch (IOException ioe)
         {
  -        throw new SAXException(
  +        throw new org.xml.sax.SAXException(
             XSLMessages.createXPATHMessage(
             XPATHErrorResources.ER_OIERROR, null), ioe);  //"IO error", ioe);
         }
  @@ -1525,7 +1525,7 @@
         }
         catch(IOException ioe)
         {
  -        throw new SAXException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_OIERROR, null),ioe); //"IO error", ioe);
  +        throw new org.xml.sax.SAXException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_OIERROR, null),ioe); //"IO error", ioe);
         }
       }
       */
  @@ -1544,10 +1544,10 @@
      *  @exception org.xml.sax.SAXException Any SAX exception, possibly
      *             wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void processingInstruction(String target, String data)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       // Use a fairly nasty hack to tell if the next node is supposed to be 
  @@ -1579,9 +1579,9 @@
      *
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void entityReference(String name) throws SAXException
  +  public void entityReference(String name) throws org.xml.sax.SAXException
     {
   
       this.accum("&");
  
  
  
  1.2       +24 -24    xml-xalan/java/src/org/apache/xalan/serialize/FormatterToText.java
  
  Index: FormatterToText.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/serialize/FormatterToText.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FormatterToText.java	2000/10/30 18:56:50	1.1
  +++ FormatterToText.java	2000/11/13 16:27:02	1.2
  @@ -64,8 +64,8 @@
   
   import org.apache.xpath.res.XPATHErrorResources;
   import org.apache.xalan.res.XSLMessages;
  -import org.apache.serialize.OutputFormat;
  -import org.apache.serialize.helpers.TextOutputFormat;
  +import org.apache.xalan.serialize.OutputFormat;
  +import org.apache.xalan.serialize.helpers.TextOutputFormat;
   
   /**
    * <meta name="usage" content="general"/>
  @@ -165,9 +165,9 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void startDocument() throws SAXException
  +  public void startDocument() throws org.xml.sax.SAXException
     {
   
       // No action for the moment.
  @@ -185,9 +185,9 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endDocument() throws SAXException
  +  public void endDocument() throws org.xml.sax.SAXException
     {
       this.flush();
       flushWriter();
  @@ -218,11 +218,11 @@
      * @see #endElement
      * @see org.xml.sax.AttributeList
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void startElement(
             String namespaceURI, String localName, String name, Attributes atts)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       // No action for the moment.
  @@ -246,10 +246,10 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void endElement(String namespaceURI, String localName, String name)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       // No action for the moment.
  @@ -280,9 +280,9 @@
      * @see #ignorableWhitespace
      * @see org.xml.sax.Locator
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void characters(char ch[], int start, int length) throws SAXException
  +  public void characters(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       this.accum(ch, start, length);
  @@ -299,10 +299,10 @@
      * NEEDSDOC @param start
      * NEEDSDOC @param length
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void charactersRaw(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       accum(ch, start, length);
  @@ -336,9 +336,9 @@
      * @see #ignorableWhitespace
      * @see org.xml.sax.Locator
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void cdata(char ch[], int start, int length) throws SAXException
  +  public void cdata(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       accum(ch, start, length);
  @@ -371,10 +371,10 @@
      *            wrapping another exception.
      * @see #characters
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void ignorableWhitespace(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       // No action for the moment.
  @@ -397,10 +397,10 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void processingInstruction(String target, String data)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       // No action for the moment.
  @@ -412,9 +412,9 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void comment(String data) throws SAXException
  +  public void comment(String data) throws org.xml.sax.SAXException
     {
   
       // No action for the moment.
  @@ -425,9 +425,9 @@
      *
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void entityReference(String name) throws SAXException
  +  public void entityReference(String name) throws org.xml.sax.SAXException
     {
   
       // No action for the moment.
  
  
  
  1.4       +111 -110  xml-xalan/java/src/org/apache/xalan/serialize/FormatterToXML.java
  
  Index: FormatterToXML.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/serialize/FormatterToXML.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FormatterToXML.java	2000/11/06 17:42:27	1.3
  +++ FormatterToXML.java	2000/11/13 16:27:02	1.4
  @@ -72,13 +72,12 @@
   
   import org.w3c.dom.Node;
   
  -import org.apache.serialize.SerializerHandler;
  -import org.apache.serialize.OutputFormat;
  -import org.apache.serialize.helpers.XMLOutputFormat;
  -import org.apache.serialize.Serializer;
  -import org.apache.serialize.OutputFormat;
  -import org.apache.serialize.DOMSerializer;
  -import org.apache.serialize.QName;
  +import org.apache.xalan.serialize.OutputFormat;
  +import org.apache.xalan.serialize.helpers.XMLOutputFormat;
  +import org.apache.xalan.serialize.Serializer;
  +import org.apache.xalan.serialize.OutputFormat;
  +import org.apache.xalan.serialize.DOMSerializer;
  +import org.apache.xalan.serialize.QName;
   
   import org.apache.xalan.utils.BoolStack;
   import org.apache.xalan.utils.TreeWalker;
  @@ -94,7 +93,7 @@
    * Warning: this class will be replaced by the Xerces Serializer classes.
    */
   public class FormatterToXML
  -        implements ContentHandler, LexicalHandler, SerializerHandler,
  +        implements ContentHandler, LexicalHandler, 
                      Serializer, DOMSerializer
   {
   
  @@ -180,9 +179,9 @@
     /**
      * Output a system-dependent line break.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  protected final void outputLineSep() throws SAXException
  +  protected final void outputLineSep() throws org.xml.sax.SAXException
     {
   
       for (int z = 0; z < m_lineSepLen; z++)
  @@ -518,7 +517,7 @@
     {
       if(null == format)
       {
  -      format = new org.apache.serialize.helpers.XMLOutputFormat();
  +      format = new org.apache.xalan.serialize.helpers.XMLOutputFormat();
       }
       m_encoding = Encodings.getMimeEncoding(format.getEncoding());
   
  @@ -572,9 +571,9 @@
      *
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  void outputDocTypeDecl(String name) throws SAXException
  +  void outputDocTypeDecl(String name) throws org.xml.sax.SAXException
     {
   
       accum("<!DOCTYPE ");
  @@ -603,9 +602,9 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void startDocument() throws SAXException
  +  public void startDocument() throws org.xml.sax.SAXException
     {
   
       if (m_inEntityRef)
  @@ -632,9 +631,9 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endDocument() throws SAXException
  +  public void endDocument() throws org.xml.sax.SAXException
     {
   
       if (m_doIndent &&!m_isprevtext)
  @@ -657,13 +656,13 @@
      *        external DTD subset, or null if none was declared.
      * @param systemId The declared system identifier for the
      *        external DTD subset, or null if none was declared.
  -   * @exception SAXException The application may raise an
  +   * @exception org.xml.sax.SAXException The application may raise an
      *            exception.
      * @see #endDTD
      * @see #startEntity
      */
     public void startDTD(String name, String publicId, String systemId)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       // Do nothing for now.
  @@ -672,10 +671,10 @@
     /**
      * Report the end of DTD declarations.
      *
  -   * @exception SAXException The application may raise an exception.
  +   * @exception org.xml.sax.SAXException The application may raise an exception.
      * @see #startDTD
      */
  -  public void endDTD() throws SAXException
  +  public void endDTD() throws org.xml.sax.SAXException
     {
   
       // Do nothing for now.
  @@ -688,10 +687,10 @@
      * NEEDSDOC @param prefix
      * NEEDSDOC @param uri
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void startPrefixMapping(String prefix, String uri)
  -          throws SAXException{}
  +          throws org.xml.sax.SAXException{}
   
     /**
      * NEEDSDOC Method endPrefixMapping 
  @@ -699,9 +698,9 @@
      *
      * NEEDSDOC @param prefix
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endPrefixMapping(String prefix) throws SAXException{}
  +  public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException{}
   
     /**
      * NEEDSDOC Method subPartMatch 
  @@ -777,11 +776,11 @@
      * @see #endElement
      * @see org.xml.sax.AttributeList
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void startElement(
             String namespaceURI, String localName, String name, Attributes atts)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       if (m_inEntityRef)
  @@ -831,9 +830,9 @@
      * Check to see if a parent's ">" has been written, and, if
      * it has not, write it.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  protected void writeParentTagEnd() throws SAXException
  +  protected void writeParentTagEnd() throws org.xml.sax.SAXException
     {
   
       if (!m_elemStack.isEmpty())
  @@ -885,10 +884,10 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void endElement(String namespaceURI, String localName, String name)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       if (m_inEntityRef)
  @@ -932,10 +931,10 @@
      * @param   name   The name of the attribute.
      * @param   value   The value of the attribute.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     protected void processAttribute(String name, String value)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       accum(' ');
  @@ -954,9 +953,9 @@
      * The contents of the un-escaping section will be delivered through
      * the regular <tt>characters</tt> event.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void startNonEscaping() throws SAXException
  +  public void startNonEscaping() throws org.xml.sax.SAXException
     {
       m_disableOutputEscapingStates.push(true);
     }
  @@ -966,9 +965,9 @@
      *
      * @see #startNonEscaping
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endNonEscaping() throws SAXException
  +  public void endNonEscaping() throws org.xml.sax.SAXException
     {
       m_disableOutputEscapingStates.pop();
     }
  @@ -983,9 +982,9 @@
      * The contents of the whitespace preserving section will be delivered
      * through the regular <tt>characters</tt> event.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void startPreserving() throws SAXException
  +  public void startPreserving() throws org.xml.sax.SAXException
     {
   
       // Not sure this is really what we want.  -sb
  @@ -999,9 +998,9 @@
      *
      * @see #startPreserving
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endPreserving() throws SAXException
  +  public void endPreserving() throws org.xml.sax.SAXException
     {
   
       // Not sure this is really what we want.  -sb
  @@ -1017,21 +1016,23 @@
      * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void processingInstruction(String target, String data)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       if (m_inEntityRef)
         return;
   
  -    // Use a fairly nasty hack to tell if the next node is supposed to be 
  -    // unescaped text.
  -    if (target.equals("xslt-next-is-raw") && data.equals("formatter-to-dom"))
  +    if (target.equals(javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING))
       {
  -      m_disableOutputEscapingStates.setTop(true);
  +      startNonEscaping();
       }
  +    else if (target.equals(javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING))
  +    {
  +      endNonEscaping();
  +    }
       else
       {
         writeParentTagEnd();
  @@ -1064,9 +1065,9 @@
      * @param ch An array holding the characters in the comment.
      * @param start The starting position in the array.
      * @param length The number of characters to use from the array.
  -   * @exception SAXException The application may raise an exception.
  +   * @exception org.xml.sax.SAXException The application may raise an exception.
      */
  -  public void comment(char ch[], int start, int length) throws SAXException
  +  public void comment(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       if (m_inEntityRef)
  @@ -1090,10 +1091,10 @@
     /**
      * Report the start of a CDATA section.
      *
  -   * @exception SAXException The application may raise an exception.
  +   * @exception org.xml.sax.SAXException The application may raise an exception.
      * @see #endCDATA
      */
  -  public void startCDATA() throws SAXException
  +  public void startCDATA() throws org.xml.sax.SAXException
     {
       m_inCData = true;
     }
  @@ -1101,10 +1102,10 @@
     /**
      * Report the end of a CDATA section.
      *
  -   * @exception SAXException The application may raise an exception.
  +   * @exception org.xml.sax.SAXException The application may raise an exception.
      * @see #startCDATA
      */
  -  public void endCDATA() throws SAXException
  +  public void endCDATA() throws org.xml.sax.SAXException
     {
       m_inCData = false;
     }
  @@ -1134,9 +1135,9 @@
      * @see #ignorableWhitespace
      * @see org.xml.sax.Locator
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void cdata(char ch[], int start, int length) throws SAXException
  +  public void cdata(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       try
  @@ -1171,7 +1172,7 @@
       }
       catch (IOException ioe)
       {
  -      throw new SAXException(
  +      throw new org.xml.sax.SAXException(
           XSLMessages.createXPATHMessage(XPATHErrorResources.ER_OIERROR, null),
           ioe);  //"IO error", ioe);
       }
  @@ -1197,9 +1198,9 @@
      *
      * NEEDSDOC @param b
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  protected final void accum(byte b) throws SAXException
  +  protected final void accum(byte b) throws org.xml.sax.SAXException
     {
   
       if (m_bytesEqualChars)
  @@ -1223,9 +1224,9 @@
      *
      * NEEDSDOC @param b
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  protected final void accum(char b) throws SAXException
  +  protected final void accum(char b) throws org.xml.sax.SAXException
     {
   
       if (m_bytesEqualChars)
  @@ -1251,10 +1252,10 @@
      * NEEDSDOC @param start
      * NEEDSDOC @param length
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     protected final void accum(char chars[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       int n = start + length;
  @@ -1282,7 +1283,7 @@
           }
           catch (IOException ioe)
           {
  -          throw new SAXException(ioe);
  +          throw new org.xml.sax.SAXException(ioe);
           }
         }
         else
  @@ -1305,9 +1306,9 @@
      *
      * NEEDSDOC @param s
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  protected final void accum(String s) throws SAXException
  +  protected final void accum(String s) throws org.xml.sax.SAXException
     {
   
       int n = s.length();
  @@ -1338,7 +1339,7 @@
           }
           catch (IOException ioe)
           {
  -          throw new SAXException(ioe);
  +          throw new org.xml.sax.SAXException(ioe);
           }
         }
         else
  @@ -1359,9 +1360,9 @@
      * NEEDSDOC Method flushBytes 
      *
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  private final void flushBytes() throws SAXException
  +  private final void flushBytes() throws org.xml.sax.SAXException
     {
   
       try
  @@ -1372,16 +1373,16 @@
       }
       catch (IOException ioe)
       {
  -      throw new SAXException(ioe);
  +      throw new org.xml.sax.SAXException(ioe);
       }
     }
   
     /**
      * Flush the formatter's result stream.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public final void flushWriter() throws SAXException
  +  public final void flushWriter() throws org.xml.sax.SAXException
     {
   
       if (m_shouldFlush && (null != m_writer))
  @@ -1392,7 +1393,7 @@
         }
         catch (IOException ioe)
         {
  -        throw new SAXException(ioe);
  +        throw new org.xml.sax.SAXException(ioe);
         }
       }
     }
  @@ -1401,9 +1402,9 @@
      * NEEDSDOC Method flushChars 
      *
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  private final void flushChars() throws SAXException
  +  private final void flushChars() throws org.xml.sax.SAXException
     {
   
       try
  @@ -1414,7 +1415,7 @@
       }
       catch (IOException ioe)
       {
  -      throw new SAXException(ioe);
  +      throw new org.xml.sax.SAXException(ioe);
       }
     }
   
  @@ -1422,9 +1423,9 @@
      * NEEDSDOC Method flush 
      *
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public final void flush() throws SAXException
  +  public final void flush() throws org.xml.sax.SAXException
     {
   
       if (m_bytesEqualChars)
  @@ -1462,10 +1463,10 @@
      * @see #ignorableWhitespace
      * @see org.xml.sax.Locator
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void characters(char chars[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
       if (m_inEntityRef)
         return;
  @@ -1544,10 +1545,10 @@
      * NEEDSDOC @param start
      * NEEDSDOC @param length
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void charactersRaw(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       if (m_inEntityRef)
  @@ -1569,10 +1570,10 @@
      * NEEDSDOC @param isCData
      *
      * @throws IOException
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     void writeNormalizedChars(char ch[], int start, int length, boolean isCData)
  -          throws IOException, SAXException
  +          throws IOException, org.xml.sax.SAXException
     {
   
       int end = start + length;
  @@ -1611,7 +1612,7 @@
   
             if (i + 1 >= end)
             {
  -            throw new SAXException(
  +            throw new org.xml.sax.SAXException(
                 XSLMessages.createXPATHMessage(
                   XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                   new Object[]{ Integer.toHexString((int) c) }));  //"Invalid UTF-16 surrogate detected: "
  @@ -1623,7 +1624,7 @@
               next = ch[++i];
   
               if (!(0xdc00 <= next && next < 0xe000))
  -              throw new SAXException(
  +              throw new org.xml.sax.SAXException(
                   XSLMessages.createXPATHMessage(
                     XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                     new Object[]{
  @@ -1678,7 +1679,7 @@
   
             if (i + 1 >= end)
             {
  -            throw new SAXException(
  +            throw new org.xml.sax.SAXException(
                 XSLMessages.createXPATHMessage(
                   XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                   new Object[]{ Integer.toHexString((int) c) }));  //"Invalid UTF-16 surrogate detected: "
  @@ -1690,7 +1691,7 @@
               next = ch[++i];
   
               if (!(0xdc00 <= next && next < 0xe000))
  -              throw new SAXException(
  +              throw new org.xml.sax.SAXException(
                   XSLMessages.createXPATHMessage(
                     XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                     new Object[]{
  @@ -1730,10 +1731,10 @@
      *            wrapping another exception.
      * @see #characters
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void ignorableWhitespace(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       if (0 == length)
  @@ -1748,9 +1749,9 @@
      *
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void skippedEntity(String name) throws SAXException
  +  public void skippedEntity(String name) throws org.xml.sax.SAXException
     {
   
       // TODO: Should handle
  @@ -1766,12 +1767,12 @@
      *
      * @param name The name of the entity.  If it is a parameter
      *        entity, the name will begin with '%'.
  -   * @exception SAXException The application may raise an exception.
  +   * @exception org.xml.sax.SAXException The application may raise an exception.
      * @see #endEntity
      * @see org.xml.sax.misc.DeclHandler#internalEntityDecl
      * @see org.xml.sax.misc.DeclHandler#externalEntityDecl
      */
  -  public void startEntity(String name) throws SAXException
  +  public void startEntity(String name) throws org.xml.sax.SAXException
     {
   
       entityReference(name);
  @@ -1783,10 +1784,10 @@
      * Report the end of an entity.
      *
      * @param name The name of the entity that is ending.
  -   * @exception SAXException The application may raise an exception.
  +   * @exception org.xml.sax.SAXException The application may raise an exception.
      * @see #startEntity
      */
  -  public void endEntity(String name) throws SAXException
  +  public void endEntity(String name) throws org.xml.sax.SAXException
     {
       m_inEntityRef = false;
     }
  @@ -1796,9 +1797,9 @@
      *
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void entityReference(String name) throws SAXException
  +  public void entityReference(String name) throws org.xml.sax.SAXException
     {
   
       writeParentTagEnd();
  @@ -1823,11 +1824,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     final int accumDefaultEntity(
             char ch, int i, char[] chars, int len, boolean escLF)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       if (!escLF && (0x0D == ch) && ((i + 1) < len) && (0x0A == chars[i + 1]))
  @@ -1912,11 +1913,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     final int accumDefaultEscape(
             char ch, int i, char[] chars, int len, boolean escLF)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       int pos = accumDefaultEntity(ch, i, chars, len, escLF);
  @@ -1933,7 +1934,7 @@
   
           if (i + 1 >= len)
           {
  -          throw new SAXException(
  +          throw new org.xml.sax.SAXException(
               XSLMessages.createXPATHMessage(
                 XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                 new Object[]{ Integer.toHexString(ch) }));  //"Invalid UTF-16 surrogate detected: "
  @@ -1945,7 +1946,7 @@
             next = chars[++i];
   
             if (!(0xdc00 <= next && next < 0xe000))
  -            throw new SAXException(
  +            throw new org.xml.sax.SAXException(
                 XSLMessages.createXPATHMessage(
                   XPATHErrorResources.ER_INVALID_UTF16_SURROGATE,
                   new Object[]{
  @@ -1994,10 +1995,10 @@
      * @return              XML-formatted string.
      * @see #backReference
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void writeAttrString(String string, String encoding)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       char[] stringChars = string.toCharArray();
  @@ -2031,9 +2032,9 @@
      * @param n         Number of spaces to print.
      * @exception IOException   Thrown if <var>pw</var> is invalid.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void printSpace(int n) throws SAXException
  +  public void printSpace(int n) throws org.xml.sax.SAXException
     {
   
       for (int i = 0; i < n; i++)
  @@ -2048,9 +2049,9 @@
      * @param n         Number of spaces to print.
      * @exception IOException   Thrown if <var>pw</var> is invalid.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void indent(int n) throws SAXException
  +  public void indent(int n) throws org.xml.sax.SAXException
     {
   
       if (m_startNewLine)
  @@ -2223,7 +2224,7 @@
         TreeWalker walker = new TreeWalker(this);
         walker.traverse(node);
       }
  -    catch(SAXException se)
  +    catch(org.xml.sax.SAXException se)
       {
         throw new WrappedRuntimeException(se);
       }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/DOMSerializer.java
  
  Index: DOMSerializer.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize;
  
  import java.io.IOException;
  
  import org.w3c.dom.Node;
  
  /**
   * Interface for a DOM serializer implementation.
   * <p>
   * The DOM serializer is a facet of a serializer. A serializer may or may
   * not support a DOM serializer.
   * <p>
   * Example:
   * <pre>
   * Document     doc;
   * Serializer   ser;
   * OutputStream os;
   *
   * ser.setOutputStream( os );
   * ser.asDOMSerializer( doc );
   * </pre>
   *
   *
   * @version Alpha
   * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   */
  public interface DOMSerializer
  {
    /**
     * Serializes the DOM node. Throws an exception only if an I/O
     * exception occured while serializing.
     *
     * @param elem The element to serialize
     * @throws IOException An I/O exception occured while serializing
     */
    public void serialize(Node node) throws IOException;
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/Method.java
  
  Index: Method.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize;
  
  /**
   * Names of the four default output methods.
   * <p>
   * Four default output methods are defined: XML, HTML, XHTML and TEXT.
   * Serializers may support additional output methods. The names of
   * these output methods should be encoded as <tt>namespace:local</tt>.
   *
   * @version Alpha
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   * @see OutputFormat
   */
  public final class Method
  {
  
    /**
     * The output method for XML documents: <tt>xml</tt>.
     */
    public static final String XML = "xml";
  
    /**
     * The output method for HTML documents: <tt>html</tt>.
     */
    public static final String HTML = "html";
  
    /**
     * The output method for XHTML documents: <tt>xhtml</tt>.
     */
    public static final String XHTML = "xhtml";
  
    /**
     * The output method for text documents: <tt>text</tt>.
     */
    public static final String Text = "text";
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/OutputFormat.java
  
  Index: OutputFormat.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize;
  
  /**
   * The output format affects the manner in which a document is
   * serialized. The output format determines the output method,
   * encoding, indentation, document type, and various other properties
   * that affect the manner in which a document is serialized.
   * <p>
   * Once an output format has been handed to a serializer or XSLT
   * processor, the application should not attempt to reuse it. The
   * serializer or XSLT processor may modify the properties of the
   * output format object.
   * <p>
   * Implementations may provide classes that extend <tt>OutputFormat</tt>
   * with additional properties, e.g. indentation level, line separation,
   * namespace handlers, etc. An application may use these extra properties
   * by constructing an output format object based on the implementation
   * specified type.
   * <p>
   * <tt>OutputFormat</tt> has been modeled after the XSLT &lt;xsl:output&gt;
   * element declaration. However, it does not assume the existence of an
   * XSLT processor or a particular serializer.
   * <p>
   * Typical usage scenarios supported by <tt>OutputFormat<tt>:
   * <ul>
   * <li>The application constructs an <tt>OutputFormat</tt> object and
   *     passes it to the serializer
   * <li>The application constructs an <tt>OutputFormat</tt> object and
   *     passes it to the XSLT processor, overriding the properties
   *     specified in the stylesheet
   * <li>The XSLT processor constructs an <tt>OutputFormat</tt> object
   *     and passes it to the serializer
   * <li>The XSLT processor constructs an <tt>OutputFormat</tt> object
   *     from the stylesheet and returns it to the applicatio, the
   *     application passes <tt>OutputFormat</tt> to the serializer
   * </ul>
   *
   * @version Alpha
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   *         <a href="mailto:visco@exoffice.com">Keith Visco</a>
   * @see Method
   */
  public class OutputFormat
  {
  
    /**
     * Holds the output method specified for this document,
     * or null if no method was specified.
     *
     * @see Method
     */
    private String _method = Method.XML;
  
    /**
     * Specifies the version of the output method, null for the
     * default.
     */
    private String _version = null;
  
    /**
     * True if indentation is requested, false for no indentation.
     */
    private boolean _indent = false;
  
    /**
     * The amount to indent a line, when indent is set to true.
     */
    private int _indentAmount = 0;
  
    /**
     * The encoding to use, if an input stream is used, UTF-8 for
     * the default.
     */
    private String _encoding = "UTF-8";
  
    /**
     * The specified media type or null.
     */
    private String _mediaType = null;
  
    /**
     * The specified document type system identifier, or null.
     */
    private String _doctypeSystemId = null;
  
    /**
     * The specified document type public identifier, or null.
     */
    private String _doctypePublicId = null;
  
    /**
     * Ture if the XML declaration should be ommited;
     */
    private boolean _omitXmlDeclaration = false;
  
    /**
     * List of element tag names whose text node children must
     * be output as CDATA.
     */
    private QName[] _cdataElements = new QName[0];
  
    /**
     * List of element tag names whose text node children must
     * be output unescaped.
     */
    private QName[] _nonEscapingElements = new QName[0];
  
    /**
     * True if spaces should be preserved in elements that do not
     * specify otherwise, or specify the default behavior.
     */
    private boolean _preserve = false;
  
    /**
     * True if the document type should be marked as standalone.
     */
    private boolean _standalone = false;
  
    /**
     * Constructs a new output format with the default values.
     */
    public OutputFormat(){}
  
    /**
     * Returns the method specified for this output format. See {@link
     * Method} for a list of the default methods. Other methods should
     * be of the format <tt>namespace:local</tt>. The default is
     * {@link Method#XML}.
     *
     * @return The specified output method
     */
    public String getMethod()
    {
      return _method;
    }
  
    /**
     * Sets the method for this output format. See {@link Method} for
     * a list of the default methods. Other methods should be of the
     * format <tt>namespace:local</tt>.
     *
     * @param method The output method, or null
     */
    public void setMethod(String method)
    {
      _method = method;
    }
  
    /**
     * Returns the version for this output method. If no version was
     * specified, will return null and the default version number will
     * be used. If the serializer does not support that particular
     * version, it should default to a supported version.
     *
     * @return The specified method version, or null
     */
    public String getVersion()
    {
      return _version;
    }
  
    /**
     * Sets the version for this output method.
     *
     * @param version The output method version, or null
     */
    public void setVersion(String version)
    {
      _version = version;
    }
  
    /**
     * Returns true if indentation was specified. If no indentation
     * was specified, returns false. A derived class may support
     * additional properties, e.g. indentation level, line width to
     * wrap at, tab/spaces, etc.
     *
     * @return True if indentation was specified
     */
    public boolean getIndent()
    {
      return _indent;
    }
  
    /**
     * Sets the indentation on and off. A derived class may support
     * additional properties, e.g. indentation level, line width to
     * wrap at, tab/spaces, etc. A serializer need not support
     * indentation.
     *
     * @param ident True specifies identiation
     *
     * NEEDSDOC @param indent
     */
    public void setIndent(boolean indent)
    {
      _indent = indent;
    }
  
    /**
     * Returns the amount to indent if indentation was specified.
     *
     * @return True if indentation was specified
     */
    public int getIndentAmount()
    {
      return _indentAmount;
    }
  
    /**
     * Sets how much to indent, if indentation was specified.
     *
     * @param amount Number of spaces to indent.
     */
    public void setIndentAmount(int amount)
    {
      _indentAmount = amount;
    }
  
    /**
     * Returns the specified encoding. If no encoding was specified,
     * the default is used. For XML and HTML the default would be
     * "UTF-8". For other output methods, the default encoding is
     * unspecified.
     *
     * @return The encoding
     */
    public String getEncoding()
    {
      return _encoding;
    }
  
    /**
     * Sets the encoding for this output method. Null means the
     * default encoding for the selected output method. For XML and
     * HTML the default would be "UTF-8". For other output methods,
     * the default encoding is unspecified.
     *
     * @param encoding The encoding, or null
     */
    public void setEncoding(String encoding)
    {
      _encoding = encoding;
    }
  
    /**
     * Returns the specified media type. For each output method a
     * default media type will be used if one was not specified.
     *
     * @return The specified media type, or null
     */
    public String getMediaType()
    {
      return _mediaType;
    }
  
    /**
     * Sets the media type. For each output method a default media
     * type will be used if one was not specified.
     *
     * @param mediaType The specified media type
     */
    public void setMediaType(String mediaType)
    {
      _mediaType = mediaType;
    }
  
    /**
     * Sets the document type public identifiers. If not specified the
     * document type will depend on the output method (e.g. HTML, XHTML)
     * or from some other mechanism (e.g. SAX events, DOM DocumentType).
     *
     * @param publicId The public identifier
     */
    public void setDoctypePublicId(String publicId)
    {
      _doctypePublicId = publicId;
    }
  
    /**
     * Returns the specified document type public identifier,
     * or null.
     *
     * NEEDSDOC ($objectName$) @return
     */
    public String getDoctypePublicId()
    {
      return _doctypePublicId;
    }
  
    /**
     * Sets the document type system identifiers. If not specified the
     * document type will depend on the output method (e.g. HTML, XHTML)
     * or from some other mechanism (e.g. SAX events, DOM DocumentType).
     *
     * @param systemId The system identifier
     */
    public void setDoctypeSystemId(String systemId)
    {
      _doctypeSystemId = systemId;
    }
  
    /**
     * Returns the specified document type system identifier,
     * or null.
     *
     * NEEDSDOC ($objectName$) @return
     */
    public String getDoctypeSystemId()
    {
      return _doctypeSystemId;
    }
  
    /**
     * Returns true if the document type is standalone.
     * The default is false.
     *
     * NEEDSDOC ($objectName$) @return
     */
    public boolean getStandalone()
    {
      return _standalone;
    }
  
    /**
     * Sets document DTD standalone. The public and system
     * identifiers must be null for the document to be
     * serialized as standalone.
     *
     * @param standalone True if document DTD is standalone
     */
    public void setStandalone(boolean standalone)
    {
      _standalone = standalone;
    }
  
    /**
     * Returns true if the XML document declaration should
     * be ommited. The default is false.
     *
     * NEEDSDOC ($objectName$) @return
     */
    public boolean getOmitXMLDeclaration()
    {
      return _omitXmlDeclaration;
    }
  
    /**
     * Sets XML declaration omitting on and off.
     *
     * @param omit True if XML declaration should be ommited
     */
    public void setOmitXMLDeclaration(boolean omit)
    {
      _omitXmlDeclaration = omit;
    }
  
    /**
     * Returns a list of all the elements whose text node children
     * should be output as CDATA. Returns an empty array if no such
     * elements were specified.
     *
     * @return List of all CDATA elements
     */
    public QName[] getCDataElements()
    {
      return _cdataElements;
    }
  
    /**
     * Sets the list of elements for which text node children
     * should be output as CDATA.
     *
     * @param cdataElements List of all CDATA elements
     */
    public void setCDataElements(QName[] cdataElements)
    {
  
      if (cdataElements == null)
        _cdataElements = new QName[0];
      else
        _cdataElements = cdataElements;
    }
  
    /**
     * Returns a list of all the elements whose text node children
     * should be output unescaped (no character references). Returns
     * an empty array if no such elements were specified.
     *
     * @return List of all non escaping elements
     */
    public QName[] getNonEscapingElements()
    {
      return _nonEscapingElements;
    }
  
    /**
     * Sets the list of elements for which text node children
     * should be output unescaped (no character references).
     *
     * @param nonEscapingElements List of all non-escaping elements
     */
    public void setNonEscapingElements(QName[] nonEscapingElements)
    {
  
      if (nonEscapingElements == null)
        _nonEscapingElements = new QName[0];
      else
        _nonEscapingElements = nonEscapingElements;
    }
  
    /**
     * Returns true if the default behavior for this format is to
     * preserve spaces. All elements that do not specify otherwise
     * or specify the default behavior will be formatted based on
     * this rule. All elements that specify space preserving will
     * always preserve space.
     *
     * NEEDSDOC ($objectName$) @return
     */
    public boolean getPreserveSpace()
    {
      return _preserve;
    }
  
    /**
     * Sets space preserving as the default behavior. The default is
     * space stripping and all elements that do not specify otherwise
     * or use the default value will not preserve spaces.
     *
     * @param preserve True if spaces should be preserved
     */
    public void setPreserveSpace(boolean preserve)
    {
      _preserve = preserve;
    }
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/QName.java
  
  Index: QName.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize;
  
  
  /**
   * A qualified name. A qualified name has a local name, a namespace
   * URI and a prefix (if known). A <tt>QName</tt> may also specify
   * a non-qualified name by having a null namespace URI.
   *
   * @version Alpha
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   */
  public class QName
  {
  
  
      /**
       * The local name.
       */
      protected String _localName;
  
  
      /**
       * The namespace URI.
       */
      protected String _namespaceURI;
  
  
      /**
       * The namespace prefix.
       */
      protected String _prefix;
  
      /**
       * Constructs an empty QName.
       * 20001019: Try making this public, to support Serializable? -- JKESS
       */
      public QName()
      {
      }
  
  
      /**
       * Constructs a new QName with the specified namespace URI and
       * local name.
       *
       * @param namespaceURI The namespace URI if known, or null
       * @param localName The local name
       */
      public QName( String namespaceURI, String localName )
      {
          if ( localName == null )
              throw new IllegalArgumentException( "Argument 'localName' is null" );
          _namespaceURI = namespaceURI;
          _localName = localName;
      }
  
  
      /**
       * Constructs a new QName with the specified namespace URI, prefix
       * and local name.
       *
       * @param namespaceURI The namespace URI if known, or null
       * @param prefix The namespace prefix is known, or null
       * @param localName The local name
       */
      public QName( String namespaceURI, String prefix, String localName )
      {
          if ( localName == null )
              throw new IllegalArgumentException( "Argument 'localName' is null" );
          _namespaceURI = namespaceURI;
          _prefix = prefix;
          _localName = localName;
      }
  
  
      /**
       * Returns the namespace URI. Returns null if the namespace URI
       * is not known.
       *
       * @return The namespace URI, or null
       */
      public String getNamespaceURI()
      {
          return _namespaceURI;
      }
  
  
      /**
       * Returns the namespace prefix. Returns null if the namespace
       * prefix is not known.
       *
       * @return The namespace prefix, or null
       */
      public String getPrefix()
      {
          return _prefix;
      }
  
  
      /**
       * Returns the local part of the qualified name.
       *
       * @return The local part of the qualified name
       */
      public String getLocalName()
      {
          return _localName;
      }
  
      /**
       * Override equals and agree that we're equal if 
       * the passed object is a string and it matches 
       * the name of the arg.
       */
      public boolean equals(String ns, String localPart)
      {
        return ( ( ( _localName == null && localPart == null ) ||
                   ( _localName != null && _localName.equals( localPart ) ) ) &&
                 ( ( _namespaceURI == null && ns == null ) ||
                   ( _namespaceURI != null && _namespaceURI.equals( ns ) ) ) );
      }
  
      public boolean equals( Object object )
      {
          if ( object == this )
              return true;
          if ( object instanceof QName ) {
              return ( ( ( _localName == null && ( (QName) object )._localName == null ) ||
                         ( _localName != null && _localName.equals( ( (QName) object )._localName ) ) ) &&
                       ( ( _namespaceURI == null && ( (QName) object )._namespaceURI == null ) ||
                         ( _namespaceURI != null && _namespaceURI.equals( ( (QName) object )._namespaceURI ) ) ) );
      
          }
          return false;
      }
  
  
      public String toString()
      {
          return _prefix != null ? ( _prefix + ":" + _localName ) :
              ( _namespaceURI != null ? ( _namespaceURI + "^" + _localName ) :
                _localName );
      }
  
  
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/Serializer.java
  
  Index: Serializer.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize;
  
  import java.io.Writer;
  import java.io.OutputStream;
  import java.io.IOException;
  
  import org.xml.sax.DocumentHandler;
  import org.xml.sax.ContentHandler;
  
  /**
   * A serializer is used for serializing a document with a given output
   * method. The {@link Serializer} object serves as an anchor point for
   * setting the output stream and output format, for obtaining objects
   * for serializing the document, and for resetting the serializer.
   * <p>
   * Prior to using the serializer, the output format and output stream
   * or writer should be set. The serializer is then used in one of
   * three ways:
   * <ul>
   * <li>To serialize SAX 1 events call {@link #asDocumentHandler}
   * <li>To serialize SAX 2 events call {@link #asContentHandler}
   * <li>To serialize a DOM document call {@link #asDOMSerializer}
   * </ul>
   * <p>
   * The application may call one of these methods to obtain a way to
   * serialize the document. It may not attempt to use two different
   * handlers at the same time, nor should it use the same handler to
   * serialize two documents.
   * <p>
   * The serializer may be recycled and used with a different or the
   * same output format and output stream, by calling the {@link #reset}
   * method after completing serialization.
   * <p>
   * A serializer is not thread safe. Only one thread should call the
   * <tt>asXXX</tt> methods and use the returned handler.
   * <p>
   * Example:
   * <pre>
   * ser = SerializerFactory.getSerializer( Method.XML );
   * emptyDoc( ser, System.out );
   * emptyDoc( ser, System.err );
   * . . .
   *
   * void emptyDoc( Serializer ser, OutputStream os )
   * {
   *     ser.setOutputStream( os );
   *     ser.asDocumentHandler().startDocument();
   *     ser.asDocumentHandler().startElement( "empty", new AttributeListImpl() );
   *     ser.asDocumentHandler().endElement( "empty" );
   *     ser.asDocumentHandler().endDocument();
   *     ser.reset();
   * }
   * </pre>
   *
   * @version Alpha
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
   */
  public interface Serializer
  {
  
    /**
     * Specifies an output stream to which the document should be
     * serialized. This method should not be called while the
     * serializer is in the process of serializing a document.
     * <p>
     * The encoding specified in the {@link OutputFormat} is used, or
     * if no encoding was specified, the default for the selected
     * output method.
     *
     * @param output The output stream
     */
    public void setOutputStream(OutputStream output);
  
    /**
     * NEEDSDOC Method getOutputStream 
     *
     *
     * NEEDSDOC (getOutputStream) @return
     */
    public OutputStream getOutputStream();
  
    /**
     * Specifies a writer to which the document should be serialized.
     * This method should not be called while the serializer is in
     * the process of serializing a document.
     * <p>
     * The encoding specified for the {@link OutputFormat} must be
     * identical to the output format used with the writer.
     *
     * @param writer The output writer stream
     */
    public void setWriter(Writer writer);
  
    /**
     * NEEDSDOC Method getWriter 
     *
     *
     * NEEDSDOC (getWriter) @return
     */
    public Writer getWriter();
  
    /**
     * Specifies an output format for this serializer. It the
     * serializer has already been associated with an output format,
     * it will switch to the new format. This method should not be
     * called while the serializer is in the process of serializing
     * a document.
     *
     * @param format The output format to use
     */
    public void setOutputFormat(OutputFormat format);
  
    /**
     * Returns the output format for this serializer.
     *
     * @return The output format in use
     */
    public OutputFormat getOutputFormat();
  
    /**
     * Return a {@link DocumentHandler} interface into this serializer.
     * If the serializer does not support the {@link DocumentHandler}
     * interface, it should return null.
     *
     * @return A {@link DocumentHandler} interface into this serializer,
     *  or null if the serializer is not SAX 1 capable
     * @throws IOException An I/O exception occured
     */
    public DocumentHandler asDocumentHandler() throws IOException;
  
    /**
     * Return a {@link ContentHandler} interface into this serializer.
     * If the serializer does not support the {@link ContentHandler}
     * interface, it should return null.
     *
     * @return A {@link ContentHandler} interface into this serializer,
     *  or null if the serializer is not SAX 2 capable
     * @throws IOException An I/O exception occured
     */
    public ContentHandler asContentHandler() throws IOException;
  
    /**
     * Return a {@link DOMSerializer} interface into this serializer.
     * If the serializer does not support the {@link DOMSerializer}
     * interface, it should return null.
     *
     * @return A {@link DOMSerializer} interface into this serializer,
     *  or null if the serializer is not DOM capable
     * @throws IOException An I/O exception occured
     */
    public DOMSerializer asDOMSerializer() throws IOException;
  
    /**
     * Resets the serializer. If this method returns true, the
     * serializer may be used for subsequent serialization of new
     * documents. It is possible to change the output format and
     * output stream prior to serializing, or to use the existing
     * output format and output stream.
     *
     * @return True if serializer has been reset and can be reused
     */
    public boolean reset();
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/SerializerFactory.java
  
  Index: SerializerFactory.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize;
  
  import java.util.Enumeration;
  import java.util.Hashtable;
  import java.util.Properties;
  import java.util.StringTokenizer;
  
  import java.io.IOException;
  import java.io.InputStream;
  
  /**
   * Factory for creating default serializers. An implementation need
   * only support the default output methods (XML, HTML and Text).
   * Additional serializers may be constructed directly by the application.
   * <p>
   * The factory is used with the default serializers provided by the
   * implementation and named in the <tt>serializer.properties</tt>
   * file of the implementation.
   * <p>
   * Usage example:
   * <pre>
   * Serializer ser;
   *
   * ser = SerializerFactory.getSerializer( Method.XML );
   * </pre>
   * or,
   * <pre>
   * Serializer   ser;
   * OutputFormat format;
   *
   * format = SerializerFactory.getOutputFormat( Method.HTML );
   * ser = SerializerFactory.getSerializer( format );
   * </pre>
   * <p>
   *
   *
   *
   * @version Alpha
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   */
  public abstract class SerializerFactory
  {
  
    /**
     * The name of the properties file listing all the supported
     * serializers. (<tt>/org/xml/serilize/serializer.properties</tt>).
     */
    public static final String PropertiesResource = "serializer.properties";
  
    /**
     * The name of the property listing all the supported output
     * methods. Contains a comma delimited list of method names.
     * (<tt>serialize.methods</tt>).
     */
    public static final String PropertyMethods = "serialize.methods";
  
    /**
     * The prefix of a property supplying the class name for a
     * serializer implementing a specific method.
     * (<tt>serialize.</tt>).
     */
    public static final String PropertySerializerPrefix = "serialize.";
  
    /**
     * The prefix of a property supplying the class name for an
     * output format implementing a specific method.
     * (<tt>serialize.format.</tt>).
     */
    public static final String PropertyFormatPrefix = "serialize.format.";
  
    /**
     * Associates output methods to serializer classes.
     */
    private static Hashtable _serializers = new Hashtable();
  
    /**
     * Associates output methods to default output formats.
     */
    private static Hashtable _formats = new Hashtable();
  
    /**
     * Returns a serializer for the specified output method. Returns
     * null if no implementation exists that supports the specified
     * output method. For a list of the default output methods see
     * {@link Method}.
     *
     * @param method The output method
     * @return A suitable serializer, or null
     */
    public static Serializer getSerializer(String method)
    {
  
      Serializer ser;
      Class cls;
  
      cls = (Class) _serializers.get(method);
  
      if (cls == null)
        return null;
  
      try
      {
        ser = (Serializer) cls.newInstance();
      }
      catch (Exception except)
      {
        return null;
      }
  
      return ser;
    }
  
    /**
     * Returns a serializer for the specified output method. Returns
     * null if no implementation exists that supports the specified
     * output method. For a list of the default output methods see
     * {@link Method}.
     *
     * @param format The output format
     * @return A suitable serializer, or null
     */
    public static Serializer getSerializer(OutputFormat format)
    {
  
      Serializer ser;
      Class cls;
  
      if (format.getMethod() == null)
        throw new IllegalArgumentException(
          "The output format has not method name");
  
      cls = (Class) _serializers.get(format.getMethod());
  
      if (cls == null)
        return null;
  
      try
      {
        ser = (Serializer) cls.newInstance();
      }
      catch (Exception except)
      {
        return null;
      }
  
      ser.setOutputFormat(format);
  
      return ser;
    }
  
    /**
     * Returns an output format for the specified output method.
     * An implementation may extend {@link OutputFormat} to provide
     * additional properties.
     *
     * @param method The output method
     * @return A suitable output format
     */
    public static OutputFormat getOutputFormat(String method)
    {
  
      OutputFormat format;
      Class cls;
  
      cls = (Class) _formats.get(method);
  
      if (cls != null)
      {
        try
        {
          format = (OutputFormat) cls.newInstance();
  
          return format;
        }
        catch (Exception except){}
      }
  
      format = new OutputFormat();
  
      format.setMethod(method);
  
      return format;
    }
  
    /**
     * Returns an enumeration of all the output methods supported by this
     * implementation. The enumeration contains the names of all the output
     * methods for which this implementation provides a serializer.
     *
     * @return An enumeration of all output methods
     */
    public Enumeration listMethods()
    {
      return _serializers.keys();
    }
  
    /**
     * Static constructor loads serializers and output formats
     * from properties file.
     */
    static
    {
      Properties props;
      StringTokenizer token;
  
      try
      {
        props = new Properties();
  
        InputStream is =
          SerializerFactory.class.getResourceAsStream(PropertiesResource);
  
        if (null == is)
          System.err.println("Can't get serializer property file: "
                             + PropertiesResource);
  
        props.load(is);
  
        if (props.getProperty(PropertyMethods) == null)
          System.err.println("Serializer property file has no "
                             + PropertyMethods + " property");
        else
        {
          token = new StringTokenizer(props.getProperty(PropertyMethods), ", ");
  
          while (token.hasMoreElements())
          {
            String method;
            String clsName;
            Class cls;
  
            method = token.nextToken();
  
            // Get the serializer class that matches this output method
            clsName = props.getProperty(PropertySerializerPrefix + method);
  
            if (clsName == null)
            {
              System.err.println(
                "Could not find property for serializer implementing output method "
                + method);
            }
            else
            {
              try
              {
                cls = Class.forName(clsName);
  
                // Breaks in jview -sb
                // cls = SerializerFactory.class.getClassLoader().loadClass( clsName );
                _serializers.put(method, cls);
              }
              catch (ClassNotFoundException except)
              {
                System.err.println("Could not locate serializer class "
                                   + clsName);
              }
            }
  
            // Get the output format class that matches this output method
            clsName = props.getProperty(PropertyFormatPrefix + method);
  
            if (clsName == null)
            {
  
              // Don't complain in this case.  -sb
              // System.err.println( "Could not find property for output format implementing output method " + method );
            }
            else
            {
              try
              {
                cls = Class.forName(clsName);
  
                // Breaks in jview -sb
                // cls = SerializerFactory.class.getClassLoader().loadClass( clsName );
                _formats.put(method, cls);
              }
              catch (ClassNotFoundException except)
              {
                System.err.println("Could not locate output format class "
                                   + clsName);
              }
            }
          }
        }
      }
      catch (IOException except)
      {
        System.err.println("Error loading " + PropertiesResource + ": "
                           + except.toString());
      }
    }
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/package.html
  
  Index: package.html
  ===================================================================
  <!-- CVS $Revision: 1.1 $ $Date: 2000/11/13 16:27:02 $ -->
  <html>
    <title>Interfaces for SAX and DOM serializers.</title>
    <body>
      <p>Defines an interface for SAX and DOM serializers, a serializer
         factory and its configuration, the output format properties,
         and related interfaces.<p>
  
      <dl>
        <dt><b>Version: </b></dt><dd>Alpha  $Revision: 1.1 $ $Date: 2000/11/13 16:27:02 $</dd>
        <dt><b>Author: </b></dt><dd><a href="mailto:arkin@exoffice.com">Assaf Arkin</a></dd>
        <dt><b>Goals: </b></dt><dd>
          <ul>
            <li>Define an interface for serializers that will allow an application
                to use any implementation.</li>
            <li>Support SAX 1, SAX 2, DOM Level 1, DOM Level 2 serialization</li>
            <li>Allow implementations to extend the interfaces and provide additional
                functionality, and support implementations for any output method.</li>
            <li>Provide a factory for the default output methods (XML, HTML, Text).</li>
          </ul>
        </dd>
      </dl>
  
      <h3>The Serializer Interfaces</h3>
  
      <p>{@link serialize.Serializer} defines the interface supported by
         a serializer. A serializer implements a mechanism for producing output from
         a series of SAX events or a DOM document, in a given format (aka the output
         method). A serializer can be constructed directly, or obtained from some
         factory, it may implement the base functionality or provide additional
         functionality suitable for the given output method (e.g. indentation in
         XML, page control in PDF, etc).</p>
  
      <p>A serializer is not thread safe and may not be used concurrently, however,
         a serializer may be recyclable and used to serialize any number of documents
         with the same output method.</p>
  
      <p>Before serializing a document, the serializer must be set with the output
         stream or writer, and optionally with an {@link serialize.OutputFormat}
         specifying the output properties. Serializer implementations may support
         additional methods to control the way in which documents are serialized,
         or extend {@link serialize.OutputFormat} and offer additional
         output properties.</p>
  
      <p>{@link serialize.Serializer} and {@link serialize.OutputFormat}
         provides the minimum functionality that all serializers must support
         and that an application may depend on, and are based on the XSLT 1.0
         specification.</p>
  
      <p>For the purpose of serializing, a handle to the serializer is obtained
         that can be either a SAX 1 <tt>DocumentHandler</tt>, a SAX 2 <tt>ContentHandler</tt>
         or a DOM Level 1/2 {@link serialize.DOMSerializer}. The application
         should obtain and use only one handle at any given time and may not reuse
         the handle to serialize multiple documents. It is illegal for the application
         to call two different handle returning methods without resetting the serializer,
         or two use the same handle after resetting the serializer.</p>
  
      <p>{@link serialize.SerializerFactory} provides a means of obtaining
         the default serializers available from a given implementation. At the minimum
         an implementation should support XML, HTML and Text serializers. When additional
         serializers are available, the application may obtain them through the {@link
         serialize.SerializerFactory} or construct them directly.</p>
  
      <p>Non-escaping and whitespace preserving output control is offered for
         XML, HTML and similar output methods, but it is not mandatory that a
         serializer support these output control methods. Non-escaping and whitespace
         preserving can be set globally through {@link serialize.OutputFormat},
         or directly when serializing SAX events through {@link serialize.SerializerHandler}.
         Serializers are not required to implement the {@link serialize.SerializerHandler}
         interface.</p>
  
      <h3>Usage Examples</h3>
  
      <p>Serialize a DOM document as XML:</p>
  
      <pre>
    void printXML( Document doc, OutputStream stream, String encoding )
    {
        OutputFormat format;
        Serializer   ser;
  
        // Obtain a suitable output format for the XML method and
        // set the encoding.
        format = SerializerFactory.getOutputFormat( Method.XML );
        format.setEncoding( encoding );
  
        // Obtain a suitable serializer for the XML method and
        // set the output stream.
        ser = SerializerFactory.getSerializer( format );
        ser.setOutputStream( stream );
  
        // Use DOMSerializer to serialize the document
        ser.asDOMSerializer().serialize( doc );
    }
      </pre>
  
      <p>Serialize an empty HTML document using SAX events, reuse the serializer:</p>
  
      <pre>
    Serializer ser;
  
    // Obtain an HTML serializer once, use it multiple times.
    ser = SerializerFactory.getSerializer( Method.HTML );
    printEmptyHTML( ser, System.out );
    printEmptyHTML( ser, System.err );
    . . . 
  
    void printEmptyHTML( Serializer ser, OutputStream os )
    {
        ser.setOutputStream( os );
        ser.asDocumentHandler().startDocument();
        ser.asDocumentHandler().startElement( "html", new AttributeListImpl() );
        ser.asDocumentHandler().endElement( "html" );
        ser.asDocumentHandler().endDocument();
        ser.reset();
    }
      </pre>
  
      <h3>The Properties File</h3>
  
      <p>An implementation will include a serializer properties file called
         <tt>serializer.properties</tt> located in the <tt>serialize</tt>
         package. The properties file lists all the default serializers supported
         by that implementation. Serializers that are not listed in the properties
         file may be constructed directly by the application.</p>
  
      <p>The properties file contains a property <tt>serialize.methods</tt>
         listing all the output methods supported by the implementation (comma
         separated list). For each method a property <tt>serialize.[method]</tt>
         names the class of the {@link serialize.Serializer} implementation.
         The optional property <tt>serialize.format.[method]</tt> names the
         class of a suitable {@link serialize.OutputFormat} implementation.</p>
  
   </body>
  </html>
  
  
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/serializer.properties
  
  Index: serializer.properties
  ===================================================================
  #
  # $Revision: 1.1 $ $Date: 2000/11/13 16:27:02 $
  #
  # Note: This properties file is provided for illustrative purposes
  #       only and is not part of the interface definition.
  #       This properties file is located in the implementation JAR
  #       and different implementations will specify different
  #       implementation classes and output methods.
  #
  
  #
  # Lis the methods supported by this implementation
  #
  serialize.methods=xml,html,xhtml,text
  
  #
  # Use the transition serializer implementations for the default methods
  #
  serialize.xml=org.apache.xalan.serialize.FormatterToXML
  serialize.html=org.apache.xalan.serialize.FormatterToHTML
  serialize.text=org.apache.xalan.serialize.FormatterToText
  serialize.xhtml=org.apache.xalan.serialize.FormatterToXML
  # serialize.wml:wml=org.apache.xml.serialize.transition.WMLSerializer
  
  #
  # Use the helper output formats for the default methods
  #
  serialize.format.xml=org.apache.xalan.serialize.helpers.XMLOutputFormat
  serialize.format.html=org.apache.xalan.serialize.helpers.HTMLOutputFormat
  serialize.format.xhtml=org.apache.xalan.serialize.helpers.XHTMLOutputFormat
  serialize.format.text=org.apache.xalan.serialize.helpers.TextOutputFormat
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/helpers/HTMLOutputFormat.java
  
  Index: HTMLOutputFormat.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize.helpers;
  
  import org.apache.xalan.serialize.OutputFormat;
  import org.apache.xalan.serialize.Method;
  
  /**
   * Output format for HTML documents.
   * <p>
   * The output format affects the manner in which a document is
   * serialized. The output format determines the output method,
   * encoding, indentation, document type, and various other properties
   * that affect the manner in which a document is serialized.
   *
   * @version Alpha
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   */
  public class HTMLOutputFormat extends OutputFormat
  {
  
    /**
     * Constructor HTMLOutputFormat
     *
     */
    public HTMLOutputFormat()
    {
  
      setMethod(Method.HTML);
      setMediaType("text/html");
      setOmitXMLDeclaration(true);
      setPreserveSpace(false);
      setDoctypePublicId("-//W3C//DTD HTML 4.0//EN");
      setDoctypeSystemId(
        "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd");
    }
  
    /**
     * Constructor HTMLOutputFormat
     *
     *
     * NEEDSDOC @param encoding
     */
    public HTMLOutputFormat(String encoding)
    {
  
      this();
  
      setEncoding(encoding);
    }
  
    /**
     * Constructor HTMLOutputFormat
     *
     *
     * NEEDSDOC @param indenting
     */
    public HTMLOutputFormat(boolean indenting)
    {
  
      this();
  
      setIndent(indenting);
    }
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/helpers/TextOutputFormat.java
  
  Index: TextOutputFormat.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize.helpers;
  
  import org.apache.xalan.serialize.OutputFormat;
  import org.apache.xalan.serialize.Method;
  
  /**
   * Output format for text documents.
   * <p>
   * The output format affects the manner in which a document is
   * serialized. The output format determines the output method,
   * encoding, indentation, document type, and various other properties
   * that affect the manner in which a document is serialized.
   *
   * @version Alpha
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   */
  public class TextOutputFormat extends OutputFormat
  {
  
    /**
     * Constructor TextOutputFormat
     *
     */
    public TextOutputFormat()
    {
  
      setMethod(Method.Text);
      setMediaType("text/plain");
      setPreserveSpace(true);
    }
  
    /**
     * Constructor TextOutputFormat
     *
     *
     * NEEDSDOC @param encoding
     */
    public TextOutputFormat(String encoding)
    {
  
      this();
  
      setEncoding(encoding);
    }
  
    /**
     * Constructor TextOutputFormat
     *
     *
     * NEEDSDOC @param indenting
     */
    public TextOutputFormat(boolean indenting)
    {
  
      this();
  
      setIndent(indenting);
      setPreserveSpace(false);
    }
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/helpers/XHTMLOutputFormat.java
  
  Index: XHTMLOutputFormat.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize.helpers;
  
  import org.apache.xalan.serialize.OutputFormat;
  import org.apache.xalan.serialize.Method;
  
  /**
   * Output format for XHTML documents.
   * <p>
   * The output format affects the manner in which a document is
   * serialized. The output format determines the output method,
   * encoding, indentation, document type, and various other properties
   * that affect the manner in which a document is serialized.
   *
   * @version Alpha
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   */
  public class XHTMLOutputFormat extends OutputFormat
  {
  
    /**
     * Constructor XHTMLOutputFormat
     *
     */
    public XHTMLOutputFormat()
    {
  
      setMethod(Method.XHTML);
      setMediaType("text/html");
      setOmitXMLDeclaration(true);
      setPreserveSpace(false);
      setDoctypePublicId("-//W3C//DTD XHTML 1.0 Strict//EN");
      setDoctypeSystemId(
        "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd");
    }
  
    /**
     * Constructor XHTMLOutputFormat
     *
     *
     * NEEDSDOC @param encoding
     */
    public XHTMLOutputFormat(String encoding)
    {
  
      this();
  
      setEncoding(encoding);
    }
  
    /**
     * Constructor XHTMLOutputFormat
     *
     *
     * NEEDSDOC @param indenting
     */
    public XHTMLOutputFormat(boolean indenting)
    {
  
      this();
  
      setIndent(indenting);
    }
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/helpers/XMLOutputFormat.java
  
  Index: XMLOutputFormat.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xalan.serialize.helpers;
  
  import org.apache.xalan.serialize.OutputFormat;
  import org.apache.xalan.serialize.Method;
  
  /**
   * Output format for XML documents.
   * <p>
   * The output format affects the manner in which a document is
   * serialized. The output format determines the output method,
   * encoding, indentation, document type, and various other properties
   * that affect the manner in which a document is serialized.
   *
   * @version Alpha
   * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
   */
  public class XMLOutputFormat extends OutputFormat
  {
  
    /**
     * Constructor XMLOutputFormat
     *
     */
    public XMLOutputFormat()
    {
  
      setMethod(Method.XML);
      setMediaType("text/xml");
      setPreserveSpace(true);
    }
  
    /**
     * Constructor XMLOutputFormat
     *
     *
     * NEEDSDOC @param encoding
     */
    public XMLOutputFormat(String encoding)
    {
  
      this();
  
      setEncoding(encoding);
    }
  
    /**
     * Constructor XMLOutputFormat
     *
     *
     * NEEDSDOC @param indenting
     */
    public XMLOutputFormat(boolean indenting)
    {
  
      this();
  
      setIndent(indenting);
      setPreserveSpace(false);
    }
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xalan/serialize/helpers/package.html
  
  Index: package.html
  ===================================================================
  <!-- CVS $Revision: 1.1 $ $Date: 2000/11/13 16:27:05 $ -->
  <html>
    <title>org.apache.serialize.helpers Package</title>
    <body>
      <p>Output format for HTML, XML, XHTML, and text documents.<p>
  
      <dl>
        <dt><b>Version: </b></dt><dd>Alpha  $Revision: 1.1 $ $Date: 2000/11/13 16:27:05 $</dd>
        <dt><b>Author: </b></dt><dd><a href="mailto:arkin@exoffice.com">Assaf Arkin</a></dd>
      </dl>
  
   </body>
  </html>
  
  
  
  
  
  1.6       +3 -3      xml-xalan/java/src/org/apache/xalan/stree/CDATASectionImpl.java
  
  Index: CDATASectionImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/CDATASectionImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CDATASectionImpl.java	2000/11/07 22:22:25	1.5
  +++ CDATASectionImpl.java	2000/11/13 16:27:06	1.6
  @@ -60,7 +60,7 @@
   import org.w3c.dom.CDATASection;
   
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.ext.LexicalHandler;
   
   import org.apache.xalan.utils.FastStringBuffer;
  @@ -138,9 +138,9 @@
      *
      * @param ch Content Handler
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void dispatchSaxEvent(ContentHandler ch) throws SAXException
  +  public void dispatchSaxEvent(ContentHandler ch) throws org.xml.sax.SAXException
     {
   
       LexicalHandler lh = ((LexicalHandler) ch);
  
  
  
  1.6       +3 -3      xml-xalan/java/src/org/apache/xalan/stree/CommentImpl.java
  
  Index: CommentImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/CommentImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CommentImpl.java	2000/11/07 22:22:29	1.5
  +++ CommentImpl.java	2000/11/13 16:27:07	1.6
  @@ -60,7 +60,7 @@
   import org.w3c.dom.Comment;
   
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.ext.LexicalHandler;
   
   import org.apache.xalan.utils.FastStringBuffer;
  @@ -139,9 +139,9 @@
      *
      * @param ch Character array with comment data
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void dispatchSaxEvent(ContentHandler ch) throws SAXException
  +  public void dispatchSaxEvent(ContentHandler ch) throws org.xml.sax.SAXException
     {
   
       if (-1 == m_start)
  
  
  
  1.5       +2 -2      xml-xalan/java/src/org/apache/xalan/stree/IndexedLocPathIterator.java
  
  Index: IndexedLocPathIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/IndexedLocPathIterator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- IndexedLocPathIterator.java	2000/11/07 22:22:48	1.4
  +++ IndexedLocPathIterator.java	2000/11/13 16:27:07	1.5
  @@ -93,10 +93,10 @@
      * @param compiler Compiler for this iterator
      * @param opPos Position in OPMAP
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public IndexedLocPathIterator(Compiler compiler, int opPos)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       super(compiler, opPos);
     }
  
  
  
  1.14      +2 -2      xml-xalan/java/src/org/apache/xalan/stree/Parent.java
  
  Index: Parent.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/Parent.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Parent.java	2000/11/08 20:45:09	1.13
  +++ Parent.java	2000/11/13 16:27:07	1.14
  @@ -64,7 +64,7 @@
   import org.apache.xalan.templates.StylesheetRoot;
   import org.apache.xalan.templates.WhiteSpaceInfo;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -380,7 +380,7 @@
   
               sh.setShouldStripWhitespace(shouldStrip);
             }
  -          catch (SAXException se)
  +          catch (TransformerException se)
             {
   
               // TODO: Diagnostics
  
  
  
  1.2       +4 -3      xml-xalan/java/src/org/apache/xalan/stree/SaxEventDispatch.java
  
  Index: SaxEventDispatch.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/SaxEventDispatch.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SaxEventDispatch.java	2000/10/30 18:43:53	1.1
  +++ SaxEventDispatch.java	2000/11/13 16:27:07	1.2
  @@ -57,7 +57,7 @@
   package org.apache.xalan.stree;
   
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * This class allows a node to implement an interface that will
  @@ -85,7 +85,8 @@
      *
      * @param ch A non-null reference to a ContentHandler.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void dispatchSaxEvent(ContentHandler ch) throws SAXException;
  +  public void dispatchSaxEvent(ContentHandler ch) 
  +        throws org.xml.sax.SAXException;
   }
  
  
  
  1.18      +54 -45    xml-xalan/java/src/org/apache/xalan/stree/SourceTreeHandler.java
  
  Index: SourceTreeHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/SourceTreeHandler.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SourceTreeHandler.java	2000/11/08 20:45:11	1.17
  +++ SourceTreeHandler.java	2000/11/13 16:27:07	1.18
  @@ -74,10 +74,9 @@
   import org.w3c.dom.Document;
   
   import org.xml.sax.Attributes;
  -import org.xml.sax.ErrorHandler;
   import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.InputSource;
   
  @@ -87,6 +86,7 @@
   import javax.xml.transform.stream.StreamSource;
   import javax.xml.transform.sax.TransformerHandler;
   import javax.xml.transform.Result;
  +import javax.xml.transform.ErrorListener;
   
   
   /**
  @@ -286,9 +286,9 @@
     /**
      * Implement the startDocument event.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void startDocument() throws SAXException
  +  public void startDocument() throws org.xml.sax.SAXException
     {
       // System.out.println("startDocument: "+m_id);
       synchronized (m_root)
  @@ -329,9 +329,9 @@
     /**
      * Implement the endDocument event.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void endDocument() throws SAXException
  +  public void endDocument() throws org.xml.sax.SAXException
     {
       // System.out.println("endDocument: "+m_id);
       ((Parent) m_root).setComplete(true);
  @@ -355,7 +355,7 @@
           }
           catch(TransformerException te)
           {
  -          throw new SAXException(te);
  +          throw new org.xml.sax.SAXException(te);
           }
         }
       }
  @@ -411,11 +411,11 @@
      * @param name Name of the element
      * @param atts List of attributes associated with the element
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void startElement(
             String ns, String localName, String name, Attributes atts)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -434,10 +434,10 @@
      * @param localName Local part of the qualified name of the element
      * @param name Name of the element
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void endElement(String ns, String localName, String name)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -461,10 +461,10 @@
      * the regular {@link org.xml.sax.ContentHandler#characters
      * characters} event.</p>
      *
  -   * @exception SAXException The application may raise an exception.
  +   * @exception TransformerException The application may raise an exception.
      * @see #endCDATA
      */
  -  public void startCDATA() throws SAXException
  +  public void startCDATA() throws org.xml.sax.SAXException
     {
       m_isCData = true;
     }
  @@ -472,10 +472,10 @@
     /**
      * Report the end of a CDATA section.
      *
  -   * @exception SAXException The application may raise an exception.
  +   * @exception TransformerException The application may raise an exception.
      * @see #startCDATA
      */
  -  public void endCDATA() throws SAXException
  +  public void endCDATA() throws org.xml.sax.SAXException
     {
       m_isCData = false;
     }
  @@ -487,9 +487,9 @@
      * @param start Start index of characters to process in the array
      * @param length Number of characters to process in the array 
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void characters(char ch[], int start, int length) throws SAXException
  +  public void characters(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -514,10 +514,10 @@
      * @param start Start index of characters to process in the array
      * @param length Number of characters to process in the array
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void charactersRaw(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -535,10 +535,10 @@
      * @param start Start index of characters to process in the array
      * @param length Number of characters to process in the array
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void ignorableWhitespace(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -558,10 +558,10 @@
      * @param target Target of PI node
      * @param data Content of PI node
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void processingInstruction(String target, String data)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -582,9 +582,9 @@
      * @param ch An array holding the characters in the comment.
      * @param start The starting position in the array.
      * @param length The number of characters to use from the array.
  -   * @exception SAXException The application may raise an exception.
  +   * @exception TransformerException The application may raise an exception.
      */
  -  public void comment(char ch[], int start, int length) throws SAXException
  +  public void comment(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -609,12 +609,12 @@
      *
      * @param name The name of the entity.  If it is a parameter
      *        entity, the name will begin with '%'.
  -   * @exception SAXException The application may raise an exception.
  +   * @exception TransformerException The application may raise an exception.
      * @see #endEntity
      * @see org.xml.sax.ext.DeclHandler#internalEntityDecl
      * @see org.xml.sax.ext.DeclHandler#externalEntityDecl
      */
  -  public void startEntity(String name) throws SAXException
  +  public void startEntity(String name) throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -629,10 +629,10 @@
      * Report the end of an entity.
      *
      * @param name The name of the entity that is ending.
  -   * @exception SAXException The application may raise an exception.
  +   * @exception TransformerException The application may raise an exception.
      * @see #startEntity
      */
  -  public void endEntity(String name) throws SAXException
  +  public void endEntity(String name) throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -655,21 +655,21 @@
      *        external DTD subset, or null if none was declared.
      * @param systemId The declared system identifier for the
      *        external DTD subset, or null if none was declared.
  -   * @exception SAXException The application may raise an
  +   * @exception TransformerException The application may raise an
      *            exception.
      * @see #endDTD
      * @see #startEntity
      */
     public void startDTD(String name, String publicId, String systemId)
  -          throws SAXException{}
  +          throws org.xml.sax.SAXException{}
   
     /**
      * Report the end of DTD declarations.
      *
  -   * @exception SAXException The application may raise an exception.
  +   * @exception TransformerException The application may raise an exception.
      * @see #startDTD
      */
  -  public void endDTD() throws SAXException{}
  +  public void endDTD() throws org.xml.sax.SAXException{}
   
     /**
      * Begin the scope of a prefix-URI Namespace mapping.
  @@ -696,15 +696,15 @@
      *
      * @param prefix The Namespace prefix being declared.
      * @param uri The Namespace URI the prefix is mapped to.
  -   * @exception org.xml.sax.SAXException The client may throw
  +   * @exception javax.xml.transform.TransformerException The client may throw
      *            an exception during processing.
      * @see #endPrefixMapping
      * @see #startElement
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void startPrefixMapping(String prefix, String uri)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       synchronized (m_root)
  @@ -724,14 +724,14 @@
      * guaranteed.</p>
      *
      * @param prefix The prefix that was being mapping.
  -   * @exception org.xml.sax.SAXException The client may throw
  +   * @exception javax.xml.transform.TransformerException The client may throw
      *            an exception during processing.
      * @see #startPrefixMapping
      * @see #endElement
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void endPrefixMapping(String prefix) throws SAXException
  +  public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException
     {
       m_sourceTreeHandler.endPrefixMapping(prefix);
     }
  @@ -750,12 +750,12 @@
      *
      * @param name The name of the skipped entity.  If it is a
      *        parameter entity, the name will begin with '%'.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void skippedEntity(String name) throws SAXException{}
  +  public void skippedEntity(String name) throws org.xml.sax.SAXException{}
   
     /** Flag indicating whether to strip whitespace nodes          */
     private boolean m_shouldStripWS = false;
  @@ -822,10 +822,19 @@
      * @throws TransformerException if result is invalid for some reason.
      */
     public void setResult(Result result)
  -    throws TransformerException
  +    throws IllegalArgumentException
     {
  -    ContentHandler handler = m_transformer.createResultContentHandler(result);
  -    m_transformer.setContentHandler(handler);    
  +    if(null == result)
  +      throw new IllegalArgumentException("result should not be null");
  +    try
  +    {
  +      ContentHandler handler = m_transformer.createResultContentHandler(result);
  +      m_transformer.setContentHandler(handler); 
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new IllegalArgumentException("result could not be set");
  +    }
     }
     
     /**
  
  
  
  1.5       +11 -11    xml-xalan/java/src/org/apache/xalan/stree/StreeDOMBuilder.java
  
  Index: StreeDOMBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/StreeDOMBuilder.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StreeDOMBuilder.java	2000/11/08 20:45:14	1.4
  +++ StreeDOMBuilder.java	2000/11/13 16:27:08	1.5
  @@ -63,7 +63,7 @@
   import org.w3c.dom.Node;
   import org.w3c.dom.Element;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -140,9 +140,9 @@
      * @param start The start position in the array.
      * @param length The number of characters to read from the array.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void characters(char ch[], int start, int length) throws SAXException
  +  public void characters(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       if (m_inCData)
  @@ -159,10 +159,10 @@
      * @param start The start position in the array.
      * @param length The number of characters to read from the array.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void ignorableWhitespace(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
       append(new TextImpl(m_docImpl, ch, start, length));
     }
  @@ -178,10 +178,10 @@
      * @param start The start position in the array.
      * @param length The number of characters to read from the array.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void charactersRaw(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       append(m_doc.createProcessingInstruction("xslt-next-is-raw",
  @@ -197,9 +197,9 @@
      * @param start The starting position in the array.
      * @param length The number of characters to use from the array.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void comment(char ch[], int start, int length) throws SAXException
  +  public void comment(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
       append(new CommentImpl(m_docImpl, ch, start, length));
     }
  @@ -212,9 +212,9 @@
      * @param start The start position in the array.
      * @param length The number of characters to read from the array.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void cdata(char ch[], int start, int length) throws SAXException
  +  public void cdata(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
       append(new CDATASectionImpl(m_docImpl, ch, start, length));
     }
  
  
  
  1.6       +4 -3      xml-xalan/java/src/org/apache/xalan/stree/TextImpl.java
  
  Index: TextImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/TextImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TextImpl.java	2000/11/08 20:45:17	1.5
  +++ TextImpl.java	2000/11/13 16:27:08	1.6
  @@ -60,7 +60,7 @@
   import org.w3c.dom.Text;
   
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.utils.FastStringBuffer;
   
  @@ -126,9 +126,10 @@
      *
      * @param ch Content handler to handle SAX events
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void dispatchSaxEvent(ContentHandler ch) throws SAXException
  +  public void dispatchSaxEvent(ContentHandler ch) 
  +    throws org.xml.sax.SAXException
     {
   
       if (-1 == m_start)
  
  
  
  1.8       +23 -10    xml-xalan/java/src/org/apache/xalan/templates/AVT.java
  
  Index: AVT.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/AVT.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AVT.java	2000/10/30 18:49:32	1.7
  +++ AVT.java	2000/11/13 16:27:08	1.8
  @@ -64,8 +64,7 @@
   import org.apache.xalan.utils.StringBufferPool;
   import org.apache.xalan.utils.FastStringBuffer;
   
  -import org.xml.sax.SAXException;
  -import org.xml.sax.ErrorHandler;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xpath.XPathContext;
   import org.apache.xpath.XPath;
  @@ -73,6 +72,7 @@
   import org.apache.xalan.utils.PrefixResolver;
   import org.apache.xalan.res.XSLMessages;
   import org.apache.xalan.processor.StylesheetHandler;
  +import javax.xml.transform.ErrorListener;
   
   /**
    * <meta name="usage" content="advanced"/>
  @@ -150,10 +150,10 @@
      * NEEDSDOC @param rawName
      * NEEDSDOC @param stringedValue
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public AVT(StylesheetHandler handler, String uri, String name, String rawName, String stringedValue)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       m_uri = uri;
  @@ -339,7 +339,14 @@
                 {
   
                   // Illegal, I think...
  -                handler.warn(XSLTErrorResources.WG_FOUND_CURLYBRACE, null);  //"Found \"}\" but no attribute template open!");
  +                try
  +                {
  +                  handler.warn(XSLTErrorResources.WG_FOUND_CURLYBRACE, null);  //"Found \"}\" but no attribute template open!");
  +                }
  +                catch(org.xml.sax.SAXException se)
  +                {
  +                  throw new TransformerException(se);
  +                }
                   buffer.append("}");
   
                   // leave the lookahead to be processed by the next round.
  @@ -364,9 +371,15 @@
   
             if (null != error)
             {
  -            handler.warn(XSLTErrorResources.WG_ATTR_TEMPLATE,
  -                         new Object[]{ error });  //"Attr Template, "+error);
  -
  +            try
  +            {
  +              handler.warn(XSLTErrorResources.WG_ATTR_TEMPLATE,
  +                           new Object[]{ error });  //"Attr Template, "+error);
  +            }
  +            catch(org.xml.sax.SAXException se)
  +            {
  +              throw new TransformerException(se);
  +            }
               break;
             }
           }  // end while(tokenizer.hasMoreTokens())
  @@ -447,11 +460,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public String evaluate(
             XPathContext xctxt, Node context, org.apache.xalan.utils.PrefixResolver nsNode)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       FastStringBuffer buf = StringBufferPool.get();
  
  
  
  1.6       +2 -2      xml-xalan/java/src/org/apache/xalan/templates/AVTPart.java
  
  Index: AVTPart.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/AVTPart.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AVTPart.java	2000/10/30 18:49:33	1.5
  +++ AVTPart.java	2000/11/13 16:27:08	1.6
  @@ -91,12 +91,12 @@
      * @param nsNode The current namespace context (stylesheet tree context).
      * @param NodeList The current Context Node List.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public abstract void evaluate(
       XPathContext xctxt, FastStringBuffer buf, Node context,
         org.apache.xalan.utils.PrefixResolver nsNode)
  -        throws org.xml.sax.SAXException;
  +        throws javax.xml.transform.TransformerException;
   
     /**
      * Set the XPath support.
  
  
  
  1.6       +4 -4      xml-xalan/java/src/org/apache/xalan/templates/AVTPartXPath.java
  
  Index: AVTPartXPath.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/AVTPartXPath.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AVTPartXPath.java	2000/10/30 18:49:34	1.5
  +++ AVTPartXPath.java	2000/11/13 16:27:08	1.6
  @@ -95,11 +95,11 @@
      * NEEDSDOC @param factory
      * NEEDSDOC @param liaison
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public AVTPartXPath(
             String val, org.apache.xalan.utils.PrefixResolver nsNode, XPathParser xpathProcessor, XPathFactory factory, XPathContext liaison)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
       m_xpath = new XPath(val, null, nsNode, XPath.SELECT);
     }
  @@ -123,11 +123,11 @@
      * @param nsNode The current namespace context (stylesheet tree context).
      * @param NodeList The current Context Node List.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void evaluate(
             XPathContext xctxt, FastStringBuffer buf, Node context, org.apache.xalan.utils.PrefixResolver nsNode)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       XObject xobj = m_xpath.execute(xctxt, context, nsNode);
  
  
  
  1.4       +3 -3      xml-xalan/java/src/org/apache/xalan/templates/ElemApplyImport.java
  
  Index: ElemApplyImport.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemApplyImport.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ElemApplyImport.java	2000/10/30 18:49:35	1.3
  +++ ElemApplyImport.java	2000/11/13 16:27:08	1.4
  @@ -59,7 +59,7 @@
   import org.w3c.dom.Node;
   import org.w3c.dom.DOMException;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.res.XSLTErrorResources;
   import org.apache.xalan.transformer.TransformerImpl;
  @@ -104,11 +104,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (transformer.currentTemplateRuleIsNull())
  
  
  
  1.5       +6 -4      xml-xalan/java/src/org/apache/xalan/templates/ElemApplyTemplates.java
  
  Index: ElemApplyTemplates.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemApplyTemplates.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemApplyTemplates.java	2000/10/30 18:49:35	1.4
  +++ ElemApplyTemplates.java	2000/11/13 16:27:08	1.5
  @@ -73,6 +73,8 @@
   import org.apache.xalan.transformer.ResultTreeHandler;
   import org.apache.xalan.transformer.ClonerToResultTree;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:apply-templates.
  @@ -163,11 +165,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       transformer.pushCurrentTemplateRuleIsNull(false);
  @@ -220,11 +222,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     void pushParams(
             TransformerImpl transformer, XPathContext xctxt, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       VariableStack vars = xctxt.getVarStack();
  
  
  
  1.7       +92 -85    xml-xalan/java/src/org/apache/xalan/templates/ElemAttribute.java
  
  Index: ElemAttribute.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemAttribute.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ElemAttribute.java	2000/10/30 18:49:35	1.6
  +++ ElemAttribute.java	2000/11/13 16:27:09	1.7
  @@ -59,7 +59,7 @@
   import org.w3c.dom.Node;
   import org.w3c.dom.DOMException;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.utils.QName;
   import org.apache.xalan.res.XSLTErrorResources;
  @@ -163,127 +163,134 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
  -
  -    if (TransformerImpl.S_DEBUG)
  -      transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
  -
  -    ResultTreeHandler rhandler = transformer.getResultTreeHandler();
  -    XPathContext xctxt = transformer.getXPathContext();
  -
  -    // The attribute name has to be evaluated as an AVT.
  -    String attrName = m_name_avt.evaluate(xctxt, sourceNode, this);
  -    String origAttrName = attrName;  // save original attribute name
  -
  -    // Get the children of the xsl:attribute element as the string value.
  -    String val = transformer.transformToString(this, sourceNode, mode);
  -
  -    // If they are trying to add an attribute when there isn't an 
  -    // element pending, it is an error.
  -    if (!rhandler.isElementPending())
  +    try
       {
  -      transformer.getMsgMgr().warn(
  -        XSLTErrorResources.WG_ILLEGAL_ATTRIBUTE_NAME,
  -        new Object[]{ origAttrName });
  +      if (TransformerImpl.S_DEBUG)
  +        transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
   
  -      return;
  +      ResultTreeHandler rhandler = transformer.getResultTreeHandler();
  +      XPathContext xctxt = transformer.getXPathContext();
   
  -      // warn(templateChild, sourceNode, "Trying to add attribute after element child has been added, ignoring...");
  -    }
  +      // The attribute name has to be evaluated as an AVT.
  +      String attrName = m_name_avt.evaluate(xctxt, sourceNode, this);
  +      String origAttrName = attrName;  // save original attribute name
  +
  +      // Get the children of the xsl:attribute element as the string value.
  +      String val = transformer.transformToString(this, sourceNode, mode);
  +
  +      // If they are trying to add an attribute when there isn't an 
  +      // element pending, it is an error.
  +      if (!rhandler.isElementPending())
  +      {
  +        transformer.getMsgMgr().warn(
  +                                     XSLTErrorResources.WG_ILLEGAL_ATTRIBUTE_NAME,
  +                                     new Object[]{ origAttrName });
   
  -    if (null == attrName)
  -      return;
  +        return;
   
  -    String attrNameSpace = null;  // by default
  +        // warn(templateChild, sourceNode, "Trying to add attribute after element child has been added, ignoring...");
  +      }
   
  -    // Did they declare a namespace attribute?
  -    if (null != m_namespace_avt)
  -    {
  +      if (null == attrName)
  +        return;
   
  -      // The namespace attribute is an AVT also.
  -      attrNameSpace = m_namespace_avt.evaluate(xctxt, sourceNode, this);
  +      String attrNameSpace = null;  // by default
   
  -      if (null != attrNameSpace && attrNameSpace.length() > 0)
  +      // Did they declare a namespace attribute?
  +      if (null != m_namespace_avt)
         {
   
  -        // Get the prefix for that attribute in the result namespace.
  -        String prefix = rhandler.getPrefix(attrNameSpace);
  +        // The namespace attribute is an AVT also.
  +        attrNameSpace = m_namespace_avt.evaluate(xctxt, sourceNode, this);
   
  -        // If we didn't find the prefix mapping, make up a prefix 
  -        // and have it declared in the result tree.
  -        if (null == prefix)
  +        if (null != attrNameSpace && attrNameSpace.length() > 0)
           {
  -          prefix = rhandler.getNewUniqueNSPrefix();
   
  -          rhandler.startPrefixMapping(prefix, attrNameSpace, false);
  -        }
  +          // Get the prefix for that attribute in the result namespace.
  +          String prefix = rhandler.getPrefix(attrNameSpace);
  +
  +          // If we didn't find the prefix mapping, make up a prefix 
  +          // and have it declared in the result tree.
  +          if (null == prefix)
  +          {
  +            prefix = rhandler.getNewUniqueNSPrefix();
  +
  +            rhandler.startPrefixMapping(prefix, attrNameSpace, false);
  +          }
   
  -        // add the prefix to the attribute name.
  -        attrName = (prefix + ":" + QName.getLocalPart(attrName));
  +          // add the prefix to the attribute name.
  +          attrName = (prefix + ":" + QName.getLocalPart(attrName));
  +        }
         }
  -    }
   
  -    // Is the attribute xmlns type?
  -    else if (QName.isXMLNSDecl(origAttrName))
  -    {
  +      // Is the attribute xmlns type?
  +      else if (QName.isXMLNSDecl(origAttrName))
  +      {
   
  -      // Then just declare the namespace prefix and get out.
  -      String prefix = QName.getPrefixFromXMLNSDecl(origAttrName);
  -      String ns = rhandler.getURI(prefix);
  +        // Then just declare the namespace prefix and get out.
  +        String prefix = QName.getPrefixFromXMLNSDecl(origAttrName);
  +        String ns = rhandler.getURI(prefix);
   
  -      if (null == ns)
  -        rhandler.startPrefixMapping(prefix, val, false);
  +        if (null == ns)
  +          rhandler.startPrefixMapping(prefix, val, false);
   
  -      return;
  -    }
  +        return;
  +      }
   
  -    // Note we are using original attribute name for these tests. 
  -    else
  -    {
  +      // Note we are using original attribute name for these tests. 
  +      else
  +      {
   
  -      // Does the attribute name have a prefix?
  -      String nsprefix = QName.getPrefixPart(origAttrName);
  +        // Does the attribute name have a prefix?
  +        String nsprefix = QName.getPrefixPart(origAttrName);
   
  -      if (null == nsprefix)
  -        nsprefix = "";
  +        if (null == nsprefix)
  +          nsprefix = "";
   
  -      // We're going to claim that this must be resolved in 
  -      // the result tree namespace.
  -      try
  -      {
  -        attrNameSpace = getNamespaceForPrefix(nsprefix);
  +        // We're going to claim that this must be resolved in 
  +        // the result tree namespace.
  +        try
  +        {
  +          attrNameSpace = getNamespaceForPrefix(nsprefix);
  +
  +          if ((null == attrNameSpace) && (nsprefix.length() > 0))
  +          {
  +            transformer.getMsgMgr().warn(
  +                                         XSLTErrorResources.WG_COULD_NOT_RESOLVE_PREFIX,
  +                                         new Object[]{ nsprefix });
   
  -        if ((null == attrNameSpace) && (nsprefix.length() > 0))
  +            return;
  +          }
  +        }
  +        catch (Exception ex)
           {
  +
  +          // Could not resolve prefix
  +          attrNameSpace = null;
  +
             transformer.getMsgMgr().warn(
  -            XSLTErrorResources.WG_COULD_NOT_RESOLVE_PREFIX,
  -            new Object[]{ nsprefix });
  +                                       XSLTErrorResources.WG_COULD_NOT_RESOLVE_PREFIX,
  +                                       new Object[]{ nsprefix });
   
             return;
           }
         }
  -      catch (Exception ex)
  -      {
  -
  -        // Could not resolve prefix
  -        attrNameSpace = null;
   
  -        transformer.getMsgMgr().warn(
  -          XSLTErrorResources.WG_COULD_NOT_RESOLVE_PREFIX,
  -          new Object[]{ nsprefix });
  +      String localName = QName.getLocalPart(attrName);
   
  -        return;
  -      }
  +      rhandler.addAttribute(attrNameSpace, localName, attrName, "CDATA", val);
       }
  -
  -    String localName = QName.getLocalPart(attrName);
  -
  -    rhandler.addAttribute(attrNameSpace, localName, attrName, "CDATA", val);
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
  +    
     }
   
     /**
  
  
  
  1.3       +4 -4      xml-xalan/java/src/org/apache/xalan/templates/ElemAttributeSet.java
  
  Index: ElemAttributeSet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemAttributeSet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ElemAttributeSet.java	2000/10/30 18:49:39	1.2
  +++ ElemAttributeSet.java	2000/11/13 16:27:09	1.3
  @@ -59,7 +59,7 @@
   import org.w3c.dom.Node;
   import org.w3c.dom.DOMException;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.utils.QName;
   import org.apache.xalan.res.XSLTErrorResources;
  @@ -139,16 +139,16 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (transformer.isRecursiveAttrSet(this))
       {
  -      throw new SAXException(
  +      throw new TransformerException(
           XSLMessages.createMessage(
             XSLTErrorResources.ER_XSLATTRSET_USED_ITSELF,
             new Object[]{ m_qname.getLocalPart() }));  //"xsl:attribute-set '"+m_qname.m_localpart+
  
  
  
  1.7       +3 -2      xml-xalan/java/src/org/apache/xalan/templates/ElemCallTemplate.java
  
  Index: ElemCallTemplate.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemCallTemplate.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ElemCallTemplate.java	2000/11/03 23:28:07	1.6
  +++ ElemCallTemplate.java	2000/11/13 16:27:09	1.7
  @@ -69,6 +69,7 @@
   import org.apache.xalan.transformer.TransformerImpl;
   
   import javax.xml.transform.SourceLocator;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="advanced"/>
  @@ -148,11 +149,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (TransformerImpl.S_DEBUG)
  
  
  
  1.4       +4 -2      xml-xalan/java/src/org/apache/xalan/templates/ElemChoose.java
  
  Index: ElemChoose.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemChoose.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ElemChoose.java	2000/10/30 18:49:40	1.3
  +++ ElemChoose.java	2000/11/13 16:27:09	1.4
  @@ -67,6 +67,8 @@
   import org.apache.xalan.res.XSLTErrorResources;
   import org.apache.xalan.transformer.TransformerImpl;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:choose.
  @@ -114,11 +116,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (TransformerImpl.S_DEBUG)
  
  
  
  1.4       +25 -17    xml-xalan/java/src/org/apache/xalan/templates/ElemComment.java
  
  Index: ElemComment.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemComment.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ElemComment.java	2000/10/30 18:49:41	1.3
  +++ ElemComment.java	2000/11/13 16:27:09	1.4
  @@ -65,6 +65,8 @@
   import org.apache.xalan.res.XSLTErrorResources;
   import org.apache.xalan.transformer.TransformerImpl;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:comment.
  @@ -106,27 +108,33 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
  -
  -    if (TransformerImpl.S_DEBUG)
  -      transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
  -
  -    // Note the content model is:
  -    // <!ENTITY % instructions "
  -    // %char-instructions;
  -    // | xsl:processing-instruction
  -    // | xsl:comment
  -    // | xsl:element
  -    // | xsl:attribute
  -    // ">
  -    String data = transformer.transformToString(this, sourceNode, mode);
  -
  -    transformer.getResultTreeHandler().comment(data);
  +    try
  +    {
  +      if (TransformerImpl.S_DEBUG)
  +        transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
  +
  +      // Note the content model is:
  +      // <!ENTITY % instructions "
  +      // %char-instructions;
  +      // | xsl:processing-instruction
  +      // | xsl:comment
  +      // | xsl:element
  +      // | xsl:attribute
  +      // ">
  +      String data = transformer.transformToString(this, sourceNode, mode);
  +
  +      transformer.getResultTreeHandler().comment(data);
  +    }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
     }
   
     /**
  
  
  
  1.5       +31 -23    xml-xalan/java/src/org/apache/xalan/templates/ElemCopy.java
  
  Index: ElemCopy.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemCopy.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemCopy.java	2000/10/30 18:49:42	1.4
  +++ ElemCopy.java	2000/11/13 16:27:09	1.5
  @@ -70,6 +70,8 @@
   import org.apache.xalan.transformer.TransformerImpl;
   import org.apache.xalan.transformer.ResultTreeHandler;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:copy.
  @@ -125,43 +127,49 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
  -
  -    short nodeType = sourceNode.getNodeType();
  -
  -    if ((Node.DOCUMENT_NODE != nodeType))
  +    try
       {
  -      ResultTreeHandler rthandler = transformer.getResultTreeHandler();
  +      short nodeType = sourceNode.getNodeType();
   
  -      // TODO: Process the use-attribute-sets stuff
  -      rthandler.cloneToResultTree(sourceNode, false);
  -
  -      if (Node.ELEMENT_NODE == nodeType)
  +      if ((Node.DOCUMENT_NODE != nodeType))
         {
  -        super.execute(transformer, sourceNode, mode);
  -        rthandler.processNSDecls(sourceNode);
  -        transformer.executeChildTemplates(this, sourceNode, mode);
  -        transformer.getResultTreeHandler().endElement("", "",
  -                sourceNode.getNodeName());
  +        ResultTreeHandler rthandler = transformer.getResultTreeHandler();
  +
  +        // TODO: Process the use-attribute-sets stuff
  +        rthandler.cloneToResultTree(sourceNode, false);
  +
  +        if (Node.ELEMENT_NODE == nodeType)
  +        {
  +          super.execute(transformer, sourceNode, mode);
  +          rthandler.processNSDecls(sourceNode);
  +          transformer.executeChildTemplates(this, sourceNode, mode);
  +          transformer.getResultTreeHandler().endElement("", "",
  +                                                        sourceNode.getNodeName());
  +        }
  +        else
  +        {
  +          if (TransformerImpl.S_DEBUG)
  +            transformer.getTraceManager().fireTraceEvent(sourceNode, mode,
  +                                                         this);
  +        }
         }
         else
         {
           if (TransformerImpl.S_DEBUG)
  -          transformer.getTraceManager().fireTraceEvent(sourceNode, mode,
  -                  this);
  +          transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
  +
  +        transformer.executeChildTemplates(this, sourceNode, mode);
         }
       }
  -    else
  +    catch(org.xml.sax.SAXException se)
       {
  -      if (TransformerImpl.S_DEBUG)
  -        transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
  -
  -      transformer.executeChildTemplates(this, sourceNode, mode);
  +      throw new TransformerException(se);
       }
     }
   }
  
  
  
  1.5       +68 -58    xml-xalan/java/src/org/apache/xalan/templates/ElemCopyOf.java
  
  Index: ElemCopyOf.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemCopyOf.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemCopyOf.java	2000/10/30 18:49:43	1.4
  +++ ElemCopyOf.java	2000/11/13 16:27:09	1.5
  @@ -70,6 +70,8 @@
   import org.apache.xalan.transformer.TransformerImpl;
   import org.apache.xalan.transformer.ResultTreeHandler;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:copy-of.
  @@ -140,84 +142,92 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
  -    if (TransformerImpl.S_DEBUG)
  -      transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
  +    try
  +    {
  +      if (TransformerImpl.S_DEBUG)
  +        transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
   
  -    XPathContext xctxt = transformer.getXPathContext();
  -    XObject value = m_selectExpression.execute(xctxt, sourceNode, this);
  +      XPathContext xctxt = transformer.getXPathContext();
  +      XObject value = m_selectExpression.execute(xctxt, sourceNode, this);
   
  -    if (TransformerImpl.S_DEBUG)
  -      transformer.getTraceManager().fireSelectedEvent(sourceNode, this,
  -              "select", m_selectExpression, value);
  +      if (TransformerImpl.S_DEBUG)
  +        transformer.getTraceManager().fireSelectedEvent(sourceNode, this,
  +                                                        "select", m_selectExpression, value);
   
  -    ResultTreeHandler handler = transformer.getResultTreeHandler();
  +      ResultTreeHandler handler = transformer.getResultTreeHandler();
   
  -    if (null != value)
  -    {
  -      int type = value.getType();
  -      String s;
  -
  -      switch (type)
  +      if (null != value)
         {
  -      case XObject.CLASS_BOOLEAN :
  -      case XObject.CLASS_NUMBER :
  -      case XObject.CLASS_STRING :
  -        s = value.str();
  -
  -        handler.characters(s.toCharArray(), 0, s.length());
  -        break;
  -      case XObject.CLASS_NODESET :
  -
  -        // System.out.println(value);
  -        NodeIterator nl = value.nodeset();
  -
  -        // Copy the tree.
  -        org.apache.xalan.utils.TreeWalker tw =
  -          new TreeWalker2Result(transformer, handler);
  -        Node pos;
  +        int type = value.getType();
  +        String s;
   
  -        while (null != (pos = nl.nextNode()))
  +        switch (type)
           {
  -          short t = pos.getNodeType();
  +        case XObject.CLASS_BOOLEAN :
  +        case XObject.CLASS_NUMBER :
  +        case XObject.CLASS_STRING :
  +          s = value.str();
  +
  +          handler.characters(s.toCharArray(), 0, s.length());
  +          break;
  +        case XObject.CLASS_NODESET :
  +
  +          // System.out.println(value);
  +          NodeIterator nl = value.nodeset();
  +
  +          // Copy the tree.
  +          org.apache.xalan.utils.TreeWalker tw =
  +                                                new TreeWalker2Result(transformer, handler);
  +          Node pos;
   
  -          // If we just copy the whole document, a startDoc and endDoc get 
  -          // generated, so we need to only walk the child nodes.
  -          if (t == Node.DOCUMENT_NODE)
  +          while (null != (pos = nl.nextNode()))
             {
  -            for (Node child = pos.getFirstChild(); child != null;
  -                    child = child.getNextSibling())
  +            short t = pos.getNodeType();
  +
  +            // If we just copy the whole document, a startDoc and endDoc get 
  +            // generated, so we need to only walk the child nodes.
  +            if (t == Node.DOCUMENT_NODE)
               {
  -              tw.traverse(child);
  +              for (Node child = pos.getFirstChild(); child != null;
  +                   child = child.getNextSibling())
  +              {
  +                tw.traverse(child);
  +              }
               }
  -          }
  -          else if (t == Node.ATTRIBUTE_NODE)
  -          {
  -            handler.addAttribute((Attr) pos);
  -          }
  -          else
  -          {
  -            tw.traverse(pos);
  +            else if (t == Node.ATTRIBUTE_NODE)
  +            {
  +              handler.addAttribute((Attr) pos);
  +            }
  +            else
  +            {
  +              tw.traverse(pos);
  +            }
             }
  -        }
  -        break;
  -      case XObject.CLASS_RTREEFRAG :
  -        handler.outputResultTreeFragment(value,
  -                                         transformer.getXPathContext());
  -        break;
  -      default :
  -        s = value.str();
  +          break;
  +        case XObject.CLASS_RTREEFRAG :
  +          handler.outputResultTreeFragment(value,
  +                                           transformer.getXPathContext());
  +          break;
  +        default :
  +          s = value.str();
   
  -        handler.characters(s.toCharArray(), 0, s.length());
  -        break;
  +          handler.characters(s.toCharArray(), 0, s.length());
  +          break;
  +        }
         }
       }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
  +
     }
   
     /**
  
  
  
  1.8       +86 -77    xml-xalan/java/src/org/apache/xalan/templates/ElemElement.java
  
  Index: ElemElement.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemElement.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ElemElement.java	2000/10/30 18:49:44	1.7
  +++ ElemElement.java	2000/11/13 16:27:09	1.8
  @@ -66,6 +66,8 @@
   import org.apache.xalan.transformer.TransformerImpl;
   import org.apache.xalan.transformer.ResultTreeHandler;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:decimal-format.
  @@ -190,113 +192,120 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
  -
  -    ResultTreeHandler rhandler = transformer.getResultTreeHandler();
  -    XPathContext xctxt = transformer.getXPathContext();
  -    String elemName = m_name_avt.evaluate(xctxt, sourceNode, this);
  -
  -    // make sure that if a prefix is specified on the attribute name, it is valid
  -    int indexOfNSSep = elemName.indexOf(':');
  -    String ns = "";
  -
  -    if (indexOfNSSep >= 0)
  +    try
       {
  -      String nsprefix = elemName.substring(0, indexOfNSSep);
  +
  +      ResultTreeHandler rhandler = transformer.getResultTreeHandler();
  +      XPathContext xctxt = transformer.getXPathContext();
  +      String elemName = m_name_avt.evaluate(xctxt, sourceNode, this);
  +
  +      // make sure that if a prefix is specified on the attribute name, it is valid
  +      int indexOfNSSep = elemName.indexOf(':');
  +      String ns = "";
   
  -      // Catch the exception this may cause. We don't want to stop processing.
  -      try
  +      if (indexOfNSSep >= 0)
         {
  -        ns = getNamespaceForPrefix(nsprefix);
  +        String nsprefix = elemName.substring(0, indexOfNSSep);
   
  -        // Check if valid QName. Assuming that if the prefix is defined,
  -        // it is valid.
  -        if (indexOfNSSep + 1 == elemName.length()
  -                ||!isValidNCName(elemName.substring(indexOfNSSep + 1)))
  +        // Catch the exception this may cause. We don't want to stop processing.
  +        try
           {
  -          transformer.getMsgMgr().warn(
  -            XSLTErrorResources.WG_ILLEGAL_ATTRIBUTE_NAME,
  -            new Object[]{ elemName });
  +          ns = getNamespaceForPrefix(nsprefix);
  +
  +          // Check if valid QName. Assuming that if the prefix is defined,
  +          // it is valid.
  +          if (indexOfNSSep + 1 == elemName.length()
  +              ||!isValidNCName(elemName.substring(indexOfNSSep + 1)))
  +          {
  +            transformer.getMsgMgr().warn(
  +                                         XSLTErrorResources.WG_ILLEGAL_ATTRIBUTE_NAME,
  +                                         new Object[]{ elemName });
   
  -          elemName = null;
  +            elemName = null;
  +          }
           }
  -      }
  -      catch (Exception ex)
  -      {
  +        catch (Exception ex)
  +        {
   
  -        // Could not resolve prefix
  -        ns = null;
  +          // Could not resolve prefix
  +          ns = null;
   
  -        transformer.getMsgMgr().warn(
  -          XSLTErrorResources.WG_COULD_NOT_RESOLVE_PREFIX,
  -          new Object[]{ nsprefix });
  +          transformer.getMsgMgr().warn(
  +                                       XSLTErrorResources.WG_COULD_NOT_RESOLVE_PREFIX,
  +                                       new Object[]{ nsprefix });
  +        }
         }
  -    }
   
  -    // Check if valid QName
  -    else if (elemName.length() == 0 ||!isValidNCName(elemName))
  -    {
  -      transformer.getMsgMgr().warn(
  -        XSLTErrorResources.WG_ILLEGAL_ATTRIBUTE_NAME,
  -        new Object[]{ elemName });
  +      // Check if valid QName
  +      else if (elemName.length() == 0 ||!isValidNCName(elemName))
  +      {
  +        transformer.getMsgMgr().warn(
  +                                     XSLTErrorResources.WG_ILLEGAL_ATTRIBUTE_NAME,
  +                                     new Object[]{ elemName });
   
  -      elemName = null;
  -    }
  +        elemName = null;
  +      }
   
  -    // Only do this if name is valid
  -    String elemNameSpace = null;
  -    String prefix = null;
  +      // Only do this if name is valid
  +      String elemNameSpace = null;
  +      String prefix = null;
   
  -    if (null != elemName && null != ns)
  -    {
  -      if (null != m_namespace_avt)
  +      if (null != elemName && null != ns)
         {
  -        elemNameSpace = m_namespace_avt.evaluate(xctxt, sourceNode, this);
  -
  -        if (null != elemNameSpace && elemNameSpace.length() > 0)
  +        if (null != m_namespace_avt)
           {
  -
  -          // Get the prefix for that attribute in the result namespace.
  -          prefix = rhandler.getPrefix(elemNameSpace);
  +          elemNameSpace = m_namespace_avt.evaluate(xctxt, sourceNode, this);
   
  -          // If we didn't find the prefix mapping, make up a prefix 
  -          // and have it declared in the result tree.
  -          if (null == prefix)
  +          if (null != elemNameSpace && elemNameSpace.length() > 0)
             {
  -            prefix = rhandler.getNewUniqueNSPrefix();
  -          }
  +
  +            // Get the prefix for that attribute in the result namespace.
  +            prefix = rhandler.getPrefix(elemNameSpace);
   
  -          // add the prefix to the attribute name.
  -          elemName = (prefix + ":" + QName.getLocalPart(elemName));
  +            // If we didn't find the prefix mapping, make up a prefix 
  +            // and have it declared in the result tree.
  +            if (null == prefix)
  +            {
  +              prefix = rhandler.getNewUniqueNSPrefix();
  +            }
  +
  +            // add the prefix to the attribute name.
  +            elemName = (prefix + ":" + QName.getLocalPart(elemName));
  +          }
           }
  -      }
   
  -      // Add namespace declarations.
  -      executeNSDecls(transformer);
  +        // Add namespace declarations.
  +        executeNSDecls(transformer);
   
  -      if (null != prefix)
  -        rhandler.startPrefixMapping(prefix, elemNameSpace, true);
  +        if (null != prefix)
  +          rhandler.startPrefixMapping(prefix, elemNameSpace, true);
   
  -      rhandler.startElement(elemNameSpace, QName.getLocalPart(elemName),
  -                            elemName);
  -    }
  +        rhandler.startElement(elemNameSpace, QName.getLocalPart(elemName),
  +                              elemName);
  +      }
   
  -    // Instantiate content of xsl:element. Note that if startElement was not
  -    // called(ie: if invalid element name, the element's attributes will be
  -    // excluded because transformer.m_pendingElementName will be null.
  -    super.execute(transformer, sourceNode, mode);
  -    transformer.executeChildTemplates(this, sourceNode, mode);
  +      // Instantiate content of xsl:element. Note that if startElement was not
  +      // called(ie: if invalid element name, the element's attributes will be
  +      // excluded because transformer.m_pendingElementName will be null.
  +      super.execute(transformer, sourceNode, mode);
  +      transformer.executeChildTemplates(this, sourceNode, mode);
   
  -    // Now end the element if name was valid
  -    if (null != elemName && null != ns)
  +      // Now end the element if name was valid
  +      if (null != elemName && null != ns)
  +      {
  +        rhandler.endElement("", "", elemName);
  +        unexecuteNSDecls(transformer);
  +      }
  +    }
  +    catch(SAXException se)
       {
  -      rhandler.endElement("", "", elemName);
  -      unexecuteNSDecls(transformer);
  +      throw new TransformerException(se);
       }
     }
   }
  
  
  
  1.14      +63 -54    xml-xalan/java/src/org/apache/xalan/templates/ElemExtensionCall.java
  
  Index: ElemExtensionCall.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemExtensionCall.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ElemExtensionCall.java	2000/11/07 04:52:18	1.13
  +++ ElemExtensionCall.java	2000/11/13 16:27:10	1.14
  @@ -79,6 +79,8 @@
   import org.apache.xalan.extensions.ExtensionsTable;
   import org.apache.xalan.transformer.TransformerImpl;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement an extension element.
  @@ -240,83 +242,90 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
  -    transformer.getResultTreeHandler().flushPending();
  -
  -    XPathContext liaison = ((XPathContext) transformer.getXPathContext());
  -    ExtensionsTable etable = liaison.getExtensionsTable();
  -    ExtensionHandler nsh = etable.get(m_extns);
  -
  -    // We're seeing this extension namespace used for the first time.  Try to
  -    // autodeclare it as a java namespace.
  -
  -    if (null == nsh)
  -    {
  -      nsh = etable.makeJavaNamespace(m_extns);
  -
  -      etable.addExtensionNamespace(m_extns, nsh);
  -    }
  -
       try
       {
  +      transformer.getResultTreeHandler().flushPending();
   
  -      // We set isAvailable to true so that if the extension element processes its
  -      // children, and one of those children is an <xsl:fallback>, it won't get invoked.
  +      XPathContext liaison = ((XPathContext) transformer.getXPathContext());
  +      ExtensionsTable etable = liaison.getExtensionsTable();
  +      ExtensionHandler nsh = etable.get(m_extns);
   
  -      isAvailable = true;
  -      nsh.processElement(this.getLocalName(), this, transformer,
  -                         getStylesheet(), sourceNode.getOwnerDocument(),
  -                         sourceNode, mode, this);
  -    }
  -    catch (Exception e)
  -    {
  +      // We're seeing this extension namespace used for the first time.  Try to
  +      // autodeclare it as a java namespace.
  +
  +      if (null == nsh)
  +      {
  +        nsh = etable.makeJavaNamespace(m_extns);
   
  -      // System.out.println(e);
  -      // e.printStackTrace();
  -      String msg = e.getMessage();
  +        etable.addExtensionNamespace(m_extns, nsh);
  +      }
   
  -      if (null != msg)
  +      try
         {
  -        if (msg.startsWith("Stopping after fatal error:"))
  -        {
  -          msg = msg.substring("Stopping after fatal error:".length());
  -        }
   
  -        transformer.getMsgMgr().message(
  -          XSLMessages.createMessage(
  -          XSLTErrorResources.ER_CALL_TO_EXT_FAILED, new Object[]{ msg }),
  -          false);  //"Call to extension element failed: "+msg);
  +        // We set isAvailable to true so that if the extension element processes its
  +        // children, and one of those children is an <xsl:fallback>, it won't get invoked.
   
  -        // e.printStackTrace();
  -        // System.exit(-1);
  +        isAvailable = true;
  +        nsh.processElement(this.getLocalName(), this, transformer,
  +                           getStylesheet(), sourceNode.getOwnerDocument(),
  +                           sourceNode, mode, this);
         }
  +      catch (Exception e)
  +      {
   
  -      // transformer.message(msg);
  -      isAvailable = false;
  +        // System.out.println(e);
  +        // e.printStackTrace();
  +        String msg = e.getMessage();
   
  -      for (ElemTemplateElement child = m_firstChild; child != null;
  -              child = child.m_nextSibling)
  -      {
  -        if (child.getXSLToken() == Constants.ELEMNAME_FALLBACK)
  +        if (null != msg)
           {
  -          try
  +          if (msg.startsWith("Stopping after fatal error:"))
             {
  -            transformer.pushElemTemplateElement(child);
  -            child.execute(transformer, sourceNode, mode);
  +            msg = msg.substring("Stopping after fatal error:".length());
             }
  -          finally
  +
  +          transformer.getMsgMgr().message(
  +                                          XSLMessages.createMessage(
  +                                                                    XSLTErrorResources.ER_CALL_TO_EXT_FAILED, new Object[]{ msg }),
  +                                          false);  //"Call to extension element failed: "+msg);
  +
  +          // e.printStackTrace();
  +          // System.exit(-1);
  +        }
  +
  +        // transformer.message(msg);
  +        isAvailable = false;
  +
  +        for (ElemTemplateElement child = m_firstChild; child != null;
  +             child = child.m_nextSibling)
  +        {
  +          if (child.getXSLToken() == Constants.ELEMNAME_FALLBACK)
             {
  -            transformer.popElemTemplateElement();
  +            try
  +            {
  +              transformer.pushElemTemplateElement(child);
  +              child.execute(transformer, sourceNode, mode);
  +            }
  +            finally
  +            {
  +              transformer.popElemTemplateElement();
  +            }
             }
           }
         }
       }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
     }
   
     /**
  @@ -350,11 +359,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public String getAttribute(
             String rawName, Node sourceNode, TransformerImpl transformer)
  -            throws SAXException
  +            throws TransformerException
     {
   
       AVT avt = getLiteralResultAttribute(rawName);
  
  
  
  1.11      +5 -5      xml-xalan/java/src/org/apache/xalan/templates/ElemExtensionDecl.java
  
  Index: ElemExtensionDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemExtensionDecl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ElemExtensionDecl.java	2000/11/03 23:28:07	1.10
  +++ ElemExtensionDecl.java	2000/11/13 16:27:10	1.11
  @@ -67,7 +67,7 @@
   import org.apache.xalan.extensions.ExtensionsTable;
   import org.apache.xalan.transformer.TransformerImpl;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xpath.XPathContext;
   import org.apache.xalan.res.XSLTErrorResources;
  @@ -241,9 +241,9 @@
      *
      * @param transformer The XSLT TransformerFactory.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void runtimeInit(TransformerImpl transformer) throws SAXException
  +  public void runtimeInit(TransformerImpl transformer) throws TransformerException
     {
   
       String lang = null;
  @@ -253,7 +253,7 @@
       String declNamespace = getNamespaceForPrefix(prefix);
   
       if (null == declNamespace)
  -      throw new SAXException("Prefix " + prefix
  +      throw new TransformerException("Prefix " + prefix
                                + " does not have a corresponding "
                                + "namespace declaration");
   
  @@ -290,7 +290,7 @@
         lang = "javaclass";
   
       if (lang.equals("javaclass") && (scriptSrc != null))
  -      throw new SAXException("Element content not allowed for lang=javaclass "
  +      throw new TransformerException("Element content not allowed for lang=javaclass "
                                + scriptSrc);
   
       XPathContext liaison = ((XPathContext) transformer.getXPathContext());
  
  
  
  1.4       +4 -2      xml-xalan/java/src/org/apache/xalan/templates/ElemFallback.java
  
  Index: ElemFallback.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemFallback.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ElemFallback.java	2000/10/30 18:49:48	1.3
  +++ ElemFallback.java	2000/11/13 16:27:10	1.4
  @@ -66,6 +66,8 @@
   import org.apache.xalan.res.XSLTErrorResources;
   import org.apache.xalan.transformer.TransformerImpl;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:fallback.
  @@ -111,11 +113,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (Constants.ELEMNAME_EXTENSIONCALL == m_parentNode.getXSLToken())
  
  
  
  1.6       +136 -128  xml-xalan/java/src/org/apache/xalan/templates/ElemForEach.java
  
  Index: ElemForEach.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemForEach.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ElemForEach.java	2000/11/03 23:28:08	1.5
  +++ ElemForEach.java	2000/11/13 16:27:10	1.6
  @@ -77,6 +77,7 @@
   import org.apache.xalan.stree.SaxEventDispatch;
   
   import javax.xml.transform.SourceLocator;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="advanced"/>
  @@ -207,11 +208,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       transformer.pushCurrentTemplateRuleIsNull(true);
  @@ -250,11 +251,11 @@
      *
      * NEEDSDOC (sortNodes) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected NodeIterator sortNodes(
             XPathContext xctxt, Vector keys, NodeIterator sourceNodes)
  -            throws SAXException
  +            throws TransformerException
     {
   
       NodeSorter sorter = new NodeSorter(xctxt);
  @@ -310,11 +311,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     void pushParams(
             TransformerImpl transformer, XPathContext xctxt, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       VariableStack vars = xctxt.getVarStack();
  @@ -343,7 +344,7 @@
      *
      * NEEDSDOC @param transformer
      * NEEDSDOC @param sourceNode
  -   * @exception SAXException Thrown in a variety of circumstances.
  +   * @exception TransformerException Thrown in a variety of circumstances.
      * @param stylesheetTree The owning stylesheet tree.
      * @param xslInstruction The stylesheet element context (depricated -- I do
      *      not think we need this).
  @@ -359,156 +360,163 @@
      */
     public void transformSelectedNodes(
             TransformerImpl transformer, Node sourceNode, ElemTemplateElement template, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
  -    boolean rdebug = TransformerImpl.S_DEBUG;
  -    XPathContext xctxt = transformer.getXPathContext();
  -    XPath selectPattern = getSelectOrDefault();
  -    XObject selectResult = selectPattern.execute(xctxt, sourceNode, this);
  -    
  -    if (rdebug)
  -      transformer.getTraceManager().fireSelectedEvent(sourceNode, this,
  -              "test", selectPattern, selectResult);
  -    
  -    Vector keys = transformer.processSortKeys(this, sourceNode);
  -    NodeIterator sourceNodes = selectResult.nodeset();
  -
  -    // Sort if we need to.
  -    if (null != keys)
  -      sourceNodes = sortNodes(xctxt, keys, sourceNodes);
  -
  -    pushParams(transformer, xctxt, sourceNode, mode);
  -
  -    // Push the ContextNodeList on a stack, so that select="position()"
  -    // and the like will work.
  -    // System.out.println("pushing context node list...");
  -    SourceLocator savedLocator = xctxt.getSAXLocator();
  -
  -    xctxt.pushContextNodeList((ContextNodeList) sourceNodes);
  -    transformer.pushElemTemplateElement(null);
  -
  -    ResultTreeHandler rth = transformer.getResultTreeHandler();
  -    StylesheetRoot sroot = getStylesheetRoot();
  -    TemplateList tl = sroot.getTemplateListComposed();
  -
  -    // StylesheetComposed stylesheet = getStylesheetComposed();
  -    StackGuard guard = transformer.getStackGuard();
  -    boolean check = (guard.m_recursionLimit > -1);
  -    boolean quiet = transformer.getQuietConflictWarnings();
  -    boolean needToFindTemplate = (null == template);
  -
       try
       {
  -      Node child;
  +      boolean rdebug = TransformerImpl.S_DEBUG;
  +      XPathContext xctxt = transformer.getXPathContext();
  +      XPath selectPattern = getSelectOrDefault();
  +      XObject selectResult = selectPattern.execute(xctxt, sourceNode, this);
  +      
  +      if (rdebug)
  +        transformer.getTraceManager().fireSelectedEvent(sourceNode, this,
  +                                                        "test", selectPattern, selectResult);
  +      
  +      Vector keys = transformer.processSortKeys(this, sourceNode);
  +      NodeIterator sourceNodes = selectResult.nodeset();
  +
  +      // Sort if we need to.
  +      if (null != keys)
  +        sourceNodes = sortNodes(xctxt, keys, sourceNodes);
  +
  +      pushParams(transformer, xctxt, sourceNode, mode);
  +
  +      // Push the ContextNodeList on a stack, so that select="position()"
  +      // and the like will work.
  +      // System.out.println("pushing context node list...");
  +      SourceLocator savedLocator = xctxt.getSAXLocator();
  +
  +      xctxt.pushContextNodeList((ContextNodeList) sourceNodes);
  +      transformer.pushElemTemplateElement(null);
  +
  +      ResultTreeHandler rth = transformer.getResultTreeHandler();
  +      StylesheetRoot sroot = getStylesheetRoot();
  +      TemplateList tl = sroot.getTemplateListComposed();
  +
  +      // StylesheetComposed stylesheet = getStylesheetComposed();
  +      StackGuard guard = transformer.getStackGuard();
  +      boolean check = (guard.m_recursionLimit > -1);
  +      boolean quiet = transformer.getQuietConflictWarnings();
  +      boolean needToFindTemplate = (null == template);
   
  -      while (null != (child = sourceNodes.nextNode()))
  +      try
         {
  -        if (needToFindTemplate)
  -        {
  -          template = tl.getTemplate(xctxt, child, mode, quiet);
  +        Node child;
   
  -          // If that didn't locate a node, fall back to a default template rule.
  -          // See http://www.w3.org/TR/xslt#built-in-rule.
  -          if (null == template)
  +        while (null != (child = sourceNodes.nextNode()))
  +        {
  +          if (needToFindTemplate)
             {
  -            switch (child.getNodeType())
  +            template = tl.getTemplate(xctxt, child, mode, quiet);
  +
  +            // If that didn't locate a node, fall back to a default template rule.
  +            // See http://www.w3.org/TR/xslt#built-in-rule.
  +            if (null == template)
               {
  -            case Node.DOCUMENT_FRAGMENT_NODE :
  -            case Node.ELEMENT_NODE :
  -              template = sroot.getDefaultRule();
  -              break;
  -            case Node.CDATA_SECTION_NODE :
  -              if (child.supports(SaxEventDispatch.SUPPORTSINTERFACE, "1.0"))
  -              {
  -                ((SaxEventDispatch) child).dispatchSaxEvent(rth);
  -              }
  -              else
  +              switch (child.getNodeType())
                 {
  -                rth.startCDATA();
  +              case Node.DOCUMENT_FRAGMENT_NODE :
  +              case Node.ELEMENT_NODE :
  +                template = sroot.getDefaultRule();
  +                break;
  +              case Node.CDATA_SECTION_NODE :
  +                if (child.supports(SaxEventDispatch.SUPPORTSINTERFACE, "1.0"))
  +                {
  +                  ((SaxEventDispatch) child).dispatchSaxEvent(rth);
  +                }
  +                else
  +                {
  +                  rth.startCDATA();
  +
  +                  String data = child.getNodeValue();
  +
  +                  rth.characters(data.toCharArray(), 0, data.length());
  +                  rth.endCDATA();
  +                }
  +
  +                continue;
  +              case Node.TEXT_NODE :
  +                if (child.supports(SaxEventDispatch.SUPPORTSINTERFACE, "1.0"))
  +                {
  +                  ((SaxEventDispatch) child).dispatchSaxEvent(rth);
  +                }
  +                else
  +                {
  +                  String data = child.getNodeValue();
   
  -                String data = child.getNodeValue();
  -
  -                rth.characters(data.toCharArray(), 0, data.length());
  -                rth.endCDATA();
  -              }
  +                  rth.characters(data.toCharArray(), 0, data.length());
  +                }
   
  -              continue;
  -            case Node.TEXT_NODE :
  -              if (child.supports(SaxEventDispatch.SUPPORTSINTERFACE, "1.0"))
  -              {
  -                ((SaxEventDispatch) child).dispatchSaxEvent(rth);
  -              }
  -              else
  -              {
  +                continue;
  +              case Node.ATTRIBUTE_NODE :
                   String data = child.getNodeValue();
   
                   rth.characters(data.toCharArray(), 0, data.length());
  -              }
   
  -              continue;
  -            case Node.ATTRIBUTE_NODE :
  -              String data = child.getNodeValue();
  -
  -              rth.characters(data.toCharArray(), 0, data.length());
  -
  -              continue;
  -            case Node.DOCUMENT_NODE :
  -              template = sroot.getDefaultRootRule();
  -              break;
  -            default :
  +                continue;
  +              case Node.DOCUMENT_NODE :
  +                template = sroot.getDefaultRootRule();
  +                break;
  +              default :
   
  -              // No default rules for processing instructions and the like.
  -              continue;
  +                // No default rules for processing instructions and the like.
  +                continue;
  +              }
               }
             }
  -        }
  -
  -        // If we are processing the default text rule, then just clone 
  -        // the value directly to the result tree.
  -        try
  -        {
  -          transformer.pushPairCurrentMatched(template, child);
  -
  -          if (check)
  -            guard.push(this, child);
   
  -          // Fire a trace event for the template.
  -          if (rdebug)
  -            transformer.getTraceManager().fireTraceEvent(child, mode,
  -                    template);
  -
  -          // And execute the child templates.
  -          if (template.isCompiledTemplate())
  -            template.execute(transformer, child, mode);
  -          else
  +          // If we are processing the default text rule, then just clone 
  +          // the value directly to the result tree.
  +          try
             {
  +            transformer.pushPairCurrentMatched(template, child);
   
  -            // Loop through the children of the template, calling execute on 
  -            // each of them.
  -            for (ElemTemplateElement t = template.m_firstChild; t != null;
  -                    t = t.m_nextSibling)
  +            if (check)
  +              guard.push(this, child);
  +
  +            // Fire a trace event for the template.
  +            if (rdebug)
  +              transformer.getTraceManager().fireTraceEvent(child, mode,
  +                                                           template);
  +
  +            // And execute the child templates.
  +            if (template.isCompiledTemplate())
  +              template.execute(transformer, child, mode);
  +            else
               {
  -              xctxt.setSAXLocator(t);
  -              transformer.setCurrentElement(t);
  -              t.execute(transformer, child, mode);
  +
  +              // Loop through the children of the template, calling execute on 
  +              // each of them.
  +              for (ElemTemplateElement t = template.m_firstChild; t != null;
  +                   t = t.m_nextSibling)
  +              {
  +                xctxt.setSAXLocator(t);
  +                transformer.setCurrentElement(t);
  +                t.execute(transformer, child, mode);
  +              }
               }
             }
  -        }
  -        finally
  -        {
  -          transformer.popCurrentMatched();
  +          finally
  +          {
  +            transformer.popCurrentMatched();
   
  -          if (check)
  -            guard.pop();
  +            if (check)
  +              guard.pop();
  +          }
           }
         }
  +      finally
  +      {
  +        xctxt.setSAXLocator(savedLocator);
  +        xctxt.popContextNodeList();
  +        transformer.popElemTemplateElement();
  +        popParams(xctxt);
  +      }
       }
  -    finally
  +    catch(SAXException se)
       {
  -      xctxt.setSAXLocator(savedLocator);
  -      xctxt.popContextNodeList();
  -      transformer.popElemTemplateElement();
  -      popParams(xctxt);
  +      throw new TransformerException(se);
       }
     }
   
  
  
  
  1.4       +4 -2      xml-xalan/java/src/org/apache/xalan/templates/ElemIf.java
  
  Index: ElemIf.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemIf.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ElemIf.java	2000/10/30 18:49:50	1.3
  +++ ElemIf.java	2000/11/13 16:27:10	1.4
  @@ -67,6 +67,8 @@
   import org.apache.xalan.res.XSLTErrorResources;
   import org.apache.xalan.transformer.TransformerImpl;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:if.
  @@ -141,11 +143,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (TransformerImpl.S_DEBUG)
  
  
  
  1.10      +47 -38    xml-xalan/java/src/org/apache/xalan/templates/ElemLiteralResult.java
  
  Index: ElemLiteralResult.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemLiteralResult.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ElemLiteralResult.java	2000/10/30 18:49:50	1.9
  +++ ElemLiteralResult.java	2000/11/13 16:27:10	1.10
  @@ -73,6 +73,8 @@
   import org.apache.xalan.transformer.TransformerImpl;
   import org.apache.xalan.transformer.ResultTreeHandler;
   
  +import javax.xml.transform.TransformerException;
  +
   import java.io.*;
   
   import java.util.*;
  @@ -389,10 +391,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     private boolean excludeResultNSDecl(String prefix, String uri)
  -          throws SAXException
  +          throws TransformerException
     {
   
       if (null != m_excludeResultPrefixes)
  @@ -412,9 +414,9 @@
      * processing parents before children).
      * Overide super method to handle exclude-result-prefix attribute.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void resolvePrefixTables() throws SAXException
  +  public void resolvePrefixTables() throws TransformerException
     {
   
       // Always start with a fresh prefix table!
  @@ -516,52 +518,59 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
  -
  -    ResultTreeHandler rhandler = transformer.getResultTreeHandler();
  -
  -    // Add namespace declarations.
  -    executeNSDecls(transformer);
  -    rhandler.startElement(getNamespace(), getLocalName(), getRawName());
   
  -    // Process any possible attributes from xsl:use-attribute-sets first
  -    super.execute(transformer, sourceNode, mode);
  -
  -    //xsl:version, excludeResultPrefixes???
  -    // Process the list of avts next
  -    if (null != m_avts)
  +    try
       {
  -      int nAttrs = m_avts.size();
  +      ResultTreeHandler rhandler = transformer.getResultTreeHandler();
   
  -      for (int i = (nAttrs - 1); i >= 0; i--)
  +      // Add namespace declarations.
  +      executeNSDecls(transformer);
  +      rhandler.startElement(getNamespace(), getLocalName(), getRawName());
  +
  +      // Process any possible attributes from xsl:use-attribute-sets first
  +      super.execute(transformer, sourceNode, mode);
  +
  +      //xsl:version, excludeResultPrefixes???
  +      // Process the list of avts next
  +      if (null != m_avts)
         {
  -        AVT avt = (AVT) m_avts.elementAt(i);
  -        XPathContext xctxt = transformer.getXPathContext();
  -        String stringedValue = avt.evaluate(xctxt, sourceNode, this);
  +        int nAttrs = m_avts.size();
   
  -        if (null != stringedValue)
  +        for (int i = (nAttrs - 1); i >= 0; i--)
           {
  +          AVT avt = (AVT) m_avts.elementAt(i);
  +          XPathContext xctxt = transformer.getXPathContext();
  +          String stringedValue = avt.evaluate(xctxt, sourceNode, this);
   
  -          // Important Note: I'm not going to check for excluded namespace 
  -          // prefixes here.  It seems like it's to expensive, and I'm not 
  -          // even sure this is right.  But I could be wrong, so this needs 
  -          // to be tested against other implementations.
  -          rhandler.addAttribute(avt.getURI(), avt.getName(),
  -                                avt.getRawName(), "CDATA", stringedValue);
  -        }
  -      }  // end for
  -    }
  +          if (null != stringedValue)
  +          {
   
  -    // Now process all the elements in this subtree
  -    // TODO: Process m_extensionElementPrefixes && m_attributeSetsNames
  -    transformer.executeChildTemplates(this, sourceNode, mode);
  -    rhandler.endElement(getNamespace(), getLocalName(), getRawName());
  -    unexecuteNSDecls(transformer);
  +            // Important Note: I'm not going to check for excluded namespace 
  +            // prefixes here.  It seems like it's to expensive, and I'm not 
  +            // even sure this is right.  But I could be wrong, so this needs 
  +            // to be tested against other implementations.
  +            rhandler.addAttribute(avt.getURI(), avt.getName(),
  +                                  avt.getRawName(), "CDATA", stringedValue);
  +          }
  +        }  // end for
  +      }
  +
  +      // Now process all the elements in this subtree
  +      // TODO: Process m_extensionElementPrefixes && m_attributeSetsNames
  +      transformer.executeChildTemplates(this, sourceNode, mode);
  +      rhandler.endElement(getNamespace(), getLocalName(), getRawName());
  +      unexecuteNSDecls(transformer);
  +    }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
     }
   
     /**
  
  
  
  1.4       +4 -2      xml-xalan/java/src/org/apache/xalan/templates/ElemMessage.java
  
  Index: ElemMessage.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemMessage.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ElemMessage.java	2000/10/30 18:49:52	1.3
  +++ ElemMessage.java	2000/11/13 16:27:10	1.4
  @@ -65,6 +65,8 @@
   import org.apache.xalan.res.XSLTErrorResources;
   import org.apache.xalan.transformer.TransformerImpl;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:message.
  @@ -146,11 +148,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (TransformerImpl.S_DEBUG)
  
  
  
  1.9       +35 -26    xml-xalan/java/src/org/apache/xalan/templates/ElemNumber.java
  
  Index: ElemNumber.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemNumber.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ElemNumber.java	2000/10/30 18:49:52	1.8
  +++ ElemNumber.java	2000/11/13 16:27:10	1.9
  @@ -78,6 +78,8 @@
   import org.apache.xalan.transformer.TransformerImpl;
   import org.apache.xalan.utils.NodeVector;
   
  +import javax.xml.transform.TransformerException;
  +
   // import org.apache.xalan.dtm.*;
   
   /**
  @@ -493,11 +495,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (TransformerImpl.S_DEBUG)
  @@ -505,8 +507,15 @@
   
       String countString = getCountString(transformer, sourceNode);
   
  -    transformer.getResultTreeHandler().characters(countString.toCharArray(),
  -            0, countString.length());
  +    try
  +    {
  +      transformer.getResultTreeHandler().characters(countString.toCharArray(),
  +                                                    0, countString.length());
  +    }
  +    catch(SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
     }
   
     /**
  @@ -543,11 +552,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     Node findAncestor(
             XPathContext xctxt, XPath fromMatchPattern, XPath countMatchPattern, Node context, Element namespaceContext)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       while (null != context)
  @@ -594,11 +603,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     private Node findPrecedingOrAncestorOrSelf(
             XPathContext xctxt, XPath fromMatchPattern, XPath countMatchPattern, Node context, Element namespaceContext)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       while (null != context)
  @@ -651,10 +660,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     XPath getCountMatchPattern(XPathContext support, Node contextNode)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       XPath countMatchPattern = m_countMatchPattern;
  @@ -713,10 +722,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     String getCountString(TransformerImpl transformer, Node sourceNode)
  -          throws SAXException
  +          throws TransformerException
     {
   
       int[] list = null;
  @@ -771,10 +780,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public Node getPreviousNode(XPathContext xctxt, Node pos)
  -          throws SAXException
  +          throws TransformerException
     {
   
       XPath countMatchPattern = getCountMatchPattern(xctxt, pos);
  @@ -859,10 +868,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public Node getTargetNode(XPathContext xctxt, Node sourceNode)
  -          throws SAXException
  +          throws TransformerException
     {
   
       Node target = null;
  @@ -894,11 +903,11 @@
      * NEEDSDOC @param stopAtFirstFound
      * @return The number of ancestors that match the pattern.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     NodeVector getMatchingAncestors(
             XPathContext xctxt, Node node, boolean stopAtFirstFound)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       NodeSet ancestors = new NodeSet();
  @@ -948,10 +957,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     Locale getLocale(TransformerImpl transformer, Node contextNode)
  -          throws SAXException
  +          throws TransformerException
     {
   
       Locale locale = null;
  @@ -996,10 +1005,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     private DecimalFormat getNumberFormatter(
  -          TransformerImpl transformer, Node contextNode) throws SAXException
  +          TransformerImpl transformer, Node contextNode) throws TransformerException
     {
   
       Locale locale = getLocale(transformer, contextNode);
  @@ -1053,11 +1062,11 @@
      * TODO: Optimize formatNumberList so that it caches the last count and
      * reuses that info for the next count.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     String formatNumberList(
             TransformerImpl transformer, int[] list, Node contextNode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       String numStr;
  @@ -1210,11 +1219,11 @@
      * NEEDSDOC @param listElement
      * NEEDSDOC @param formattedNumber
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     private void getFormattedNumber(
             TransformerImpl transformer, Node contextNode, char numberType, int numberWidth, int listElement, FastStringBuffer formattedNumber)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       DecimalFormat formatter = getNumberFormatter(transformer, contextNode);
  
  
  
  1.5       +12 -3     xml-xalan/java/src/org/apache/xalan/templates/ElemPI.java
  
  Index: ElemPI.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemPI.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemPI.java	2000/10/30 18:49:53	1.4
  +++ ElemPI.java	2000/11/13 16:27:10	1.5
  @@ -65,6 +65,8 @@
   import org.apache.xalan.res.XSLTErrorResources;
   import org.apache.xalan.transformer.TransformerImpl;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:processing-instruction.
  @@ -141,11 +143,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (TransformerImpl.S_DEBUG)
  @@ -174,7 +176,14 @@
       // ">
       String data = transformer.transformToString(this, sourceNode, mode);
   
  -    transformer.getResultTreeHandler().processingInstruction(piName, data);
  +    try
  +    {
  +      transformer.getResultTreeHandler().processingInstruction(piName, data);
  +    }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
     }
   
     /**
  
  
  
  1.5       +6 -4      xml-xalan/java/src/org/apache/xalan/templates/ElemParam.java
  
  Index: ElemParam.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemParam.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemParam.java	2000/11/09 19:13:49	1.4
  +++ ElemParam.java	2000/11/13 16:27:10	1.5
  @@ -65,6 +65,8 @@
   import org.apache.xalan.utils.QName;
   import org.apache.xalan.transformer.TransformerImpl;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:param.
  @@ -112,9 +114,9 @@
      *
      * NEEDSDOC @param param
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public ElemParam(ElemParam param) throws SAXException
  +  public ElemParam(ElemParam param) throws TransformerException
     {
       super(param);
     }
  @@ -131,11 +133,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       VariableStack vars = transformer.getXPathContext().getVarStack();
  
  
  
  1.5       +3 -2      xml-xalan/java/src/org/apache/xalan/templates/ElemTemplate.java
  
  Index: ElemTemplate.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemTemplate.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemTemplate.java	2000/11/03 23:28:08	1.4
  +++ ElemTemplate.java	2000/11/13 16:27:10	1.5
  @@ -66,6 +66,7 @@
   import org.apache.xalan.transformer.TransformerImpl;
   
   import javax.xml.transform.SourceLocator;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="advanced"/>
  @@ -357,11 +358,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (TransformerImpl.S_DEBUG)
  
  
  
  1.21      +51 -37    xml-xalan/java/src/org/apache/xalan/templates/ElemTemplateElement.java
  
  Index: ElemTemplateElement.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemTemplateElement.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ElemTemplateElement.java	2000/11/03 23:28:08	1.20
  +++ ElemTemplateElement.java	2000/11/13 16:27:10	1.21
  @@ -81,8 +81,8 @@
   import javax.xml.transform.SourceLocator;
   
   // Serializer imports
  -import org.apache.serialize.OutputFormat;
  -import org.apache.serialize.Serializer;
  +import org.apache.xalan.serialize.OutputFormat;
  +import org.apache.xalan.serialize.Serializer;
   
   // DOM Imports
   import org.w3c.dom.Node;
  @@ -92,7 +92,7 @@
   
   // SAX Imports
   import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.helpers.NamespaceSupport;
   
   /**
  @@ -121,7 +121,7 @@
      * @param atts The element attributes.
      * @param lineNumber The line in the XSLT file that the element occurs on.
      * @param columnNumber The column index in the XSLT file that the element occurs on.
  -   * @exception SAXException Never.
  +   * @exception TransformerException Never.
      */
     public ElemTemplateElement(){}
   
  @@ -163,9 +163,9 @@
      *
      * @param transformer The XSLT TransformerFactory.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void runtimeInit(TransformerImpl transformer) throws SAXException{}
  +  public void runtimeInit(TransformerImpl transformer) throws TransformerException{}
   
     /**
      * Execute the element's primary function.  Subclasses of this
  @@ -175,14 +175,14 @@
      * @exception java.net.MalformedURLException
      * @exception java.io.FileNotFoundException
      * @exception java.io.IOException
  -   * @exception SAXException
  +   * @exception TransformerException
      * @param transformer The XSLT TransformerFactory.
      * @param sourceNode The current context node.
      * @param mode The current mode.
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException{}
  +            throws TransformerException{}
   
     /**
      * Get the owning "composed" stylesheet.  This looks up the
  @@ -262,7 +262,7 @@
     }
   
     /**
  -   * Throw a template element runtime error.  (Note: should we throw a SAXException instead?)
  +   * Throw a template element runtime error.  (Note: should we throw a TransformerException instead?)
      *
      * @param msg Description of the error that occured.
      * NEEDSDOC @param args
  @@ -636,9 +636,9 @@
      *
      * NEEDSDOC @param nsSupport
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void setPrefixes(NamespaceSupport nsSupport) throws SAXException
  +  public void setPrefixes(NamespaceSupport nsSupport) throws TransformerException
     {
       setPrefixes(nsSupport, false);
     }
  @@ -651,10 +651,10 @@
      * NEEDSDOC @param nsSupport
      * NEEDSDOC @param excludeXSLDecl
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void setPrefixes(NamespaceSupport nsSupport, boolean excludeXSLDecl)
  -          throws SAXException
  +          throws TransformerException
     {
   
       Enumeration decls = nsSupport.getDeclaredPrefixes();
  @@ -759,10 +759,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     private boolean excludeResultNSDecl(String prefix, String uri)
  -          throws SAXException
  +          throws TransformerException
     {
   
       if (uri != null)
  @@ -788,9 +788,9 @@
      * (Recursive method, walking the elements depth-first,
      * processing parents before children).
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void resolvePrefixTables() throws SAXException
  +  public void resolvePrefixTables() throws TransformerException
     {
   
       // Always start with a fresh prefix table!
  @@ -879,26 +879,33 @@
      *
      * NEEDSDOC @param transformer
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  void executeNSDecls(TransformerImpl transformer) throws SAXException
  +  void executeNSDecls(TransformerImpl transformer) throws TransformerException
     {
   
  -    if (null != m_prefixTable)
  +    try
       {
  -      ResultTreeHandler rhandler = transformer.getResultTreeHandler();
  -      int n = m_prefixTable.size();
  -
  -      for (int i = n - 1; i >= 0; i--)
  +      if (null != m_prefixTable)
         {
  -        XMLNSDecl decl = (XMLNSDecl) m_prefixTable.elementAt(i);
  +        ResultTreeHandler rhandler = transformer.getResultTreeHandler();
  +        int n = m_prefixTable.size();
   
  -        if (!decl.getIsExcluded())
  +        for (int i = n - 1; i >= 0; i--)
           {
  -          rhandler.startPrefixMapping(decl.getPrefix(), decl.getURI(), true);
  +          XMLNSDecl decl = (XMLNSDecl) m_prefixTable.elementAt(i);
  +
  +          if (!decl.getIsExcluded())
  +          {
  +            rhandler.startPrefixMapping(decl.getPrefix(), decl.getURI(), true);
  +          }
           }
         }
       }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
     }
   
     /**
  @@ -907,25 +914,32 @@
      *
      * NEEDSDOC @param transformer
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  void unexecuteNSDecls(TransformerImpl transformer) throws SAXException
  +  void unexecuteNSDecls(TransformerImpl transformer) throws TransformerException
     {
   
  -    if (null != m_prefixTable)
  +    try
       {
  -      ResultTreeHandler rhandler = transformer.getResultTreeHandler();
  -      int n = m_prefixTable.size();
  -
  -      for (int i = 0; i < n; i++)
  +      if (null != m_prefixTable)
         {
  -        XMLNSDecl decl = (XMLNSDecl) m_prefixTable.elementAt(i);
  +        ResultTreeHandler rhandler = transformer.getResultTreeHandler();
  +        int n = m_prefixTable.size();
   
  -        if (!decl.getIsExcluded())
  +        for (int i = 0; i < n; i++)
           {
  -          rhandler.endPrefixMapping(decl.getPrefix());
  +          XMLNSDecl decl = (XMLNSDecl) m_prefixTable.elementAt(i);
  +
  +          if (!decl.getIsExcluded())
  +          {
  +            rhandler.endPrefixMapping(decl.getPrefix());
  +          }
           }
         }
  +    }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
       }
     }
   
  
  
  
  1.4       +23 -13    xml-xalan/java/src/org/apache/xalan/templates/ElemTextLiteral.java
  
  Index: ElemTextLiteral.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemTextLiteral.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ElemTextLiteral.java	2000/10/30 18:49:57	1.3
  +++ ElemTextLiteral.java	2000/11/13 16:27:10	1.4
  @@ -62,7 +62,10 @@
   
   import org.apache.xalan.utils.QName;
   import org.apache.xalan.transformer.TransformerImpl;
  +import org.apache.xalan.transformer.ResultTreeHandler;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement a text literal.
  @@ -205,26 +208,33 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
  -
  -    if (TransformerImpl.S_DEBUG)
  -      transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
  -
  -    if (m_disableOutputEscaping)
  +    try
       {
  -      transformer.getResultTreeHandler().startNonEscaping();
  -    }
  -
  -    transformer.getResultTreeHandler().characters(m_ch, 0, m_ch.length);
  +      if (TransformerImpl.S_DEBUG)
  +        transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
   
  -    if (m_disableOutputEscaping)
  +      ResultTreeHandler rth = transformer.getResultTreeHandler();
  +      if (m_disableOutputEscaping)
  +      {
  +        rth.processingInstruction(javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING, "");
  +      }
  +
  +      rth.characters(m_ch, 0, m_ch.length);
  +
  +      if (m_disableOutputEscaping)
  +      {
  +        rth.processingInstruction(javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING, "");
  +      }
  +    }
  +    catch(SAXException se)
       {
  -      transformer.getResultTreeHandler().endNonEscaping();
  +      throw new TransformerException(se);
       }
     }
   }
  
  
  
  1.3       +4 -2      xml-xalan/java/src/org/apache/xalan/templates/ElemUnknown.java
  
  Index: ElemUnknown.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemUnknown.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ElemUnknown.java	2000/10/30 18:49:58	1.2
  +++ ElemUnknown.java	2000/11/13 16:27:11	1.3
  @@ -77,6 +77,8 @@
   
   import java.util.*;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement a Literal Result Element.
  @@ -91,9 +93,9 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException{}
  +            throws TransformerException{}
   }
  
  
  
  1.5       +5 -5      xml-xalan/java/src/org/apache/xalan/templates/ElemUse.java
  
  Index: ElemUse.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemUse.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemUse.java	2000/10/30 18:49:59	1.4
  +++ ElemUse.java	2000/11/13 16:27:11	1.5
  @@ -60,7 +60,7 @@
   
   import org.w3c.dom.Node;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xpath.*;
   import org.apache.xalan.utils.QName;
  @@ -156,11 +156,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     private void applyAttrSets(
             TransformerImpl transformer, StylesheetComposed stylesheet, QName attributeSetsNames[], Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (null != attributeSetsNames)
  @@ -203,11 +203,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (TransformerImpl.S_DEBUG)
  
  
  
  1.7       +31 -22    xml-xalan/java/src/org/apache/xalan/templates/ElemValueOf.java
  
  Index: ElemValueOf.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemValueOf.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ElemValueOf.java	2000/10/30 18:50:00	1.6
  +++ ElemValueOf.java	2000/11/13 16:27:11	1.7
  @@ -69,6 +69,8 @@
   import org.apache.xalan.transformer.TransformerImpl;
   import org.apache.xalan.transformer.ResultTreeHandler;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:value-of.
  @@ -207,37 +209,44 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
  -
  -    if (TransformerImpl.S_DEBUG)
  -      transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
  -
  -    XObject value = m_selectExpression.execute(transformer.getXPathContext(),
  -                                               sourceNode, this);
  -
  -    if (TransformerImpl.S_DEBUG)
  -      transformer.getTraceManager().fireSelectedEvent(sourceNode, this,
  -              "select", m_selectExpression, value);
   
  -    String s = value.str();
  -	int len = (null != s) ? s.length() : 0;
  -    if(len > 0)
  +    try
       {
  -      ResultTreeHandler hth = transformer.getResultTreeHandler();
  +      if (TransformerImpl.S_DEBUG)
  +        transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);
   
  -      if (m_disableOutputEscaping)
  +      XObject value = m_selectExpression.execute(transformer.getXPathContext(),
  +                                                 sourceNode, this);
  +
  +      if (TransformerImpl.S_DEBUG)
  +        transformer.getTraceManager().fireSelectedEvent(sourceNode, this,
  +                                                        "select", m_selectExpression, value);
  +
  +      String s = value.str();
  +      int len = (null != s) ? s.length() : 0;
  +      if(len > 0)
         {
  -        hth.startNonEscaping();
  -        hth.characters(s.toCharArray(), 0, len);
  -        hth.endNonEscaping();
  +        ResultTreeHandler rth = transformer.getResultTreeHandler();
  +
  +        if (m_disableOutputEscaping)
  +        {
  +          rth.processingInstruction(javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING, "");
  +          rth.characters(s.toCharArray(), 0, len);
  +          rth.processingInstruction(javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING, "");
  +        }
  +        else
  +          rth.characters(s.toCharArray(), 0, len);
         }
  -      else
  -        hth.characters(s.toCharArray(), 0, len);
  +    }
  +    catch(SAXException se)
  +    {
  +      throw new TransformerException(se);
       }
     }
   
  
  
  
  1.5       +8 -6      xml-xalan/java/src/org/apache/xalan/templates/ElemVariable.java
  
  Index: ElemVariable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemVariable.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemVariable.java	2000/10/30 18:50:00	1.4
  +++ ElemVariable.java	2000/11/13 16:27:11	1.5
  @@ -69,6 +69,8 @@
   import org.apache.xalan.res.XSLTErrorResources;
   import org.apache.xalan.transformer.TransformerImpl;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="advanced"/>
    * Implement xsl:variable.
  @@ -214,9 +216,9 @@
      *
      * NEEDSDOC @param param
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public ElemVariable(ElemVariable param) throws SAXException
  +  public ElemVariable(ElemVariable param) throws TransformerException
     {
   
       m_selectPattern = param.m_selectPattern;
  @@ -235,11 +237,11 @@
      * NEEDSDOC @param sourceNode
      * NEEDSDOC @param mode
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void execute(
             TransformerImpl transformer, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (TransformerImpl.S_DEBUG)
  @@ -258,10 +260,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public XObject getValue(TransformerImpl transformer, Node sourceNode)
  -          throws SAXException
  +          throws TransformerException
     {
   
       XObject var;
  
  
  
  1.13      +24 -54    xml-xalan/java/src/org/apache/xalan/templates/FuncDocument.java
  
  Index: FuncDocument.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/FuncDocument.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- FuncDocument.java	2000/11/03 23:28:08	1.12
  +++ FuncDocument.java	2000/11/13 16:27:11	1.13
  @@ -83,14 +83,12 @@
   import org.apache.xpath.XPathContext;
   import org.apache.xalan.transformer.TransformerImpl;
   
  -import org.xml.sax.ErrorHandler;
   import org.xml.sax.InputSource;
   import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
   
   import javax.xml.transform.TransformerException;
   import javax.xml.transform.SourceLocator;
  +import javax.xml.transform.ErrorListener;
   import org.apache.xalan.utils.SAXSourceLocator;
   import javax.xml.transform.Source;
   
  @@ -118,9 +116,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       Node context = xctxt.getCurrentNode();
  @@ -245,10 +243,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     Node getDoc(XPathContext xctxt, Node context, String uri, String base)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       // System.out.println("base: "+base+", uri: "+uri);
  @@ -262,12 +260,12 @@
       }
       catch (IOException ioe)
       {
  -      throw new SAXParseException(ioe.getMessage(), 
  +      throw new TransformerException(ioe.getMessage(), 
           (SAXSourceLocator)xctxt.getSAXLocator(), ioe);
       }
       catch(TransformerException te)
       {
  -      throw new SAXException(te);
  +      throw new TransformerException(te);
       }
   
       if (null != newDoc)
  @@ -315,9 +313,9 @@
         StringWriter sw = new StringWriter();
         PrintWriter diagnosticsWriter = new PrintWriter(sw);
   
  -      if (throwable instanceof SAXException)
  +      if (throwable instanceof TransformerException)
         {
  -        SAXException spe = (SAXException) throwable;
  +        TransformerException spe = (TransformerException) throwable;
   
           {
             Exception e = spe;
  @@ -330,15 +328,16 @@
                                           + e.getMessage());
               }
   
  -            if (e instanceof SAXParseException)
  +            if (e instanceof TransformerException)
               {
  -              SAXParseException spe2 = (SAXParseException) e;
  +              TransformerException spe2 = (TransformerException) e;
   
  -              if (null != spe2.getSystemId())
  -                diagnosticsWriter.println("   ID: " + spe2.getSystemId()
  -                                          + " Line #" + spe2.getLineNumber()
  +              SourceLocator locator = spe2.getLocator();
  +              if ((null != locator) && (null != locator.getSystemId()))
  +                diagnosticsWriter.println("   ID: " + locator.getSystemId()
  +                                          + " Line #" + locator.getLineNumber()
                                             + " Column #"
  -                                          + spe2.getColumnNumber());
  +                                          + locator.getColumnNumber());
   
                 e = spe2.getException();
   
  @@ -394,34 +393,19 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void error(XPathContext xctxt, int msg, Object args[])
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       String formattedMsg = XSLMessages.createMessage(msg, args);
  -    ErrorHandler errHandler = xctxt.getPrimaryReader().getErrorHandler();
  -    SAXParseException spe = new SAXParseException(formattedMsg,
  +    ErrorListener errHandler = xctxt.getErrorListener();
  +    TransformerException spe = new TransformerException(formattedMsg,
                                 (SAXSourceLocator)xctxt.getSAXLocator());
   
       if (null != errHandler)
         errHandler.error(spe);
  -    else
  -    {
  -      if(null != spe.getSystemId())
  -      {
  -        System.out.println(spe.getMessage() + "; file " 
  -                           + spe.getSystemId()
  -                           + "; line " + spe.getLineNumber() + "; column "
  -                           + spe.getColumnNumber());
  -      }
  -      else
  -      {
  -        System.out.println(spe.getMessage());
  -      }
  -      throw spe;
  -    }
     }
   
     /**
  @@ -433,33 +417,19 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void warn(XPathContext xctxt, int msg, Object args[])
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       String formattedMsg = XSLMessages.createWarning(msg, args);
  -    ErrorHandler errHandler = xctxt.getPrimaryReader().getErrorHandler();
  -    SAXParseException spe = new SAXParseException(formattedMsg,
  +    ErrorListener errHandler = xctxt.getErrorListener();
  +    TransformerException spe = new TransformerException(formattedMsg,
                                 (SAXSourceLocator)xctxt.getSAXLocator());
   
       if (null != errHandler)
         errHandler.error(spe);
  -    else
  -    {
  -      if(null != spe.getSystemId())
  -      {
  -        System.out.println(spe.getMessage() + "; file " 
  -                           + spe.getSystemId()
  -                           + "; line " + spe.getLineNumber() + "; column "
  -                           + spe.getColumnNumber());
  -      }
  -      else
  -      {
  -        System.out.println(spe.getMessage());
  -      }
  -    }
     }
   
     /*
  
  
  
  1.9       +7 -9      xml-xalan/java/src/org/apache/xalan/templates/FuncFormatNumb.java
  
  Index: FuncFormatNumb.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/FuncFormatNumb.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- FuncFormatNumb.java	2000/11/03 23:28:08	1.8
  +++ FuncFormatNumb.java	2000/11/13 16:27:11	1.9
  @@ -70,12 +70,10 @@
   import org.apache.xalan.res.XSLMessages;
   import org.apache.xalan.res.XSLTErrorResources;
   
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXParseException;
  -
   import org.w3c.dom.Node;
   
   import javax.xml.transform.TransformerException;
  +import javax.xml.transform.ErrorListener;
   import org.apache.xalan.utils.SAXSourceLocator;
   
   /**
  @@ -91,9 +89,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       // A bit of an ugly hack to get our context.
  @@ -193,16 +191,16 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void warn(XPathContext xctxt, int msg, Object args[])
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       String formattedMsg = XSLMessages.createWarning(msg, args);
  -    ErrorHandler errHandler = xctxt.getPrimaryReader().getErrorHandler();
  +    ErrorListener errHandler = xctxt.getErrorListener();
   
  -    errHandler.warning(new SAXParseException(formattedMsg,
  +    errHandler.warning(new TransformerException(formattedMsg,
                                                (SAXSourceLocator)xctxt.getSAXLocator()));
     }
   
  
  
  
  1.5       +2 -2      xml-xalan/java/src/org/apache/xalan/templates/FuncKey.java
  
  Index: FuncKey.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/FuncKey.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FuncKey.java	2000/10/30 18:50:03	1.4
  +++ FuncKey.java	2000/11/13 16:27:11	1.5
  @@ -95,9 +95,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       // TransformerImpl transformer = (TransformerImpl)xctxt;
  
  
  
  1.10      +4 -4      xml-xalan/java/src/org/apache/xalan/templates/OutputFormatExtended.java
  
  Index: OutputFormatExtended.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/OutputFormatExtended.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- OutputFormatExtended.java	2000/10/30 18:50:04	1.9
  +++ OutputFormatExtended.java	2000/11/13 16:27:11	1.10
  @@ -56,7 +56,7 @@
    */
   package org.apache.xalan.templates;
   
  -import org.apache.serialize.OutputFormat;
  +import org.apache.xalan.serialize.OutputFormat;
   
   import java.util.Vector;
   
  @@ -411,7 +411,7 @@
         m_cdataElementsHasBeenSet = true;
   
       int n = elements.size();
  -    org.apache.serialize.QName[] qnames = new QName[n];
  +    org.apache.xalan.serialize.QName[] qnames = new QName[n];
   
       for (int i = 0; i < n; i++)
       {
  @@ -426,7 +426,7 @@
      *
      * NEEDSDOC @param elements
      */
  -  public void setCdataSectionElements(org.apache.serialize.QName[] elements)
  +  public void setCdataSectionElements(org.apache.xalan.serialize.QName[] elements)
     {
   
       if (m_shouldRecordHasBeenSet)
  @@ -616,7 +616,7 @@
      * @param nonEscapingElements List of unescaped element tag names
      */
     public void setNonEscapingElements(
  -          org.apache.serialize.QName[] nonEscapingElements)
  +          org.apache.xalan.serialize.QName[] nonEscapingElements)
     {
   
       // TODO: Need to work on this.
  
  
  
  1.13      +9 -9      xml-xalan/java/src/org/apache/xalan/templates/Stylesheet.java
  
  Index: Stylesheet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/Stylesheet.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Stylesheet.java	2000/11/08 20:23:16	1.12
  +++ Stylesheet.java	2000/11/13 16:27:11	1.13
  @@ -78,7 +78,7 @@
   import org.w3c.dom.Document;
   
   // SAX2 Imports
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Locator;
   
   import javax.xml.transform.SourceLocator;
  @@ -188,10 +188,10 @@
      * NEEDSDOC @param stream
      *
      * @throws IOException
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     private void readObject(ObjectInputStream stream)
  -          throws IOException, SAXException
  +          throws IOException, TransformerException
     {
   
       // System.out.println("Reading Stylesheet");
  @@ -201,7 +201,7 @@
       }
       catch (ClassNotFoundException cnfe)
       {
  -      throw new SAXException(cnfe);
  +      throw new TransformerException(cnfe);
       }
   
       // System.out.println("Done reading Stylesheet");
  @@ -1067,9 +1067,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public ElemTemplate getTemplate(int i) throws SAXException
  +  public ElemTemplate getTemplate(int i) throws TransformerException
     {
   
       if (null == m_templates)
  @@ -1229,7 +1229,7 @@
           {
             m_href = SystemIDResolver.getAbsoluteURI(m_systemId, null);
           }
  -        catch (SAXException se)
  +        catch (TransformerException se)
           {
   
             // Ignore this for right now
  @@ -1359,9 +1359,9 @@
      * NEEDSDOC @param v
      * NEEDSDOC @param i
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void replaceTemplate(ElemTemplate v, int i) throws SAXException
  +  public void replaceTemplate(ElemTemplate v, int i) throws TransformerException
     {
   
       if (null == m_templates)
  
  
  
  1.16      +12 -12    xml-xalan/java/src/org/apache/xalan/templates/StylesheetComposed.java
  
  Index: StylesheetComposed.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/StylesheetComposed.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- StylesheetComposed.java	2000/11/08 20:23:17	1.15
  +++ StylesheetComposed.java	2000/11/13 16:27:11	1.16
  @@ -63,14 +63,14 @@
   import javax.xml.transform.TransformerConfigurationException;
   import org.apache.xpath.XPath;
   import org.apache.xalan.utils.QName;
  -import org.apache.serialize.OutputFormat;
  +import org.apache.xalan.serialize.OutputFormat;
   import org.apache.xalan.transformer.TransformerImpl;
   import org.apache.xpath.XPathContext;
   
   import org.w3c.dom.Node;
   import org.w3c.dom.Element;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import java.text.DecimalFormat;
   import java.text.DecimalFormatSymbols;
  @@ -331,9 +331,9 @@
      * from xsl:strip-space and xsl:preserve space information.
      * @return null if node is not matched.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  void recomposeWhiteSpaceInfo() throws SAXException
  +  void recomposeWhiteSpaceInfo() throws TransformerException
     {
   
       int nIncludes = getIncludeCountComposed();
  @@ -401,10 +401,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public WhiteSpaceInfo getWhiteSpaceInfo(
  -          XPathContext support, Element targetElement) throws SAXException
  +          XPathContext support, Element targetElement) throws TransformerException
     {
   
       if (null != m_whiteSpaceInfoList)
  @@ -674,9 +674,9 @@
      * Aggregate the list of templates and included templates into a single list.
      * @see <a href="http://www.w3.org/TR/xslt#section-Defining-Template-Rules">section-Defining-Template-Rules in XSLT Specification</a>
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void recomposeTemplates() throws SAXException
  +  public void recomposeTemplates() throws TransformerException
     {
   
       int nIncludes = getIncludeCountComposed();
  @@ -705,9 +705,9 @@
      *
      * NEEDSDOC @param flushFirst
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void recomposeTemplates(boolean flushFirst) throws SAXException
  +  public void recomposeTemplates(boolean flushFirst) throws TransformerException
     {
   
       if (flushFirst)
  @@ -728,11 +728,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public ElemTemplate getTemplateComposed(
             XPathContext support, Node targetNode, QName mode, boolean quietConflictWarnings)
  -            throws SAXException
  +            throws TransformerException
     {
       return m_templateList.getTemplate(support, targetNode, mode,
                                         quietConflictWarnings);
  
  
  
  1.20      +9 -8      xml-xalan/java/src/org/apache/xalan/templates/StylesheetRoot.java
  
  Index: StylesheetRoot.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/StylesheetRoot.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- StylesheetRoot.java	2000/11/10 09:33:04	1.19
  +++ StylesheetRoot.java	2000/11/13 16:27:11	1.20
  @@ -67,7 +67,7 @@
   import org.xml.sax.*;
   import org.xml.sax.helpers.*;
   
  -import org.apache.serialize.*;
  +import org.apache.xalan.serialize.*;
   import org.apache.xalan.utils.*;
   import org.apache.xpath.*;
   import org.apache.xpath.compiler.XPathParser;
  @@ -77,9 +77,10 @@
   import org.apache.xalan.transformer.TransformerImpl;
   
   import javax.xml.transform.Transformer;
  +import javax.xml.transform.TransformerException;
   import javax.xml.transform.TransformerConfigurationException;
   import javax.xml.transform.Templates;
  -import javax.xml.transform.stream.OutputKeys;
  +import javax.xml.transform.OutputKeys;
   
   /**
    * <meta name="usage" content="general"/>
  @@ -108,7 +109,7 @@
   
         initDefaultRule();
       }
  -    catch (SAXException se)
  +    catch (TransformerException se)
       {
         throw new TransformerConfigurationException("Can't init default templates!", se);
       }
  @@ -212,7 +213,7 @@
      * @see <a href="http://www.w3.org/TR/xslt#output">output in XSLT Specification</a>
      * @return A Properties object that may be mutated.
      *
  -   * @see org.xml.org.apache.serialize.OutputFormat
  +   * @see org.xml.org.apache.xalan.serialize.OutputFormat
      */
     public OutputFormat getOutputFormat()
     {
  @@ -238,9 +239,9 @@
      * properties that need to be combined or calculated from
      * the combination of imported and included stylesheets.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void recompose() throws SAXException
  +  public void recompose() throws TransformerException
     {
   
       recomposeImports();
  @@ -592,9 +593,9 @@
     /**
      * Create the default rule if needed.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  private void initDefaultRule() throws SAXException
  +  private void initDefaultRule() throws TransformerException
     {
   
       // Then manufacture a default
  
  
  
  1.19      +5 -5      xml-xalan/java/src/org/apache/xalan/templates/TemplateList.java
  
  Index: TemplateList.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/TemplateList.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- TemplateList.java	2000/11/09 02:50:34	1.18
  +++ TemplateList.java	2000/11/13 16:27:11	1.19
  @@ -64,7 +64,7 @@
   
   import org.w3c.dom.Node;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.utils.QName;
   import org.apache.xpath.XPath;
  @@ -548,11 +548,11 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public ElemTemplate getTemplate(
             XPathContext xctxt, Node targetNode, QName mode, boolean quietConflictWarnings)
  -            throws SAXException
  +            throws TransformerException
     {
   
       TemplateSubPatternAssociation head = getHead(xctxt, targetNode);
  @@ -628,11 +628,11 @@
      *
      * @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected ElemTemplate getTemplate(
             StylesheetComposed imported, XPathContext support, Node targetNode, QName mode, boolean quietConflictWarnings)
  -            throws SAXException
  +            throws TransformerException
     {
       return imported.getTemplateComposed(support, targetNode, mode,
                                           quietConflictWarnings);
  
  
  
  1.5       +3 -3      xml-xalan/java/src/org/apache/xalan/templates/TemplateSubPatternAssociation.java
  
  Index: TemplateSubPatternAssociation.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/TemplateSubPatternAssociation.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TemplateSubPatternAssociation.java	2000/10/30 18:50:07	1.4
  +++ TemplateSubPatternAssociation.java	2000/11/13 16:27:11	1.5
  @@ -60,7 +60,7 @@
   
   import org.w3c.dom.Node;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xpath.XPath;
   import org.apache.xpath.XPathContext;
  @@ -189,10 +189,10 @@
      * NEEDSDOC @param mode
      * @return The mode associated with the template.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public boolean matches(XPathContext xctxt, Node targetNode, QName mode)
  -          throws SAXException
  +          throws TransformerException
     {
   
       double score = m_stepPattern.getMatchScore(xctxt, targetNode);
  
  
  
  1.4       +3 -3      xml-xalan/java/src/org/apache/xalan/templates/WhitespaceList.java
  
  Index: WhitespaceList.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/WhitespaceList.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WhitespaceList.java	2000/10/30 18:50:08	1.3
  +++ WhitespaceList.java	2000/11/13 16:27:11	1.4
  @@ -62,7 +62,7 @@
   import org.w3c.dom.Node;
   import org.w3c.dom.Element;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -93,11 +93,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     protected ElemTemplate getTemplate(
             StylesheetComposed imported, XPathContext support, Node targetNode, QName mode, boolean quietConflictWarnings)
  -            throws SAXException
  +            throws TransformerException
     {
       return imported.getWhiteSpaceInfo(support, (Element) targetNode);
     }
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/apache/xalan/templates/XUnresolvedVariable.java
  
  Index: XUnresolvedVariable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/XUnresolvedVariable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XUnresolvedVariable.java	2000/11/09 19:13:49	1.1
  +++ XUnresolvedVariable.java	2000/11/13 16:27:11	1.2
  @@ -136,9 +136,9 @@
      *
      * @return This object.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       VariableStack vars = xctxt.getVarStack();
       
  
  
  
  1.4       +2 -2      xml-xalan/java/src/org/apache/xalan/trace/PrintTraceListener.java
  
  Index: PrintTraceListener.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/trace/PrintTraceListener.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PrintTraceListener.java	2000/10/31 17:31:26	1.3
  +++ PrintTraceListener.java	2000/11/13 16:27:18	1.4
  @@ -171,9 +171,9 @@
      *
      * @param ev the generate event.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public void selected(SelectionEvent ev) throws org.xml.sax.SAXException
  +  public void selected(SelectionEvent ev) throws javax.xml.transform.TransformerException
     {
   
       if (m_traceSelection)
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xalan/trace/TraceListener.java
  
  Index: TraceListener.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/trace/TraceListener.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TraceListener.java	2000/10/30 18:56:52	1.2
  +++ TraceListener.java	2000/11/13 16:27:18	1.3
  @@ -82,9 +82,9 @@
      *
      * @param ev the generate event.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public void selected(SelectionEvent ev) throws org.xml.sax.SAXException;
  +  public void selected(SelectionEvent ev) throws javax.xml.transform.TransformerException;
   
     /**
      * Method that is called just after the formatter listener is called.
  
  
  
  1.5       +4 -4      xml-xalan/java/src/org/apache/xalan/trace/TraceManager.java
  
  Index: TraceManager.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/trace/TraceManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TraceManager.java	2000/10/30 18:56:53	1.4
  +++ TraceManager.java	2000/11/13 16:27:18	1.5
  @@ -203,11 +203,11 @@
      * NEEDSDOC @param xpath
      * NEEDSDOC @param selection
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void fireSelectedEvent(
             Node sourceNode, ElemTemplateElement styleNode, String attributeName, XPath xpath, XObject selection)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       if (hasTraceListeners())
  @@ -221,10 +221,10 @@
      *
      * NEEDSDOC @param se
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void fireSelectedEvent(SelectionEvent se)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       if (hasTraceListeners())
  
  
  
  1.5       +125 -118  xml-xalan/java/src/org/apache/xalan/transformer/ClonerToResultTree.java
  
  Index: ClonerToResultTree.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/ClonerToResultTree.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClonerToResultTree.java	2000/10/30 18:56:56	1.4
  +++ ClonerToResultTree.java	2000/11/13 16:27:19	1.5
  @@ -66,7 +66,7 @@
   import org.w3c.dom.ProcessingInstruction;
   import org.w3c.dom.EntityReference;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   import org.apache.xpath.XPathContext;
  @@ -108,158 +108,165 @@
      * NEEDSDOC @param node
      * NEEDSDOC @param shouldCloneAttributes
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void cloneToResultTree(Node node, boolean shouldCloneAttributes)
  -          throws SAXException
  +    throws TransformerException
     {
   
  -    boolean stripWhiteSpace = false;
  -    XPathContext xctxt = m_transformer.getXPathContext();
  -    DOMHelper dhelper = xctxt.getDOMHelper();
  -
  -    switch (node.getNodeType())
  -    {
  -    case Node.TEXT_NODE :
  +    try
       {
  -      Text tx = (Text) node;
  -      String data = null;
  +      boolean stripWhiteSpace = false;
  +      XPathContext xctxt = m_transformer.getXPathContext();
  +      DOMHelper dhelper = xctxt.getDOMHelper();
   
  -      // System.out.println("stripWhiteSpace = "+stripWhiteSpace+", "+tx.getData());
  -      if (stripWhiteSpace)
  +      switch (node.getNodeType())
         {
  -        if (!dhelper.isIgnorableWhitespace(tx))
  +      case Node.TEXT_NODE :
           {
  -          data = tx.getData();
  +          Text tx = (Text) node;
  +          String data = null;
   
  -          if ((null != data) && (0 == data.trim().length()))
  +          // System.out.println("stripWhiteSpace = "+stripWhiteSpace+", "+tx.getData());
  +          if (stripWhiteSpace)
             {
  -            data = null;
  +            if (!dhelper.isIgnorableWhitespace(tx))
  +            {
  +              data = tx.getData();
  +
  +              if ((null != data) && (0 == data.trim().length()))
  +              {
  +                data = null;
  +              }
  +            }
             }
  -        }
  -      }
  -      else
  -      {
  -        Node parent = node.getParentNode();
  +          else
  +          {
  +            Node parent = node.getParentNode();
   
  -        if (null != parent)
  -        {
  -          if (Node.DOCUMENT_NODE != parent.getNodeType())
  +            if (null != parent)
  +            {
  +              if (Node.DOCUMENT_NODE != parent.getNodeType())
  +              {
  +                data = tx.getData();
  +
  +                if ((null != data) && (0 == data.length()))
  +                {
  +                  data = null;
  +                }
  +              }
  +            }
  +            else
  +            {
  +              data = tx.getData();
  +
  +              if ((null != data) && (0 == data.length()))
  +              {
  +                data = null;
  +              }
  +            }
  +          }
  +
  +          if (null != data)
             {
  -            data = tx.getData();
   
  -            if ((null != data) && (0 == data.length()))
  +            // TODO: Hack around the issue of comments next to literals.
  +            // This would be, when a comment is present, the whitespace
  +            // after the comment must be added to the literal.  The
  +            // parser should do this, but XML4J doesn't seem to.
  +            // <foo>some lit text
  +            //     <!-- comment -->
  +            //     </foo>
  +            // Loop through next siblings while they are comments, then,
  +            // if the node after that is a ignorable text node, append
  +            // it to the text node just added.
  +            if (dhelper.isIgnorableWhitespace(tx))
               {
  -              data = null;
  +              m_rth.ignorableWhitespace(data.toCharArray(), 0, data.length());
               }
  +            else
  +            {
  +              m_rth.characters(data.toCharArray(), 0, data.length());
  +            }
             }
           }
  -        else
  +        break;
  +      case Node.DOCUMENT_NODE :
  +
  +        // Can't clone a document, but refrain from throwing an error
  +        // so that copy-of will work
  +        break;
  +      case Node.ELEMENT_NODE :
           {
  -          data = tx.getData();
  +          Attributes atts;
   
  -          if ((null != data) && (0 == data.length()))
  +          if (shouldCloneAttributes)
             {
  -            data = null;
  +            m_rth.addAttributes(node);
  +            m_rth.processNSDecls(node);
             }
  -        }
  -      }
   
  -      if (null != data)
  -      {
  +          String ns = dhelper.getNamespaceOfNode(node);
  +          String localName = dhelper.getLocalNameOfNode(node);
   
  -        // TODO: Hack around the issue of comments next to literals.
  -        // This would be, when a comment is present, the whitespace
  -        // after the comment must be added to the literal.  The
  -        // parser should do this, but XML4J doesn't seem to.
  -        // <foo>some lit text
  -        //     <!-- comment -->
  -        //     </foo>
  -        // Loop through next siblings while they are comments, then,
  -        // if the node after that is a ignorable text node, append
  -        // it to the text node just added.
  -        if (dhelper.isIgnorableWhitespace(tx))
  -        {
  -          m_rth.ignorableWhitespace(data.toCharArray(), 0, data.length());
  +          m_rth.startElement(ns, localName, node.getNodeName());
           }
  -        else
  +        break;
  +      case Node.CDATA_SECTION_NODE :
           {
  -          m_rth.characters(data.toCharArray(), 0, data.length());
  -        }
  -      }
  -    }
  -    break;
  -    case Node.DOCUMENT_NODE :
  +          m_rth.startCDATA();
   
  -      // Can't clone a document, but refrain from throwing an error
  -      // so that copy-of will work
  -      break;
  -    case Node.ELEMENT_NODE :
  -    {
  -      Attributes atts;
  +          String data = ((CDATASection) node).getData();
   
  -      if (shouldCloneAttributes)
  -      {
  -        m_rth.addAttributes(node);
  -        m_rth.processNSDecls(node);
  -      }
  -
  -      String ns = dhelper.getNamespaceOfNode(node);
  -      String localName = dhelper.getLocalNameOfNode(node);
  -
  -      m_rth.startElement(ns, localName, node.getNodeName());
  -    }
  -    break;
  -    case Node.CDATA_SECTION_NODE :
  -    {
  -      m_rth.startCDATA();
  +          m_rth.characters(data.toCharArray(), 0, data.length());
  +          m_rth.endCDATA();
  +        }
  +        break;
  +      case Node.ATTRIBUTE_NODE :
  +        {
  +          if (m_rth.isDefinedNSDecl((Attr) node))
  +            break;
   
  -      String data = ((CDATASection) node).getData();
  +          String ns = dhelper.getNamespaceOfNode(node);
  +          String localName = dhelper.getLocalNameOfNode(node);
   
  -      m_rth.characters(data.toCharArray(), 0, data.length());
  -      m_rth.endCDATA();
  -    }
  -    break;
  -    case Node.ATTRIBUTE_NODE :
  -    {
  -      if (m_rth.isDefinedNSDecl((Attr) node))
  +          m_rth.addAttribute(ns, localName, node.getNodeName(), "CDATA",
  +                             ((Attr) node).getValue());
  +        }
           break;
  -
  -      String ns = dhelper.getNamespaceOfNode(node);
  -      String localName = dhelper.getLocalNameOfNode(node);
  +      case Node.COMMENT_NODE :
  +        {
  +          m_rth.comment(((Comment) node).getData());
  +        }
  +        break;
  +      case Node.DOCUMENT_FRAGMENT_NODE :
  +        {
  +          m_transformer.getMsgMgr().error(
  +                                          null, node, XSLTErrorResources.ER_NO_CLONE_OF_DOCUMENT_FRAG);  //"No clone of a document fragment!");
  +        }
  +        break;
  +      case Node.ENTITY_REFERENCE_NODE :
  +        {
  +          EntityReference er = (EntityReference) node;
   
  -      m_rth.addAttribute(ns, localName, node.getNodeName(), "CDATA",
  -                         ((Attr) node).getValue());
  -    }
  -    break;
  -    case Node.COMMENT_NODE :
  -    {
  -      m_rth.comment(((Comment) node).getData());
  -    }
  -    break;
  -    case Node.DOCUMENT_FRAGMENT_NODE :
  -    {
  -      m_transformer.getMsgMgr().error(
  -        null, node, XSLTErrorResources.ER_NO_CLONE_OF_DOCUMENT_FRAG);  //"No clone of a document fragment!");
  -    }
  -    break;
  -    case Node.ENTITY_REFERENCE_NODE :
  -    {
  -      EntityReference er = (EntityReference) node;
  +          m_rth.entityReference(er.getNodeName());
  +        }
  +        break;
  +      case Node.PROCESSING_INSTRUCTION_NODE :
  +        {
  +          ProcessingInstruction pi = (ProcessingInstruction) node;
   
  -      m_rth.entityReference(er.getNodeName());
  +          m_rth.processingInstruction(pi.getTarget(), pi.getData());
  +        }
  +        break;
  +      default :
  +        m_transformer.getMsgMgr().error(XSLTErrorResources.ER_CANT_CREATE_ITEM,
  +                                        new Object[]{ node.getNodeName() });  //"Can not create item in result tree: "+node.getNodeName());
  +      }
       }
  -    break;
  -    case Node.PROCESSING_INSTRUCTION_NODE :
  +    catch(org.xml.sax.SAXException se)
       {
  -      ProcessingInstruction pi = (ProcessingInstruction) node;
  -
  -      m_rth.processingInstruction(pi.getTarget(), pi.getData());
  -    }
  -    break;
  -    default :
  -      m_transformer.getMsgMgr().error(XSLTErrorResources.ER_CANT_CREATE_ITEM,
  -                                      new Object[]{ node.getNodeName() });  //"Can not create item in result tree: "+node.getNodeName());
  +      throw new TransformerException(se);
       }
     }  // end cloneToResultTree function
   }
  
  
  
  1.4       +5 -5      xml-xalan/java/src/org/apache/xalan/transformer/Counter.java
  
  Index: Counter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/Counter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Counter.java	2000/10/30 18:56:56	1.3
  +++ Counter.java	2000/11/13 16:27:19	1.4
  @@ -62,7 +62,7 @@
   import org.apache.xpath.NodeSet;  // for isNodeAfter support
   import org.apache.xpath.XPathContext;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xpath.NodeSet;
   import org.apache.xpath.XPath;
  @@ -122,9 +122,9 @@
      * NEEDSDOC @param numberElem
      * NEEDSDOC @param countNodes
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  Counter(ElemNumber numberElem, NodeSet countNodes) throws SAXException
  +  Counter(ElemNumber numberElem, NodeSet countNodes) throws TransformerException
     {
       m_countNodes = countNodes;
       m_numberElem = numberElem;
  @@ -135,9 +135,9 @@
      *
      * NEEDSDOC @param numberElem
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  Counter(ElemNumber numberElem) throws SAXException
  +  Counter(ElemNumber numberElem) throws TransformerException
     {
       m_numberElem = numberElem;
     }
  
  
  
  1.4       +3 -3      xml-xalan/java/src/org/apache/xalan/transformer/CountersTable.java
  
  Index: CountersTable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/CountersTable.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CountersTable.java	2000/10/30 18:56:57	1.3
  +++ CountersTable.java	2000/11/13 16:27:19	1.4
  @@ -61,7 +61,7 @@
   
   import org.w3c.dom.Node;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xpath.XPathContext;
   import org.apache.xpath.XPath;
  @@ -156,10 +156,10 @@
      * NEEDSDOC @param node
      * @return The node count, or 0 if not found.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public int countNode(XPathContext support, ElemNumber numberElem, Node node)
  -          throws SAXException
  +          throws TransformerException
     {
   
       int count = 0;
  
  
  
  1.5       +1 -1      xml-xalan/java/src/org/apache/xalan/transformer/KeyIterator.java
  
  Index: KeyIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/KeyIterator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- KeyIterator.java	2000/10/30 18:56:57	1.4
  +++ KeyIterator.java	2000/11/13 16:27:19	1.5
  @@ -73,7 +73,7 @@
   import org.w3c.dom.traversal.NodeFilter;
   import org.w3c.dom.traversal.NodeIterator;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="internal"/>
  
  
  
  1.6       +2 -2      xml-xalan/java/src/org/apache/xalan/transformer/KeyManager.java
  
  Index: KeyManager.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/KeyManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- KeyManager.java	2000/10/30 18:56:58	1.5
  +++ KeyManager.java	2000/11/13 16:27:19	1.6
  @@ -90,11 +90,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public LocPathIterator getNodeSetByKey(
             XPathContext xctxt, Node doc, QName name, String ref, PrefixResolver nscontext)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       LocPathIterator nl = null;
  
  
  
  1.5       +2 -2      xml-xalan/java/src/org/apache/xalan/transformer/KeyTable.java
  
  Index: KeyTable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/KeyTable.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- KeyTable.java	2000/10/30 18:56:58	1.4
  +++ KeyTable.java	2000/11/13 16:27:19	1.5
  @@ -121,11 +121,11 @@
      * @param keyDeclarations The stylesheet's xsl:key declarations.
      * @param xmlLiaison The parser liaison for support of getNodeData(useNode).
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public KeyTable(
             Node doc, PrefixResolver nscontext, QName name, Vector keyDeclarations, XPathContext xmlLiaison)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       m_docKey = doc;
  
  
  
  1.6       +2 -2      xml-xalan/java/src/org/apache/xalan/transformer/KeyWalker.java
  
  Index: KeyWalker.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/KeyWalker.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- KeyWalker.java	2000/10/30 18:56:58	1.5
  +++ KeyWalker.java	2000/11/13 16:27:19	1.6
  @@ -73,7 +73,7 @@
   import org.w3c.dom.traversal.NodeFilter;
   import org.w3c.dom.traversal.NodeIterator;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -222,7 +222,7 @@
           }
         }  // end for(int i = 0; i < nDeclarations; i++)
       }
  -    catch (SAXException se)
  +    catch (TransformerException se)
       {
   
         // TODO: What to do?
  
  
  
  1.5       +41 -42    xml-xalan/java/src/org/apache/xalan/transformer/MsgMgr.java
  
  Index: MsgMgr.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/MsgMgr.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MsgMgr.java	2000/11/03 23:28:12	1.4
  +++ MsgMgr.java	2000/11/13 16:27:19	1.5
  @@ -58,15 +58,14 @@
   
   import org.apache.xalan.res.XSLMessages;
   
  -import org.xml.sax.SAXException;
   import org.xml.sax.Locator;
   import org.xml.sax.helpers.LocatorImpl;
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXParseException;
   
   import org.w3c.dom.Node;
   
   import javax.xml.transform.TransformerException;
  +import javax.xml.transform.ErrorListener;
  +import javax.xml.transform.dom.DOMLocator;
   
   /**
    * This class will manage error messages, warning messages, and other types of
  @@ -100,24 +99,24 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void message(String msg, boolean terminate) throws SAXException
  +  public void message(String msg, boolean terminate) throws TransformerException
     {
   
  -    ErrorHandler errHandler = m_transformer.getErrorHandler();
  +    ErrorListener errHandler = m_transformer.getErrorListener();
   
       if (null != errHandler)
       {
         if (terminate)
  -        errHandler.fatalError(new SAXParseException(msg, new LocatorImpl()));
  +        errHandler.fatalError(new TransformerException(msg));
         else
  -        errHandler.warning(new SAXParseException(msg, new LocatorImpl()));
  +        errHandler.warning(new TransformerException(msg));
       }
       else
       {
         if (terminate)
  -        throw new SAXException(msg);
  +        throw new TransformerException(msg);
         else
           System.out.println(msg);
       }
  @@ -131,9 +130,9 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void warn(int msg) throws SAXException
  +  public void warn(int msg) throws TransformerException
     {
       warn(null, null, msg, null);
     }
  @@ -147,9 +146,9 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void warn(int msg, Object[] args) throws SAXException
  +  public void warn(int msg, Object[] args) throws TransformerException
     {
       warn(null, null, msg, args);
     }
  @@ -164,10 +163,10 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void warn(Node styleNode, Node sourceNode, int msg)
  -          throws SAXException
  +          throws TransformerException
     {
       warn(styleNode, sourceNode, msg, null);
     }
  @@ -183,17 +182,17 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void warn(Node styleNode, Node sourceNode, int msg, Object args[])
  -          throws SAXException
  +          throws TransformerException
     {
   
       String formattedMsg = m_XSLMessages.createWarning(msg, args);
  -    ErrorHandler errHandler = m_transformer.getErrorHandler();
  +    ErrorListener errHandler = m_transformer.getErrorListener();
   
       if (null != errHandler)
  -      errHandler.warning(new SAXParseException(formattedMsg, new LocatorImpl()));
  +      errHandler.warning(new TransformerException(formattedMsg));
       else
         System.out.println(formattedMsg);
     }
  @@ -207,21 +206,21 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void error(String msg) throws SAXException
  +  public void error(String msg) throws TransformerException
     {
   
       // Locator locator = m_stylesheetLocatorStack.isEmpty()
       //                  ? null :
       //                    ((Locator)m_stylesheetLocatorStack.peek());
       // Locator locator = null;
  -    ErrorHandler errHandler = m_transformer.getErrorHandler();
  +    ErrorListener errHandler = m_transformer.getErrorListener();
   
       if (null != errHandler)
  -      errHandler.fatalError(new SAXParseException(msg, new LocatorImpl()));
  +      errHandler.fatalError(new TransformerException(msg));
       else
  -      throw new SAXException(msg);
  +      throw new TransformerException(msg);
     }
   
     /**
  @@ -233,9 +232,9 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void error(int msg) throws SAXException
  +  public void error(int msg) throws TransformerException
     {
       error(null, null, msg, null);
     }
  @@ -250,9 +249,9 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void error(int msg, Object[] args) throws SAXException
  +  public void error(int msg, Object[] args) throws TransformerException
     {
       error(null, null, msg, args);
     }
  @@ -267,9 +266,9 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void error(int msg, Exception e) throws SAXException
  +  public void error(int msg, Exception e) throws TransformerException
     {
       error(msg, null, e);
     }
  @@ -285,9 +284,9 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void error(int msg, Object args[], Exception e) throws SAXException
  +  public void error(int msg, Object args[], Exception e) throws TransformerException
     {
   
       //msg  = (null == msg) ? XSLTErrorResources.ER_PROCESSOR_ERROR : msg;
  @@ -297,12 +296,12 @@
       //                   ? null :
       //                    ((Locator)m_stylesheetLocatorStack.peek());
       // Locator locator = null;
  -    ErrorHandler errHandler = m_transformer.getErrorHandler();
  +    ErrorListener errHandler = m_transformer.getErrorListener();
   
       if (null != errHandler)
  -      errHandler.fatalError(new SAXParseException(formattedMsg, new LocatorImpl()));
  +      errHandler.fatalError(new TransformerException(formattedMsg));
       else
  -      throw new SAXException(formattedMsg);
  +      throw new TransformerException(formattedMsg);
     }
   
     /**
  @@ -316,10 +315,10 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void error(Node styleNode, Node sourceNode, int msg)
  -          throws SAXException
  +          throws TransformerException
     {
       error(styleNode, sourceNode, msg, null);
     }
  @@ -336,10 +335,10 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void error(Node styleNode, Node sourceNode, int msg, Object args[])
  -          throws SAXException
  +          throws TransformerException
     {
   
       String formattedMsg = m_XSLMessages.createMessage(msg, args);
  @@ -348,11 +347,11 @@
       //                   ? null :
       //                    ((Locator)m_stylesheetLocatorStack.peek());
       // Locator locator = null;
  -    ErrorHandler errHandler = m_transformer.getErrorHandler();
  +    ErrorListener errHandler = m_transformer.getErrorListener();
   
       if (null != errHandler)
  -      errHandler.warning(new SAXParseException(formattedMsg, new LocatorImpl()));
  +      errHandler.warning(new TransformerException(formattedMsg));
       else
  -      throw new SAXException(formattedMsg);
  +      throw new TransformerException(formattedMsg);
     }
   }
  
  
  
  1.4       +2 -2      xml-xalan/java/src/org/apache/xalan/transformer/NodeSortKey.java
  
  Index: NodeSortKey.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/NodeSortKey.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NodeSortKey.java	2000/10/30 18:56:59	1.3
  +++ NodeSortKey.java	2000/11/13 16:27:19	1.4
  @@ -107,11 +107,11 @@
      * NEEDSDOC @param caseOrderUpper
      * NEEDSDOC @param namespaceContext
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     NodeSortKey(
             TransformerImpl transformer, XPath selectPat, boolean treatAsNumbers, boolean descending, String langValue, boolean caseOrderUpper, org.apache.xalan.utils.PrefixResolver namespaceContext)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       m_processor = transformer;
  
  
  
  1.7       +10 -10    xml-xalan/java/src/org/apache/xalan/transformer/NodeSorter.java
  
  Index: NodeSorter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/NodeSorter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NodeSorter.java	2000/11/03 23:28:12	1.6
  +++ NodeSorter.java	2000/11/13 16:27:19	1.7
  @@ -71,7 +71,7 @@
   import org.apache.xpath.objects.XNodeSet;
   import org.apache.xalan.utils.NodeVector;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -110,10 +110,10 @@
      * @param keys a vector of NodeSortKeys.
      * NEEDSDOC @param support
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void sort(NodeVector v, Vector keys, XPathContext support)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       m_keys = keys;
  @@ -158,11 +158,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     int compare(
             NodeCompareElem n1, NodeCompareElem n2, int kIndex, XPathContext support)
  -            throws SAXException
  +            throws TransformerException
     {
   
       int result = 0;
  @@ -316,10 +316,10 @@
      * NEEDSDOC @param r
      * NEEDSDOC @param support
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     void mergesort(Vector a, Vector b, int l, int r, XPathContext support)
  -          throws SAXException
  +          throws TransformerException
     {
   
       if ((r - l) > 0)
  @@ -409,7 +409,7 @@
      */
   
     /*  private void QuickSort2(Vector v, int lo0, int hi0, XPathContext support)
  -      throws org.xml.sax.SAXException,
  +      throws javax.xml.transform.TransformerException,
                java.net.MalformedURLException,
                java.io.FileNotFoundException,
                java.io.IOException
  @@ -511,9 +511,9 @@
        *
        * NEEDSDOC @param node
        *
  -     * @throws org.xml.sax.SAXException
  +     * @throws javax.xml.transform.TransformerException
        */
  -    NodeCompareElem(Node node) throws org.xml.sax.SAXException
  +    NodeCompareElem(Node node) throws javax.xml.transform.TransformerException
       {
   
         boolean tryNextKey = true;
  
  
  
  1.4       +3 -3      xml-xalan/java/src/org/apache/xalan/transformer/QueuedEvents.java
  
  Index: QueuedEvents.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/QueuedEvents.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueuedEvents.java	2000/10/30 18:57:00	1.3
  +++ QueuedEvents.java	2000/11/13 16:27:19	1.4
  @@ -180,7 +180,7 @@
     }
   
     /** NEEDSDOC Field m_serializer          */
  -  private org.apache.serialize.Serializer m_serializer;
  +  private org.apache.xalan.serialize.Serializer m_serializer;
   
     /**
      * This is only for use of object pooling, so the that
  @@ -188,7 +188,7 @@
      *
      * NEEDSDOC @param s
      */
  -  void setSerializer(org.apache.serialize.Serializer s)
  +  void setSerializer(org.apache.xalan.serialize.Serializer s)
     {
       m_serializer = s;
     }
  @@ -199,7 +199,7 @@
      *
      * NEEDSDOC ($objectName$) @return
      */
  -  org.apache.serialize.Serializer getSerializer()
  +  org.apache.xalan.serialize.Serializer getSerializer()
     {
       return m_serializer;
     }
  
  
  
  1.4       +3 -3      xml-xalan/java/src/org/apache/xalan/transformer/QueuedSAXEvent.java
  
  Index: QueuedSAXEvent.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/QueuedSAXEvent.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueuedSAXEvent.java	2000/10/30 18:57:00	1.3
  +++ QueuedSAXEvent.java	2000/11/13 16:27:19	1.4
  @@ -57,7 +57,7 @@
   package org.apache.xalan.transformer;
   
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   import org.apache.xalan.trace.TraceManager;
  @@ -199,9 +199,9 @@
     /**
      * Flush the event.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  void flush() throws SAXException
  +  void flush() throws org.xml.sax.SAXException
     {
       clearPending();
     }
  
  
  
  1.4       +3 -3      xml-xalan/java/src/org/apache/xalan/transformer/QueuedStartDocument.java
  
  Index: QueuedStartDocument.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/QueuedStartDocument.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueuedStartDocument.java	2000/10/30 18:57:00	1.3
  +++ QueuedStartDocument.java	2000/11/13 16:27:19	1.4
  @@ -57,7 +57,7 @@
   package org.apache.xalan.transformer;
   
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.trace.GenerateEvent;
   
  @@ -98,9 +98,9 @@
     /**
      * Flush the event.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  void flush() throws SAXException
  +  void flush() throws org.xml.sax.SAXException
     {
   
       if (isPending)
  
  
  
  1.4       +2 -2      xml-xalan/java/src/org/apache/xalan/transformer/QueuedStartElement.java
  
  Index: QueuedStartElement.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/QueuedStartElement.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueuedStartElement.java	2000/10/30 18:57:00	1.3
  +++ QueuedStartElement.java	2000/11/13 16:27:19	1.4
  @@ -59,7 +59,7 @@
   import java.util.Vector;
   
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Attributes;
   
   import org.apache.xalan.utils.MutableAttrListImpl;
  @@ -272,7 +272,7 @@
      *
      * @throws SAXException
      */
  -  void flush() throws SAXException
  +  void flush() throws org.xml.sax.SAXException
     {
   
       if (isPending)
  
  
  
  1.23      +128 -195  xml-xalan/java/src/org/apache/xalan/transformer/ResultTreeHandler.java
  
  Index: ResultTreeHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/ResultTreeHandler.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ResultTreeHandler.java	2000/11/03 23:28:12	1.22
  +++ ResultTreeHandler.java	2000/11/13 16:27:19	1.23
  @@ -79,13 +79,12 @@
   
   import org.xml.sax.Attributes;
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.ErrorHandler;
   import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.helpers.NamespaceSupport;
   import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
  -import org.apache.serialize.SerializerHandler;
  +import javax.xml.transform.ErrorListener;
   
   /**
    * This class is a layer between the direct calls to the result
  @@ -97,7 +96,7 @@
    * can call startElement.
    */
   public class ResultTreeHandler extends QueuedEvents
  -        implements ContentHandler, SerializerHandler, LexicalHandler
  +        implements ContentHandler, LexicalHandler
   {
   
     /** NEEDSDOC Field DEBUG          */
  @@ -159,18 +158,18 @@
     /**
      * Bottleneck the startDocument event.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void startDocument() throws SAXException{}
  +  public void startDocument() throws org.xml.sax.SAXException{}
   
     /**
      * Bottleneck the endDocument event.  This may be called
      * more than once in order to make sure the pending start
      * document is called.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endDocument() throws SAXException
  +  public void endDocument() throws org.xml.sax.SAXException
     {
       flushPending(EVT_ENDDOCUMENT);
   
  @@ -202,10 +201,10 @@
      * NEEDSDOC @param localName
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void startElement(String ns, String localName, String name)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
       startElement(ns, localName, name, null);
     }
  @@ -220,11 +219,11 @@
      * NEEDSDOC @param name
      * NEEDSDOC @param atts
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void startElement(
             String ns, String localName, String name, Attributes atts)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       QueuedStartElement qse = getQueuedElem();
  @@ -262,10 +261,10 @@
      * NEEDSDOC @param localName
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void endElement(String ns, String localName, String name)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_ENDELEMENT);
  @@ -317,15 +316,15 @@
      *
      * @param prefix The Namespace prefix being declared.
      * @param uri The Namespace URI the prefix is mapped to.
  -   * @exception org.xml.sax.SAXException The client may throw
  +   * @exception javax.xml.transform.TransformerException The client may throw
      *            an exception during processing.
      * @see #endPrefixMapping
      * @see #startElement
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void startPrefixMapping(String prefix, String uri)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
       startPrefixMapping(prefix, uri, false);
     }
  @@ -338,10 +337,10 @@
      * NEEDSDOC @param uri
      * NEEDSDOC @param shouldFlush
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void startPrefixMapping(
  -          String prefix, String uri, boolean shouldFlush) throws SAXException
  +          String prefix, String uri, boolean shouldFlush) throws org.xml.sax.SAXException
     {
   
       if (shouldFlush)
  @@ -383,14 +382,14 @@
      * guaranteed.</p>
      *
      * @param prefix The prefix that was being mapping.
  -   * @exception org.xml.sax.SAXException The client may throw
  +   * @exception javax.xml.transform.TransformerException The client may throw
      *            an exception during processing.
      * @see #startPrefixMapping
      * @see #endElement
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endPrefixMapping(String prefix) throws SAXException{}
  +  public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException{}
   
     /**
      * Bottleneck the characters event.
  @@ -399,9 +398,9 @@
      * NEEDSDOC @param start
      * NEEDSDOC @param length
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void characters(char ch[], int start, int length) throws SAXException
  +  public void characters(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       if (m_startDoc.isPending
  @@ -428,10 +427,10 @@
      * NEEDSDOC @param start
      * NEEDSDOC @param length
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void ignorableWhitespace(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       QueuedStartDocument qsd = getQueuedDoc();
  @@ -460,12 +459,11 @@
      * NEEDSDOC @param target
      * NEEDSDOC @param data
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void processingInstruction(String target, String data)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
  -
       flushPending(EVT_PROCESSINGINSTRUCTION);
       m_contentHandler.processingInstruction(target, data);
   
  @@ -484,9 +482,9 @@
      *
      * NEEDSDOC @param data
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void comment(String data) throws SAXException
  +  public void comment(String data) throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_COMMENT);
  @@ -513,9 +511,9 @@
      * NEEDSDOC @param start
      * NEEDSDOC @param length
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void comment(char ch[], int start, int length) throws SAXException
  +  public void comment(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_COMMENT);
  @@ -540,9 +538,9 @@
      *
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void entityReference(String name) throws SAXException
  +  public void entityReference(String name) throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_ENTITYREF);
  @@ -568,9 +566,9 @@
      *
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void startEntity(String name) throws SAXException
  +  public void startEntity(String name) throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_STARTENTITY);
  @@ -586,9 +584,9 @@
      *
      * NEEDSDOC @param name
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endEntity(String name) throws SAXException
  +  public void endEntity(String name) throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_ENDENTITY);
  @@ -615,9 +613,9 @@
      * NEEDSDOC @param s2
      * NEEDSDOC @param s3
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void startDTD(String s1, String s2, String s3) throws SAXException
  +  public void startDTD(String s1, String s2, String s3) throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_STARTDTD);
  @@ -631,9 +629,9 @@
     /**
      * End the DTD.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endDTD() throws SAXException
  +  public void endDTD() throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_ENDDTD);
  @@ -645,92 +643,11 @@
     }
   
     /**
  -   * Starts an un-escaping section. All characters printed within an
  -   * un-escaping section are printed as is, without escaping special
  -   * characters into entity references. Only XML and HTML serializers
  -   * need to support this method.
  -   * <p>
  -   * The contents of the un-escaping section will be delivered through
  -   * the regular <tt>characters</tt> event.
  -   *
  -   * @throws SAXException
  -   */
  -  public void startNonEscaping() throws SAXException
  -  {
  -
  -    flushPending(EVT_STARTNONESCAPING);
  -
  -    if (m_contentHandler instanceof SerializerHandler)
  -    {
  -      ((SerializerHandler) m_contentHandler).startNonEscaping();
  -    }
  -  }
  -
  -  /**
  -   * Ends an un-escaping section.
  -   *
  -   * @see #startNonEscaping
  -   *
  -   * @throws SAXException
  -   */
  -  public void endNonEscaping() throws SAXException
  -  {
  -
  -    flushPending(EVT_ENDNONESCAPING);
  -
  -    if (m_contentHandler instanceof SerializerHandler)
  -    {
  -      ((SerializerHandler) m_contentHandler).endNonEscaping();
  -    }
  -  }
  -
  -  /**
  -   * Starts a whitespace preserving section. All characters printed
  -   * within a preserving section are printed without indentation and
  -   * without consolidating multiple spaces. This is equivalent to
  -   * the <tt>xml:space=&quot;preserve&quot;</tt> attribute. Only XML
  -   * and HTML serializers need to support this method.
  -   * <p>
  -   * The contents of the whitespace preserving section will be delivered
  -   * through the regular <tt>characters</tt> event.
  -   *
  -   * @throws SAXException
  -   */
  -  public void startPreserving() throws SAXException
  -  {
  -
  -    flushPending(EVT_STARTPRESERVING);
  -
  -    if (m_contentHandler instanceof SerializerHandler)
  -    {
  -      ((SerializerHandler) m_contentHandler).startPreserving();
  -    }
  -  }
  -
  -  /**
  -   * Ends a whitespace preserving section.
  -   *
  -   * @see #startPreserving
  -   *
  -   * @throws SAXException
  -   */
  -  public void endPreserving() throws SAXException
  -  {
  -
  -    flushPending(EVT_ENDENDPRESERVING);
  -
  -    if (m_contentHandler instanceof SerializerHandler)
  -    {
  -      ((SerializerHandler) m_contentHandler).endPreserving();
  -    }
  -  }
  -
  -  /**
      * Start the CDATACharacters.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void startCDATA() throws SAXException
  +  public void startCDATA() throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_STARTCDATA);
  @@ -744,9 +661,9 @@
     /**
      * End the CDATA characters.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void endCDATA() throws SAXException
  +  public void endCDATA() throws org.xml.sax.SAXException
     {
   
       flushPending(EVT_ENDCDATA);
  @@ -771,19 +688,19 @@
      *
      * @param name The name of the skipped entity.  If it is a
      *        parameter entity, the name will begin with '%'.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void skippedEntity(String name) throws SAXException{}
  +  public void skippedEntity(String name) throws org.xml.sax.SAXException{}
   
     /**
      * Flush the pending element.
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void flushPending() throws SAXException
  +  public void flushPending() throws org.xml.sax.SAXException
     {
       flushPending(EVT_NODE);
     }
  @@ -793,9 +710,9 @@
      *
      * NEEDSDOC @param type
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  public void flushPending(int type) throws SAXException
  +  public void flushPending(int type) throws org.xml.sax.SAXException
     {
   
       QueuedStartElement qe = getQueuedElem();
  @@ -825,10 +742,10 @@
      * NEEDSDOC @param obj
      * NEEDSDOC @param support
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void outputResultTreeFragment(XObject obj, XPathContext support)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       DocumentFragment docFrag = obj.rtree(support);
  @@ -849,12 +766,19 @@
      * NEEDSDOC @param node
      * NEEDSDOC @param shouldCloneAttributes
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     public void cloneToResultTree(Node node, boolean shouldCloneAttributes)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
  -    m_cloner.cloneToResultTree(node, shouldCloneAttributes);
  +    try
  +    {
  +      m_cloner.cloneToResultTree(node, shouldCloneAttributes);
  +    }
  +    catch(TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  @@ -874,9 +798,9 @@
      * NEEDSDOC @param ns
      * NEEDSDOC @param rawName
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  void ensurePrefixIsDeclared(String ns, String rawName) throws SAXException
  +  void ensurePrefixIsDeclared(String ns, String rawName) throws org.xml.sax.SAXException
     {
   
       if (ns != null && ns.length() > 0)
  @@ -899,9 +823,9 @@
      * Add the attributes that have been declared to the attribute list.
      * (Seems like I shouldn't have to do this...)
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  protected void sendStartPrefixMappings() throws SAXException
  +  protected void sendStartPrefixMappings() throws org.xml.sax.SAXException
     {
   
       Enumeration prefixes = m_nsSupport.getDeclaredPrefixes();
  @@ -919,9 +843,9 @@
      * Add the attributes that have been declared to the attribute list.
      * (Seems like I shouldn't have to do this...)
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
  -  protected void sendEndPrefixMappings() throws SAXException
  +  protected void sendEndPrefixMappings() throws org.xml.sax.SAXException
     {
   
       Enumeration prefixes = m_nsSupport.getDeclaredPrefixes();
  @@ -942,17 +866,24 @@
      * NEEDSDOC @param ns
      * NEEDSDOC @param localName
      *
  -   * @throws SAXException
  +   * @throws org.xml.sax.SAXException
      */
     private void checkForSerializerSwitch(String ns, String localName)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
  -    QueuedStartDocument qdab = getQueuedDocAtBottom();
  +    try
  +    {
  +      QueuedStartDocument qdab = getQueuedDocAtBottom();
   
  -    if (qdab.isPending)
  +      if (qdab.isPending)
  +      {
  +        SerializerSwitcher.switchSerializerIfHTML(m_transformer, ns, localName);
  +      }
  +    }
  +    catch(TransformerException te)
       {
  -      SerializerSwitcher.switchSerializerIfHTML(m_transformer, ns, localName);
  +      throw new org.xml.sax.SAXException(te);
       }
     }
   
  @@ -995,46 +926,53 @@
      *
      * NEEDSDOC @param src
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void processNSDecls(Node src) throws SAXException
  +  public void processNSDecls(Node src) throws TransformerException
     {
   
  -    int type;
  -
  -    // Vector nameValues = null;
  -    // Vector alreadyProcessedPrefixes = null;
  -    Node parent;
  -
  -    if (((type = src.getNodeType()) == Node.ELEMENT_NODE || (type == Node.ENTITY_REFERENCE_NODE))
  -            && (parent = src.getParentNode()) != null)
  +    try
       {
  -      processNSDecls(parent);
  -    }
  +      int type;
   
  -    if (type == Node.ELEMENT_NODE)
  -    {
  -      NamedNodeMap nnm = src.getAttributes();
  -      int nAttrs = nnm.getLength();
  +      // Vector nameValues = null;
  +      // Vector alreadyProcessedPrefixes = null;
  +      Node parent;
   
  -      for (int i = 0; i < nAttrs; i++)
  +      if (((type = src.getNodeType()) == Node.ELEMENT_NODE || (type == Node.ENTITY_REFERENCE_NODE))
  +          && (parent = src.getParentNode()) != null)
         {
  -        Node attr = nnm.item(i);
  -        String aname = attr.getNodeName();
  +        processNSDecls(parent);
  +      }
   
  -        if (QName.isXMLNSDecl(aname))
  +      if (type == Node.ELEMENT_NODE)
  +      {
  +        NamedNodeMap nnm = src.getAttributes();
  +        int nAttrs = nnm.getLength();
  +
  +        for (int i = 0; i < nAttrs; i++)
           {
  -          String prefix = QName.getPrefixFromXMLNSDecl(aname);
  -          String desturi = getURI(prefix);
  -          String srcURI = attr.getNodeValue();
  +          Node attr = nnm.item(i);
  +          String aname = attr.getNodeName();
   
  -          if (!srcURI.equalsIgnoreCase(desturi))
  +          if (QName.isXMLNSDecl(aname))
             {
  -            this.startPrefixMapping(prefix, srcURI);
  +            String prefix = QName.getPrefixFromXMLNSDecl(aname);
  +            String desturi = getURI(prefix);
  +            String srcURI = attr.getNodeValue();
  +
  +            if (!srcURI.equalsIgnoreCase(desturi))
  +            {
  +              this.startPrefixMapping(prefix, srcURI);
  +            }
             }
           }
         }
       }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
     }
   
     /**
  @@ -1178,11 +1116,11 @@
      * @param type The attribute type as a string.
      * @param value The attribute value.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void addAttribute(
             String uri, String localName, String rawName, String type, String value)
  -            throws SAXException
  +            throws TransformerException
     {
   
       QueuedStartElement qe = getQueuedElem();
  @@ -1190,7 +1128,14 @@
       if (!qe.nsDeclsHaveBeenAdded())
         addNSDeclsToAttrs();
   
  -    ensurePrefixIsDeclared(uri, rawName);
  +    try
  +    {
  +      ensurePrefixIsDeclared(uri, rawName);
  +    }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
   
       if (DEBUG)
         System.out.println("Adding attr: " + localName + ", " + uri);
  @@ -1268,9 +1213,9 @@
      *
      * NEEDSDOC @param attr
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void addAttribute(Attr attr) throws SAXException
  +  public void addAttribute(Attr attr) throws TransformerException
     {
   
       if (isDefinedNSDecl(attr))
  @@ -1288,9 +1233,9 @@
      *
      * NEEDSDOC @param src
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void addAttributes(Node src) throws SAXException
  +  public void addAttributes(Node src) throws TransformerException
     {
   
       NamedNodeMap nnm = src.getAttributes();
  @@ -1413,18 +1358,6 @@
   
     /** NEEDSDOC Field EVT_ENDDTD          */
     private static final int EVT_ENDDTD = 17;
  -
  -  /** NEEDSDOC Field EVT_STARTNONESCAPING          */
  -  private static final int EVT_STARTNONESCAPING = 18;
  -
  -  /** NEEDSDOC Field EVT_ENDNONESCAPING          */
  -  private static final int EVT_ENDNONESCAPING = 19;
  -
  -  /** NEEDSDOC Field EVT_STARTPRESERVING          */
  -  private static final int EVT_STARTPRESERVING = 20;
  -
  -  /** NEEDSDOC Field EVT_ENDENDPRESERVING          */
  -  private static final int EVT_ENDENDPRESERVING = 21;
   
     /** NEEDSDOC Field EVT_STARTCDATA          */
     private static final int EVT_STARTCDATA = 22;
  
  
  
  1.4       +8 -8      xml-xalan/java/src/org/apache/xalan/transformer/SerializerSwitcher.java
  
  Index: SerializerSwitcher.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/SerializerSwitcher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SerializerSwitcher.java	2000/10/30 18:57:01	1.3
  +++ SerializerSwitcher.java	2000/11/13 16:27:19	1.4
  @@ -62,12 +62,12 @@
   import org.apache.xalan.templates.StylesheetRoot;
   
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
  -import org.apache.serialize.Serializer;
  -import org.apache.serialize.SerializerFactory;
  -import org.apache.serialize.Method;
  -import org.apache.serialize.OutputFormat;
  +import org.apache.xalan.serialize.Serializer;
  +import org.apache.xalan.serialize.SerializerFactory;
  +import org.apache.xalan.serialize.Method;
  +import org.apache.xalan.serialize.OutputFormat;
   import org.apache.xalan.templates.OutputFormatExtended;
   
   /**
  @@ -85,11 +85,11 @@
      * NEEDSDOC @param ns
      * NEEDSDOC @param localName
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public static void switchSerializerIfHTML(
             TransformerImpl transformer, String ns, String localName)
  -            throws SAXException
  +            throws TransformerException
     {
   
       if (null == transformer)
  @@ -143,7 +143,7 @@
           }
           catch (java.io.IOException e)
           {
  -          throw new SAXException(e);
  +          throw new TransformerException(e);
           }
         }
       }
  
  
  
  1.4       +6 -6      xml-xalan/java/src/org/apache/xalan/transformer/StackGuard.java
  
  Index: StackGuard.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/StackGuard.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StackGuard.java	2000/10/30 18:57:02	1.3
  +++ StackGuard.java	2000/11/13 16:27:19	1.4
  @@ -63,7 +63,7 @@
   import java.io.PrintWriter;
   import java.io.StringWriter;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.templates.ElemTemplateElement;
   
  @@ -196,9 +196,9 @@
      *
      * NEEDSDOC @param guard
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void checkForInfinateLoop(StackGuard guard) throws SAXException
  +  public void checkForInfinateLoop(StackGuard guard) throws TransformerException
     {
   
       int nRules = stack.size();
  @@ -235,7 +235,7 @@
           guard.print(pw);
           pw.println("End of infinite loop diagnosis.");
   
  -        throw new SAXException(sw.getBuffer().toString());
  +        throw new TransformerException(sw.getBuffer().toString());
         }
       }
     }
  @@ -247,10 +247,10 @@
      * NEEDSDOC @param xslTemplate
      * NEEDSDOC @param sourceXML
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void push(ElemTemplateElement xslTemplate, Node sourceXML)
  -          throws SAXException
  +          throws TransformerException
     {
   
       StackGuard guard = new StackGuard(xslTemplate, sourceXML);
  
  
  
  1.3       +16 -15    xml-xalan/java/src/org/apache/xalan/transformer/TrAXFilter.java
  
  Index: TrAXFilter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TrAXFilter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TrAXFilter.java	2000/11/06 17:51:46	1.2
  +++ TrAXFilter.java	2000/11/13 16:27:19	1.3
  @@ -2,13 +2,12 @@
   
   import java.io.IOException;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.InputSource;
   import org.xml.sax.XMLReader;
   import org.xml.sax.XMLFilter;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.EntityResolver;
  -import org.xml.sax.ErrorHandler;
   import org.xml.sax.DTDHandler;
   import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.helpers.XMLFilterImpl;
  @@ -16,6 +15,7 @@
   
   import javax.xml.transform.Templates;
   import javax.xml.transform.TransformerConfigurationException;
  +import javax.xml.transform.ErrorListener;
   
   import org.apache.xalan.stree.SourceTreeHandler;
   
  @@ -70,7 +70,7 @@
      * Parse a document.
      *
      * @param input The input source for the document entity.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @exception java.io.IOException An IO exception from the parser,
      *            possibly from a byte stream or character stream
  @@ -78,7 +78,7 @@
      * @see org.xml.sax.XMLReader#parse(org.xml.sax.InputSource)
      */
     public void parse (InputSource input)
  -    throws SAXException, IOException
  +    throws org.xml.sax.SAXException, IOException
     {
       if(null == getParent())
       {
  @@ -90,7 +90,7 @@
           parent.setFeature("http://apache.org/xml/features/validation/dynamic",
                             true);
         }
  -      catch (SAXException se){}
  +      catch (org.xml.sax.SAXException se){}
         // setParent calls setupParse...
         setParent(parent);
       }
  @@ -101,17 +101,17 @@
       }
       if(null == m_transformer.getContentHandler())
       {
  -      throw new SAXException("parse can not be called if the ContentHandler has not been set!");
  +      throw new org.xml.sax.SAXException("parse can not be called if the ContentHandler has not been set!");
       }
   
       getParent().parse(input);
       Exception e = m_transformer.getExceptionThrown();
       if(null != e)
       {
  -      if(e instanceof SAXException)
  -        throw (SAXException)e;
  +      if(e instanceof org.xml.sax.SAXException)
  +        throw (org.xml.sax.SAXException)e;
         else
  -        throw new SAXException(e);
  +        throw new org.xml.sax.SAXException(e);
       }
     }
     
  @@ -119,7 +119,7 @@
      * Parse a document.
      *
      * @param systemId The system identifier as a fully-qualified URI.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @exception java.io.IOException An IO exception from the parser,
      *            possibly from a byte stream or character stream
  @@ -127,7 +127,7 @@
      * @see org.xml.sax.XMLReader#parse(java.lang.String)
      */
     public void parse (String systemId)
  -    throws SAXException, IOException
  +    throws org.xml.sax.SAXException, IOException
     {
       parse(new InputSource(systemId));
     }
  @@ -162,8 +162,9 @@
       else
         p.setDTDHandler(this);
       
  -    if(null != m_transformer.getErrorHandler())
  -      p.setErrorHandler(m_transformer.getErrorHandler());
  +    ErrorListener elistener = m_transformer.getErrorListener();
  +    if((null != elistener) && (elistener instanceof org.xml.sax.ErrorHandler))
  +      p.setErrorHandler((org.xml.sax.ErrorHandler)elistener);
       else
         p.setErrorHandler(this);
     }
  @@ -182,9 +183,9 @@
       // super.setContentHandler(m_transformer.getResultTreeHandler());
     }
     
  -  public void setErrorHandler (ErrorHandler handler)
  +  public void setErrorListener (ErrorListener handler)
     {
  -    m_transformer.setErrorHandler(handler);
  +    m_transformer.setErrorListener(handler);
     }
   
   }
  
  
  
  1.48      +169 -128  xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java
  
  Index: TransformerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- TransformerImpl.java	2000/11/10 20:55:09	1.47
  +++ TransformerImpl.java	2000/11/13 16:27:19	1.48
  @@ -112,10 +112,10 @@
   import org.apache.xpath.DOM2Helper;
   
   // Serializer Imports
  -import org.apache.serialize.OutputFormat;
  -import org.apache.serialize.Serializer;
  -import org.apache.serialize.SerializerFactory;
  -import org.apache.serialize.Method;
  +import org.apache.xalan.serialize.OutputFormat;
  +import org.apache.xalan.serialize.Serializer;
  +import org.apache.xalan.serialize.SerializerFactory;
  +import org.apache.xalan.serialize.Method;
   
   // DOM Imports
   import org.w3c.dom.Attr;
  @@ -128,7 +128,7 @@
   import org.xml.sax.ContentHandler;
   import org.xml.sax.helpers.XMLFilterImpl;
   import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.XMLReader;
   import org.xml.sax.XMLFilter;
   import org.xml.sax.Locator;
  @@ -137,7 +137,7 @@
   import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.SAXNotRecognizedException;
   import org.xml.sax.SAXNotSupportedException;
  -import org.xml.sax.ErrorHandler;
  +import javax.xml.transform.ErrorListener;
   
   // TRaX Imports
   import javax.xml.transform.Source;
  @@ -152,7 +152,7 @@
   import javax.xml.transform.sax.SAXSource;
   import javax.xml.transform.sax.SAXResult;
   import javax.xml.transform.stream.StreamResult;
  -import javax.xml.transform.stream.OutputKeys;
  +import javax.xml.transform.OutputKeys;
   
   // Imported JAVA API for XML Parsing 1.0 classes
   import javax.xml.parsers.DocumentBuilder;
  @@ -328,7 +328,7 @@
     /**
      * The SAX error handler, where errors and warnings are sent.
      */
  -  private ErrorHandler m_errorHandler = null;
  +  private ErrorListener m_errorHandler = null;
   
     /**
      * The trace manager.
  @@ -356,7 +356,7 @@
      * need to know when it is done, so we can return.
      */
     boolean m_isTransformDone = false;
  -
  +  
     //==========================================================
     // SECTION: Constructors
     //==========================================================
  @@ -485,7 +485,7 @@
           reader.setFeature("http://apache.org/xml/features/validation/dynamic",
                             true);
         }
  -      catch (SAXException se)
  +      catch (org.xml.sax.SAXException se)
         {
           // We don't care.
         }
  @@ -495,8 +495,12 @@
         ContentHandler inputHandler = getInputContentHandler();
   
         reader.setContentHandler(inputHandler);
  -      reader.setProperty("http://xml.org/sax/properties/lexical-handler",
  -                         inputHandler);
  +      try
  +      {
  +        reader.setProperty("http://xml.org/sax/properties/lexical-handler",
  +                           inputHandler);
  +      }
  +      catch(org.xml.sax.SAXException se) {}
   
         // Set the reader for cloning purposes.
         getXPathContext().setPrimaryReader(reader);
  @@ -579,10 +583,8 @@
   
         throw new TransformerException(wre.getException());
       }
  -    catch (SAXException se)
  +    catch(org.xml.sax.SAXException se)
       {
  -      // se.printStackTrace(); ?? -sb
  -
         throw new TransformerException(se);
       }
       catch (IOException ioe)
  @@ -634,7 +636,6 @@
      * @throws TransformerException
      */
     public String getOutputProperty(String name)
  -          throws TransformerException
     {    
       if (m_outputFormat instanceof OutputFormatExtended)
       {
  @@ -703,7 +704,7 @@
      * @throws TransformerException
      */
     public void setOutputProperty(String name, String value)
  -    throws TransformerException
  +    throws IllegalArgumentException
     {
       OutputFormat ofe = m_outputFormat;
       if(null == ofe)
  @@ -876,73 +877,77 @@
         m_urlOfSource = xmlSource.getSystemId();
   
       Node doc = null;
  -      try
  -      {
  -        // Get an already set XMLReader, or create one.
  -        XMLReader reader = null;
  -        if(source instanceof SAXSource)
  -          reader = ((SAXSource)source).getXMLReader();
  +    try
  +    {
  +      // Get an already set XMLReader, or create one.
  +      XMLReader reader = null;
  +      if(source instanceof SAXSource)
  +        reader = ((SAXSource)source).getXMLReader();
   
  -        if (null == reader)
  -        {
  -          reader = XMLReaderFactory.createXMLReader();
  -        }
  +      if (null == reader)
  +      {
  +        reader = XMLReaderFactory.createXMLReader();
  +      }
   
  -        try
  -        {
  -          reader.setFeature("http://xml.org/sax/features/namespace-prefixes",
  -                            true);
  -          reader.setFeature(
  -                            "http://apache.org/xml/features/validation/dynamic", true);
  -        }
  -        catch (SAXException se)
  -        {
  +      try
  +      {
  +        reader.setFeature("http://xml.org/sax/features/namespace-prefixes",
  +                          true);
  +        reader.setFeature(
  +                          "http://apache.org/xml/features/validation/dynamic", true);
  +      }
  +      catch (org.xml.sax.SAXException se)
  +      {
   
  -          // What can we do?
  -          // TODO: User diagnostics.
  -        }
  +        // What can we do?
  +        // TODO: User diagnostics.
  +      }
   
  -        // TODO: Handle Xerces DOM parser.
  -        // Get the input content handler, which will handle the 
  -        // parse events and create the source tree.
  -        ContentHandler inputHandler = getInputContentHandler();
  -        Class inputHandlerClass = ((Object) inputHandler).getClass();
  +      // TODO: Handle Xerces DOM parser.
  +      // Get the input content handler, which will handle the 
  +      // parse events and create the source tree.
  +      ContentHandler inputHandler = getInputContentHandler();
  +      Class inputHandlerClass = ((Object) inputHandler).getClass();
   
  -        inputHandler = (ContentHandler) inputHandlerClass.newInstance();
  +      inputHandler = (ContentHandler) inputHandlerClass.newInstance();
   
  -        reader.setContentHandler(inputHandler);
  +      reader.setContentHandler(inputHandler);
  +      try
  +      {
           reader.setProperty("http://xml.org/sax/properties/lexical-handler",
                              inputHandler);
  -        getXPathContext().setPrimaryReader(reader);
  +      }
  +      catch(SAXNotRecognizedException snre){}
  +      getXPathContext().setPrimaryReader(reader);
   
  -        // ...and of course I need a standard way to get a node...
  -        if (inputHandler instanceof org.apache.xalan.stree.SourceTreeHandler)
  -        {
  +      // ...and of course I need a standard way to get a node...
  +      if (inputHandler instanceof org.apache.xalan.stree.SourceTreeHandler)
  +      {
   
  -          // Kick off the parse.  When the ContentHandler gets 
  -          // the startDocument event, it will call transformNode( node ).
  -          reader.parse(xmlSource);
  +        // Kick off the parse.  When the ContentHandler gets 
  +        // the startDocument event, it will call transformNode( node ).
  +        reader.parse(xmlSource);
   
  -          doc =
  -               ((org.apache.xalan.stree.SourceTreeHandler) inputHandler).getRoot();
  -        }
  -      }
  -      catch (java.lang.IllegalAccessException iae)
  -      {
  -        throw new TransformerException(iae);
  -      }
  -      catch (InstantiationException ie)
  -      {
  -        throw new TransformerException(ie);
  -      }
  -      catch (SAXException se)
  -      {
  -        throw new TransformerException(se);
  +        doc =
  +             ((org.apache.xalan.stree.SourceTreeHandler) inputHandler).getRoot();
         }
  -      catch (IOException ioe)
  -      {
  -        throw new TransformerException(ioe);
  -      }
  +    }
  +    catch (java.lang.IllegalAccessException iae)
  +    {
  +      throw new TransformerException(iae);
  +    }
  +    catch (InstantiationException ie)
  +    {
  +      throw new TransformerException(ie);
  +    }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
  +    catch (IOException ioe)
  +    {
  +      throw new TransformerException(ioe);
  +    }
   
       return doc;
     }
  @@ -964,7 +969,7 @@
     {
       return createResultContentHandler(outputTarget, getOutputFormat());
     }
  -
  +    
     /**
      * Create a ContentHandler from a Result object and an OutputFormat.
      *
  @@ -980,10 +985,9 @@
      */
     public ContentHandler createResultContentHandler(
             Result outputTarget, OutputFormat format) throws TransformerException
  -  {
  -
  +  {    
       ContentHandler handler;
  -
  +    
       // If the Result object contains a Node, then create 
       // a ContentHandler that will add nodes to the input node.
       Node outputNode = null;
  @@ -991,24 +995,31 @@
       {
         outputNode = ((DOMResult)outputTarget).getNode();
   
  +      Document doc;
  +      short type;
         if (null != outputNode)
         {
  -        short type = outputNode.getNodeType();
  -        Document doc = (Node.DOCUMENT_NODE == type)
  +        type = outputNode.getNodeType();
  +        doc = (Node.DOCUMENT_NODE == type)
                          ? (Document) outputNode : outputNode.getOwnerDocument();
  -
  -        handler = (Node.DOCUMENT_FRAGMENT_NODE == type)
  -                  ? new DOMBuilder(doc, (DocumentFragment) outputNode)
  -                    : new DOMBuilder(doc, outputNode);
         }
         else
         {
  -        throw new TransformerException("DOMResult Result doesn't contain a Node!");
  +        doc = getXPathContext().getDOMHelper().createDocument();
  +        outputNode = doc;
  +        type = outputNode.getNodeType();
  +        ((DOMResult)outputTarget).setNode(outputNode);
         }
  +      
  +      handler = (Node.DOCUMENT_FRAGMENT_NODE == type)
  +                ? new DOMBuilder(doc, (DocumentFragment) outputNode)
  +                  : new DOMBuilder(doc, outputNode);
       }
       else if(outputTarget instanceof SAXResult)
       {
         handler = ((SAXResult)outputTarget).getHandler();
  +      if(null == handler)
  +        throw new IllegalArgumentException("handler can not be null for a SAXResult");
       }
       // Otherwise, create a ContentHandler that will serialize the 
       // result tree to either a stream or a writer.
  @@ -1216,7 +1227,7 @@
      * properties will override properties set in the templates
      * with xsl:output.
      *
  -   * @see org.xml.org.apache.serialize.OutputFormat
  +   * @see org.xml.org.apache.xalan.serialize.OutputFormat
      *
      * @param oformat A valid OutputFormat object (which will 
      * not be mutated), or null.
  @@ -1229,7 +1240,7 @@
     /**
      * Get the output properties used for the transformation.
      *
  -   * @see org.xml.org.apache.serialize.OutputFormat
  +   * @see org.xml.org.apache.xalan.serialize.OutputFormat
      *
      * @return the output format that was set by the user, 
      * otherwise the output format from the stylesheet.
  @@ -1291,6 +1302,8 @@
       varstack.pushVariable(qname, xobject);
     }
     
  +  Vector m_userParams;
  +  
     /**
      * Set a parameter for the transformation.
      *
  @@ -1310,10 +1323,21 @@
         // the local name, if the namespace is null.
         String s1 = tokenizer.nextToken();
         String s2 = tokenizer.hasMoreTokens() ? tokenizer.nextToken() : null;
  +      if(null == m_userParams)
  +        m_userParams = new Vector();
         if(null == s2)
  +      {
  +        m_userParams.addElement(new Arg(new QName(s1), 
  +                                        new XObject(value)));
           setParameter(s1, null, value);
  +      }
         else
  +      {
  +        m_userParams.addElement(new Arg(new QName(s1, s2), 
  +                                        new XObject(value)));
           setParameter(s2, s1, value);
  +      }
  +      
       }
       catch(java.util.NoSuchElementException  nsee)
       {
  @@ -1345,14 +1369,19 @@
           qname = new QName(null, s1);
         else
           qname = new QName(s1, s2);
  -      try
  -      {
  -        return varstack.getVariable(m_xcontext, qname);
  -      }
  -      catch(SAXException se)
  -      {
  +
  +      if(null == m_userParams)
           return null;
  +      int n = m_userParams.size();
  +      for(int i = 0; i < n; i++)
  +      {
  +        Arg arg = (Arg)m_userParams.elementAt(i);
  +        if(arg.getQName().equals(qname))
  +        {
  +          return arg.getVal().object();
  +        }
         }
  +      return null;
       }
       catch(java.util.NoSuchElementException  nsee)
       {
  @@ -1420,11 +1449,11 @@
      * @param sourceNode The Current source tree node.
      * @param mode The current xslt mode.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void pushParams(
             XPathContext xctxt, ElemCallTemplate xslCallTemplateElement, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       // The trick here is, variables need to be executed outside the context 
  @@ -1484,9 +1513,9 @@
      *
      * @param contextNode The root of the source tree, can't be null.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  protected void pushGlobalVars(Node contextNode) throws SAXException
  +  protected void pushGlobalVars(Node contextNode) throws TransformerException
     {
   
       // I'm a little unhappy with this, as it seems like 
  @@ -1602,11 +1631,11 @@
      * @param mode The mode under which the template is operating.
      * @return An object that represents the result tree fragment.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public DocumentFragment transformToRTF(
             ElemTemplateElement templateParent, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       // XPathContext xctxt = getXPathContext();
  @@ -1625,7 +1654,7 @@
         }
         catch (ParserConfigurationException pce)
         {
  -        throw new SAXException(pce);  //"createDocument() not supported in XPathContext!");
  +        throw new TransformerException(pce);  //"createDocument() not supported in XPathContext!");
   
           // return null;
         }
  @@ -1649,8 +1678,15 @@
       // Do the transformation of the child elements.
       executeChildTemplates(templateParent, sourceNode, mode);
   
  -    // Make sure everything is flushed!
  -    this.m_resultTreeHandler.flushPending();
  +    try
  +    {
  +      // Make sure everything is flushed!
  +      this.m_resultTreeHandler.flushPending();
  +    }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
   
       // Restore the previous result tree handler.
       this.m_resultTreeHandler = savedRTreeHandler;
  @@ -1684,11 +1720,11 @@
      * 
      * @return The stringized result of executing the elements children.
      * 
  -   * @exception SAXException
  +   * @exception TransformerException
      */
     public String transformToString(
             ElemTemplateElement elem, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       // Save the current result tree handler.
  @@ -1727,7 +1763,7 @@
       }
       catch (IOException ioe)
       {
  -      throw new SAXException(ioe);
  +      throw new TransformerException(ioe);
       }
   
       String result;
  @@ -1742,6 +1778,10 @@
   
         result = sw.toString();
       }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
       finally
       {
         sw.getBuffer().setLength(0);
  @@ -1774,13 +1814,13 @@
      * @param selectContext The selection context.
      * @param child The source context node.
      * @param mode The current mode, may be null.
  -   * @exception SAXException
  +   * @exception TransformerException
      * @return true if applied a template, false if not.
      */
     public boolean applyTemplateToNode(ElemTemplateElement xslInstruction,  // xsl:apply-templates or xsl:for-each
                                        ElemTemplateElement template,  // may be null
                                                Node child, QName mode)
  -                                                     throws SAXException
  +                                                     throws TransformerException
     {
   
       short nodeType = child.getNodeType();
  @@ -1910,6 +1950,10 @@
             executeChildTemplates(template, child, mode);
         }
       }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
       finally
       {
         popCurrentMatched();
  @@ -1929,11 +1973,11 @@
      * @param handler The ContentHandler to where the result events 
      * should be fed.
      * 
  -   * @exception SAXException
  +   * @exception TransformerException
      */
     public void executeChildTemplates(
             ElemTemplateElement elem, Node sourceNode, QName mode, ContentHandler handler)
  -            throws SAXException
  +            throws TransformerException
     {
   
       ContentHandler savedHandler = this.getContentHandler();
  @@ -1944,6 +1988,10 @@
         this.setContentHandler(handler);
         executeChildTemplates(elem, sourceNode, mode);
       }
  +    catch(org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
       finally
       {
         this.setContentHandler(savedHandler);
  @@ -1961,11 +2009,11 @@
      * @param sourceNode The current context node.
      * @param mode The current mode.
      * 
  -   * @exception SAXException
  +   * @exception TransformerException
      */
     public void executeChildTemplates(
             ElemTemplateElement elem, Node sourceNode, QName mode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       // Does this element have any children?
  @@ -2029,11 +2077,11 @@
      *
      * @return A Vector of NodeSortKeys, or null.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public Vector processSortKeys(
                                   ElemForEach foreach, Node sourceNodeContext)
  -    throws SAXException
  +    throws TransformerException
     {
   
       Vector keys = null;
  @@ -2531,33 +2579,26 @@
     }
     
     /**
  -   * Set the error event handler.
  +   * Set the error event listener.
      *
  -   * @param handle The new error handler.
  -   * @exception java.lang.NullPointerException If the handler
  -   *            is null.
  -   * @see org.xml.sax.XMLReader#setErrorHandler
  +   * @param listener The new error listener.
  +   * @throws IllegalArgumentException if 
      */
  -  public void setErrorHandler (ErrorHandler handler)
  +  public void setErrorListener (ErrorListener listener)
  +    throws IllegalArgumentException
     {
  -    if (handler == null) 
  -    {
  -      throw new NullPointerException("Null error handler");
  -    } 
  -    else 
  -    {
  -      m_errorHandler = handler;
  -    }
  +    if (listener == null) 
  +      throw new IllegalArgumentException("Null error handler");
  +    m_errorHandler = listener;
     }
   
   
     /**
      * Get the current error event handler.
      *
  -   * @return The current error handler, or null if none was set.
  -   * @see org.xml.sax.XMLReader#getErrorHandler
  +   * @return The current error handler, which should never be null.
      */
  -  public ErrorHandler getErrorHandler ()
  +  public ErrorListener getErrorListener ()
     {
       return m_errorHandler;
     }
  
  
  
  1.5       +70 -63    xml-xalan/java/src/org/apache/xalan/transformer/TreeWalker2Result.java
  
  Index: TreeWalker2Result.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TreeWalker2Result.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TreeWalker2Result.java	2000/10/30 18:57:03	1.4
  +++ TreeWalker2Result.java	2000/11/13 16:27:19	1.5
  @@ -103,9 +103,9 @@
      *
      * NEEDSDOC @param pos
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void traverse(Node pos) throws SAXException
  +  public void traverse(Node pos) throws org.xml.sax.SAXException
     {
   
       m_startNode = pos;
  @@ -119,99 +119,106 @@
      *
      * NEEDSDOC @param node
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  protected void startNode(Node node) throws SAXException
  +  protected void startNode(Node node) throws org.xml.sax.SAXException
     {
   
  -    if ((Node.ELEMENT_NODE == node.getNodeType()) && (m_startNode == node))
  +    try
       {
  -      DOMHelper dhelper = m_transformer.getXPathContext().getDOMHelper();
  -      String elemName = node.getNodeName();
  -      String localName = dhelper.getLocalNameOfNode(node);
  -      String namespace = dhelper.getNamespaceOfNode(node);
  -
  -      m_handler.startElement(namespace, localName, elemName);
  -
  -      for (Node parent = node; parent != null;
  -              parent = parent.getParentNode())
  +      if ((Node.ELEMENT_NODE == node.getNodeType()) && (m_startNode == node))
         {
  -        if (Node.ELEMENT_NODE != parent.getNodeType())
  -          continue;
  +        DOMHelper dhelper = m_transformer.getXPathContext().getDOMHelper();
  +        String elemName = node.getNodeName();
  +        String localName = dhelper.getLocalNameOfNode(node);
  +        String namespace = dhelper.getNamespaceOfNode(node);
   
  -        NamedNodeMap atts = ((Element) parent).getAttributes();
  -        int n = atts.getLength();
  +        m_handler.startElement(namespace, localName, elemName);
   
  -        for (int i = 0; i < n; i++)
  +        for (Node parent = node; parent != null;
  +             parent = parent.getParentNode())
           {
  -          String nsDeclPrefix = null;
  -          Attr attr = (Attr) atts.item(i);
  -          String name = attr.getName();
  -          String value = attr.getValue();
  +          if (Node.ELEMENT_NODE != parent.getNodeType())
  +            continue;
   
  -          if (name.startsWith("xmlns:"))
  -          {
  +          NamedNodeMap atts = ((Element) parent).getAttributes();
  +          int n = atts.getLength();
   
  -            // get the namespace prefix 
  -            nsDeclPrefix = name.substring(name.indexOf(":") + 1);
  -          }
  -          else if (name.equals("xmlns"))
  +          for (int i = 0; i < n; i++)
             {
  -            nsDeclPrefix = "";
  -          }
  +            String nsDeclPrefix = null;
  +            Attr attr = (Attr) atts.item(i);
  +            String name = attr.getName();
  +            String value = attr.getValue();
   
  -          if ((nsDeclPrefix == null) && (node != parent))
  -            continue;
  +            if (name.startsWith("xmlns:"))
  +            {
   
  -          /*
  -          else if(nsDeclPrefix != null)
  -          {
  +              // get the namespace prefix 
  +              nsDeclPrefix = name.substring(name.indexOf(":") + 1);
  +            }
  +            else if (name.equals("xmlns"))
  +            {
  +              nsDeclPrefix = "";
  +            }
  +
  +            if ((nsDeclPrefix == null) && (node != parent))
  +              continue;
  +
  +            /*
  +            else if(nsDeclPrefix != null)
  +            {
               String desturi = m_processor.getURI(nsDeclPrefix);
               // Look for an alias for this URI. If one is found, use it as the result URI
               String aliasURI = m_elem.m_stylesheet.lookForAlias(value);
               if(aliasURI.equals(desturi)) // TODO: Check for extension namespaces
               {
  -              continue;
  +            continue;
               }
  -          }
  -          */
  -          m_handler.addAttribute(dhelper.getNamespaceOfNode(attr),
  -                                 dhelper.getLocalNameOfNode(attr), name,
  -                                 "CDATA", value);
  +            }
  +            */
  +            m_handler.addAttribute(dhelper.getNamespaceOfNode(attr),
  +                                   dhelper.getLocalNameOfNode(attr), name,
  +                                   "CDATA", value);
   
  -          // Make sure namespace is not in the excluded list then
  -          // add to result tree
  +            // Make sure namespace is not in the excluded list then
  +            // add to result tree
   
  -          /*
  -          if(!m_handler.getPendingAttributes().contains(name))
  -          {
  +            /*
  +            if(!m_handler.getPendingAttributes().contains(name))
  +            {
               if(nsDeclPrefix == null)
               {
  -              m_handler.addAttribute(name, "CDATA", value);
  +            m_handler.addAttribute(name, "CDATA", value);
               }
               else
               {
  -              String desturi
  -                = m_handler.getURI(nsDeclPrefix);
  -              if(null == desturi)
  -              {
  -                m_handler.addAttribute(name, "CDATA", value);
  -              }
  -              else if(!desturi.equals(value))
  -              {
  -                m_handler.addAttribute(name, "CDATA", value);
  -              }
  +            String desturi
  +            = m_handler.getURI(nsDeclPrefix);
  +            if(null == desturi)
  +            {
  +            m_handler.addAttribute(name, "CDATA", value);
               }
  +            else if(!desturi.equals(value))
  +            {
  +            m_handler.addAttribute(name, "CDATA", value);
  +            }
  +            }
  +            }
  +            */
             }
  -          */
           }
  -      }
   
  -      // m_handler.processResultNS(m_elem);           
  +        // m_handler.processResultNS(m_elem);           
  +      }
  +      else
  +      {
  +        super.startNode(node);
  +      }
       }
  -    else
  +    catch(javax.xml.transform.TransformerException te)
       {
  -      super.startNode(node);
  +      throw new org.xml.sax.SAXException(te);
       }
     }
   }
  
  
  
  1.11      +24 -136   xml-xalan/java/src/org/apache/xalan/utils/DOMBuilder.java
  
  Index: DOMBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/utils/DOMBuilder.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DOMBuilder.java	2000/11/09 00:00:41	1.10
  +++ DOMBuilder.java	2000/11/13 16:27:24	1.11
  @@ -62,12 +62,9 @@
   
   import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.ContentHandler;
  -import org.xml.sax.SAXException;
   import org.xml.sax.Locator;
   import org.xml.sax.Attributes;
   
  -import org.apache.serialize.SerializerHandler;
  -
   import org.w3c.dom.*;  // we pretty much use everything in the DOM here.
   
   /**
  @@ -77,7 +74,7 @@
    * or document fragment.
    */
   public class DOMBuilder
  -        implements ContentHandler, LexicalHandler, SerializerHandler
  +        implements ContentHandler, LexicalHandler
   {
   
     /** NEEDSDOC Field m_doc          */
  @@ -164,10 +161,8 @@
      * Append a node to the current container.
      *
      * NEEDSDOC @param newNode
  -   *
  -   * @throws SAXException
      */
  -  protected void append(Node newNode) throws SAXException
  +  protected void append(Node newNode) throws org.xml.sax.SAXException
     {
   
       Node currentNode = m_currentNode;
  @@ -193,7 +188,7 @@
   
           if ((null != data) && (data.trim().length() > 0))
           {
  -          throw new SAXException(
  +          throw new org.xml.sax.SAXException(
               XSLMessages.createXPATHMessage(
                 XPATHErrorResources.ER_CANT_OUTPUT_TEXT_BEFORE_DOC, null));  //"Warning: can't output text before document element!  Ignoring...");
           }
  @@ -204,7 +199,7 @@
         {
           if (m_doc.getDocumentElement() != null)
           {
  -          throw new SAXException(
  +          throw new org.xml.sax.SAXException(
               XSLMessages.createXPATHMessage(
                 XPATHErrorResources.ER_CANT_HAVE_MORE_THAN_ONE_ROOT, null));  //"Can't have more than one root on a DOM!");
           }
  @@ -252,13 +247,8 @@
      * <p>The SAX parser will invoke this method only once, before any
      * other methods in this interface or in DTDHandler (except for
      * setDocumentLocator).</p>
  -   *
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   *
  -   * @throws SAXException
      */
  -  public void startDocument() throws SAXException
  +  public void startDocument() throws org.xml.sax.SAXException
     {
   
       // No action for the moment.
  @@ -272,13 +262,8 @@
      * not invoke this method until it has either abandoned parsing
      * (because of an unrecoverable error) or reached the end of
      * input.</p>
  -   *
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   *
  -   * @throws SAXException
      */
  -  public void endDocument() throws SAXException
  +  public void endDocument() throws org.xml.sax.SAXException
     {
   
       // No action for the moment.
  @@ -304,16 +289,12 @@
      * NEEDSDOC @param localName
      * @param name The element type name.
      * @param atts The attributes attached to the element, if any.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
      * @see #endElement
      * @see org.xml.sax.Attributes
  -   *
  -   * @throws SAXException
      */
     public void startElement(
             String ns, String localName, String name, Attributes atts)
  -            throws SAXException
  +            throws org.xml.sax.SAXException
     {
   
       Element elem;
  @@ -374,13 +355,9 @@
      * NEEDSDOC @param ns
      * NEEDSDOC @param localName
      * @param name The element type name
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   *
  -   * @throws SAXException
      */
     public void endElement(String ns, String localName, String name)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
       m_currentNode = m_elemStack.popAndTop();
     }
  @@ -398,55 +375,6 @@
     }
   
     /**
  -   * Starts an un-escaping section. All characters printed within an
  -   * un-escaping section are printed as is, without escaping special
  -   * characters into entity references. Only XML and HTML serializers
  -   * need to support this method.
  -   * <p>
  -   * The contents of the un-escaping section will be delivered through
  -   * the regular <tt>characters</tt> event.
  -   *
  -   * @throws SAXException
  -   */
  -  public void startNonEscaping() throws SAXException
  -  {
  -    append(m_doc.createProcessingInstruction("xslt-next-is-raw",
  -                                             "formatter-to-dom"));
  -  }
  -
  -  /**
  -   * Ends an un-escaping section.
  -   *
  -   * @see #startNonEscaping
  -   *
  -   * @throws SAXException
  -   */
  -  public void endNonEscaping() throws SAXException{}
  -
  -  /**
  -   * Starts a whitespace preserving section. All characters printed
  -   * within a preserving section are printed without indentation and
  -   * without consolidating multiple spaces. This is equivalent to
  -   * the <tt>xml:space=&quot;preserve&quot;</tt> attribute. Only XML
  -   * and HTML serializers need to support this method.
  -   * <p>
  -   * The contents of the whitespace preserving section will be delivered
  -   * through the regular <tt>characters</tt> event.
  -   *
  -   * @throws SAXException
  -   */
  -  public void startPreserving() throws SAXException{}
  -
  -  /**
  -   * Ends a whitespace preserving section.
  -   *
  -   * @see #startPreserving
  -   *
  -   * @throws SAXException
  -   */
  -  public void endPreserving() throws SAXException{}
  -
  -  /**
      * Receive notification of character data.
      *
      * <p>The Parser will call this method to report each chunk of
  @@ -466,14 +394,10 @@
      * @param ch The characters from the XML document.
      * @param start The start position in the array.
      * @param length The number of characters to read from the array.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
      * @see #ignorableWhitespace
      * @see org.xml.sax.Locator
  -   *
  -   * @throws SAXException
      */
  -  public void characters(char ch[], int start, int length) throws SAXException
  +  public void characters(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       if (m_inCData)
  @@ -498,11 +422,9 @@
      * NEEDSDOC @param ch
      * NEEDSDOC @param start
      * NEEDSDOC @param length
  -   *
  -   * @throws SAXException
      */
     public void charactersRaw(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       String s = new String(ch, start, length);
  @@ -522,12 +444,11 @@
      *
      * @param name The name of the entity.  If it is a parameter
      *        entity, the name will begin with '%'.
  -   * @exception SAXException The application may raise an exception.
      * @see #endEntity
      * @see org.xml.sax.misc.DeclHandler#internalEntityDecl
      * @see org.xml.sax.misc.DeclHandler#externalEntityDecl
      */
  -  public void startEntity(String name) throws SAXException
  +  public void startEntity(String name) throws org.xml.sax.SAXException
     {
   
       // Almost certainly the wrong behavior...
  @@ -538,19 +459,16 @@
      * Report the end of an entity.
      *
      * @param name The name of the entity that is ending.
  -   * @exception SAXException The application may raise an exception.
      * @see #startEntity
      */
  -  public void endEntity(String name) throws SAXException{}
  +  public void endEntity(String name) throws org.xml.sax.SAXException{}
   
     /**
      * Receive notivication of a entityReference.
      *
      * NEEDSDOC @param name
  -   *
  -   * @throws SAXException
      */
  -  public void entityReference(String name) throws SAXException
  +  public void entityReference(String name) throws org.xml.sax.SAXException
     {
       append(m_doc.createEntityReference(name));
     }
  @@ -575,14 +493,10 @@
      * @param ch The characters from the XML document.
      * @param start The start position in the array.
      * @param length The number of characters to read from the array.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
      * @see #characters
  -   *
  -   * @throws SAXException
      */
     public void ignorableWhitespace(char ch[], int start, int length)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       String s = new String(ch, start, length);
  @@ -604,13 +518,9 @@
      * @param target The processing instruction target.
      * @param data The processing instruction data, or null if
      *        none was supplied.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   *
  -   * @throws SAXException
      */
     public void processingInstruction(String target, String data)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
       append(m_doc.createProcessingInstruction(target, data));
     }
  @@ -625,9 +535,8 @@
      * @param ch An array holding the characters in the comment.
      * @param start The starting position in the array.
      * @param length The number of characters to use from the array.
  -   * @exception SAXException The application may raise an exception.
      */
  -  public void comment(char ch[], int start, int length) throws SAXException
  +  public void comment(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
       append(m_doc.createComment(new String(ch, start, length)));
     }
  @@ -638,10 +547,9 @@
     /**
      * Report the start of a CDATA section.
      *
  -   * @exception SAXException The application may raise an exception.
      * @see #endCDATA
      */
  -  public void startCDATA() throws SAXException
  +  public void startCDATA() throws org.xml.sax.SAXException
     {
       m_inCData = true;
     }
  @@ -649,10 +557,9 @@
     /**
      * Report the end of a CDATA section.
      *
  -   * @exception SAXException The application may raise an exception.
      * @see #startCDATA
      */
  -  public void endCDATA() throws SAXException
  +  public void endCDATA() throws org.xml.sax.SAXException
     {
       m_inCData = false;
     }
  @@ -677,14 +584,10 @@
      * @param ch The characters from the XML document.
      * @param start The start position in the array.
      * @param length The number of characters to read from the array.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
      * @see #ignorableWhitespace
      * @see org.xml.sax.Locator
  -   *
  -   * @throws SAXException
      */
  -  public void cdata(char ch[], int start, int length) throws SAXException
  +  public void cdata(char ch[], int start, int length) throws org.xml.sax.SAXException
     {
   
       String s = new String(ch, start, length);
  @@ -703,13 +606,11 @@
      *        external DTD subset, or null if none was declared.
      * @param systemId The declared system identifier for the
      *        external DTD subset, or null if none was declared.
  -   * @exception SAXException The application may raise an
  -   *            exception.
      * @see #endDTD
      * @see #startEntity
      */
     public void startDTD(String name, String publicId, String systemId)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       // Do nothing for now.
  @@ -718,10 +619,9 @@
     /**
      * Report the end of DTD declarations.
      *
  -   * @exception SAXException The application may raise an exception.
      * @see #startDTD
      */
  -  public void endDTD() throws SAXException
  +  public void endDTD() throws org.xml.sax.SAXException
     {
   
       // Do nothing for now.
  @@ -752,15 +652,11 @@
      *
      * @param prefix The Namespace prefix being declared.
      * @param uri The Namespace URI the prefix is mapped to.
  -   * @exception org.xml.sax.SAXException The client may throw
  -   *            an exception during processing.
      * @see #endPrefixMapping
      * @see #startElement
  -   *
  -   * @throws SAXException
      */
     public void startPrefixMapping(String prefix, String uri)
  -          throws SAXException
  +          throws org.xml.sax.SAXException
     {
   
       /*
  @@ -796,14 +692,10 @@
      * guaranteed.</p>
      *
      * @param prefix The prefix that was being mapping.
  -   * @exception org.xml.sax.SAXException The client may throw
  -   *            an exception during processing.
      * @see #startPrefixMapping
      * @see #endElement
  -   *
  -   * @throws SAXException
      */
  -  public void endPrefixMapping(String prefix) throws SAXException{}
  +  public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException{}
   
     /**
      * Receive notification of a skipped entity.
  @@ -819,10 +711,6 @@
      *
      * @param name The name of the skipped entity.  If it is a
      *        parameter entity, the name will begin with '%'.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  -   *            wrapping another exception.
  -   *
  -   * @throws SAXException
      */
  -  public void skippedEntity(String name) throws SAXException{}
  +  public void skippedEntity(String name) throws org.xml.sax.SAXException{}
   }
  
  
  
  1.3       +127 -20   xml-xalan/java/src/org/apache/xalan/utils/DefaultErrorHandler.java
  
  Index: DefaultErrorHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/utils/DefaultErrorHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultErrorHandler.java	2000/10/30 18:57:15	1.2
  +++ DefaultErrorHandler.java	2000/11/13 16:27:24	1.3
  @@ -57,26 +57,25 @@
   package org.apache.xalan.utils;
   
   import org.xml.sax.*;
  +import javax.xml.transform.ErrorListener;
  +import javax.xml.transform.TransformerException;
  +import javax.xml.transform.SourceLocator;
   
   /**
    * <meta name="usage" content="general"/>
    * Implement SAX error handler for default reporting.
    */
  -public class DefaultErrorHandler implements ErrorHandler
  +public class DefaultErrorHandler implements ErrorHandler, ErrorListener
   {
   
  -  /** NEEDSDOC Field m_xmlID          */
  -  String m_xmlID = null;
  -
     /**
      * Constructor DefaultErrorHandler
      *
      *
      * NEEDSDOC @param identifier
      */
  -  public DefaultErrorHandler(String identifier)
  +  public DefaultErrorHandler()
     {
  -    m_xmlID = identifier;
     }
   
     /**
  @@ -92,14 +91,15 @@
      *
      * @param exception The warning information encapsulated in a
      *                  SAX parse exception.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
  -   * @see org.xml.sax.SAXParseException
  +   * @see javax.xml.transform.TransformerException
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void warning(SAXParseException exception) throws SAXException
     {
  +    printLocation(exception);
       System.out.println("Parser warning: " + exception.getMessage());
     }
   
  @@ -121,14 +121,15 @@
      *
      * @param exception The error information encapsulated in a
      *                  SAX parse exception.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
  -   * @see org.xml.sax.SAXParseException
  +   * @see javax.xml.transform.TransformerException
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void error(SAXParseException exception) throws SAXException
     {
  +    printLocation(exception);
       System.out.println("Parser error: " + exception.getMessage());
     }
   
  @@ -148,24 +149,130 @@
      *
      * @param exception The error information encapsulated in a
      *                  SAX parse exception.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
  -   * @see org.xml.sax.SAXParseException
  +   * @see javax.xml.transform.TransformerException
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public void fatalError(SAXParseException exception) throws SAXException
     {
  +    printLocation(exception);
   
  +    throw exception;
  +  }
  +  
  +  /**
  +   * Receive notification of a warning.
  +   *
  +   * <p>SAX parsers will use this method to report conditions that
  +   * are not errors or fatal errors as defined by the XML 1.0
  +   * recommendation.  The default behaviour is to take no action.</p>
  +   *
  +   * <p>The SAX parser must continue to provide normal parsing events
  +   * after invoking this method: it should still be possible for the
  +   * application to process the document through to the end.</p>
  +   *
  +   * @param exception The warning information encapsulated in a
  +   *                  SAX parse exception.
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
  +   *            wrapping another exception.
  +   * @see javax.xml.transform.TransformerException
  +   *
  +   * @throws TransformerException
  +   */
  +  public void warning(TransformerException exception) throws TransformerException
  +  {
  +    printLocation(exception);
  +
  +    System.out.println("Parser warning: " + exception.getMessage());
  +  }
  +
  +  /**
  +   * Receive notification of a recoverable error.
  +   *
  +   * <p>This corresponds to the definition of "error" in section 1.2
  +   * of the W3C XML 1.0 Recommendation.  For example, a validating
  +   * parser would use this callback to report the violation of a
  +   * validity constraint.  The default behaviour is to take no
  +   * action.</p>
  +   *
  +   * <p>The SAX parser must continue to provide normal parsing events
  +   * after invoking this method: it should still be possible for the
  +   * application to process the document through to the end.  If the
  +   * application cannot do so, then the parser should report a fatal
  +   * error even if the XML 1.0 recommendation does not require it to
  +   * do so.</p>
  +   *
  +   * @param exception The error information encapsulated in a
  +   *                  SAX parse exception.
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
  +   *            wrapping another exception.
  +   * @see javax.xml.transform.TransformerException
  +   *
  +   * @throws TransformerException
  +   */
  +  public void error(TransformerException exception) throws TransformerException
  +  {
  +    printLocation(exception);
  +
  +    System.out.println("Parser error: " + exception.getMessage());
  +  }
  +
  +  /**
  +   * Receive notification of a non-recoverable error.
  +   *
  +   * <p>This corresponds to the definition of "fatal error" in
  +   * section 1.2 of the W3C XML 1.0 Recommendation.  For example, a
  +   * parser would use this callback to report the violation of a
  +   * well-formedness constraint.</p>
  +   *
  +   * <p>The application must assume that the document is unusable
  +   * after the parser has invoked this method, and should continue
  +   * (if at all) only for the sake of collecting addition error
  +   * messages: in fact, SAX parsers are free to stop reporting any
  +   * other events once this method has been invoked.</p>
  +   *
  +   * @param exception The error information encapsulated in a
  +   *                  SAX parse exception.
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
  +   *            wrapping another exception.
  +   * @see javax.xml.transform.TransformerException
  +   *
  +   * @throws TransformerException
  +   */
  +  public void fatalError(TransformerException exception) throws TransformerException
  +  {
  +    printLocation(exception);
  +
  +    throw exception;
  +  }
  +  
  +  private void printLocation(org.xml.sax.SAXParseException exception)
  +  {
       // System.out.println("Parser fatal error: "+exception.getMessage());
  -    String id = (exception.getPublicId() != exception.getPublicId())
  -                ? exception.getPublicId()
  -                : (null != exception.getSystemId())
  -                  ? exception.getSystemId() : m_xmlID;
  +    String id = (null != exception.getSystemId())
  +                ? exception.getSystemId() : "SystemId Unknown";
   
       System.out.println(id + "; Line " + exception.getLineNumber()
                          + "; Column " + exception.getColumnNumber());
  +  }
   
  -    throw exception;
  +  
  +  private void printLocation(TransformerException exception)
  +  {
  +    SourceLocator locator = exception.getLocator();
  +    
  +    if(null != locator)
  +    {
  +      // System.out.println("Parser fatal error: "+exception.getMessage());
  +      String id = (locator.getPublicId() != locator.getPublicId())
  +                  ? locator.getPublicId()
  +                    : (null != locator.getSystemId())
  +                      ? locator.getSystemId() : "SystemId Unknown";
  +
  +      System.out.println(id + "; Line " + locator.getLineNumber()
  +                         + "; Column " + locator.getColumnNumber());
  +    }
     }
   }
  
  
  
  1.8       +1 -1      xml-xalan/java/src/org/apache/xalan/utils/QName.java
  
  Index: QName.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/utils/QName.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- QName.java	2000/10/30 18:57:21	1.7
  +++ QName.java	2000/11/13 16:27:24	1.8
  @@ -76,7 +76,7 @@
    * is used as the name of the object. The default namespace is not used for
    * unprefixed names."
    */
  -public class QName extends org.apache.serialize.QName
  +public class QName extends org.apache.xalan.serialize.QName
           implements java.io.Serializable
   {
   
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xalan/utils/RawCharacterHandler.java
  
  Index: RawCharacterHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/utils/RawCharacterHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RawCharacterHandler.java	2000/10/30 18:57:21	1.2
  +++ RawCharacterHandler.java	2000/11/13 16:27:24	1.3
  @@ -71,8 +71,8 @@
      * NEEDSDOC @param start
      * NEEDSDOC @param length
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void charactersRaw(char ch[], int start, int length)
  -    throws org.xml.sax.SAXException;
  +    throws javax.xml.transform.TransformerException;
   }
  
  
  
  1.10      +4 -4      xml-xalan/java/src/org/apache/xalan/utils/SystemIDResolver.java
  
  Index: SystemIDResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/utils/SystemIDResolver.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SystemIDResolver.java	2000/10/30 18:57:24	1.9
  +++ SystemIDResolver.java	2000/11/13 16:27:24	1.10
  @@ -56,7 +56,7 @@
    */
   package org.apache.xalan.utils;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.utils.URI;
   import org.apache.xalan.utils.URI.MalformedURIException;
  @@ -103,10 +103,10 @@
      * NEEDSDOC @param base
      *
      * NEEDSDOC ($objectName$) @return
  -   * @exception SAXException thrown if the string can't be turned into a URL.
  +   * @exception TransformerException thrown if the string can't be turned into a URL.
      */
     public static String getAbsoluteURI(String urlString, String base)
  -          throws SAXException
  +          throws TransformerException
     {
   
       if ((urlString.indexOf(':') < 0) && (null != base)
  @@ -146,7 +146,7 @@
       }
       catch (MalformedURIException mue)
       {
  -      throw new SAXException(mue);
  +      throw new TransformerException(mue);
       }
   
       String uriStr = uri.toString();
  
  
  
  1.11      +12 -27    xml-xalan/java/src/org/apache/xalan/utils/TreeWalker.java
  
  Index: TreeWalker.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/utils/TreeWalker.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TreeWalker.java	2000/11/03 23:28:13	1.10
  +++ TreeWalker.java	2000/11/13 16:27:24	1.11
  @@ -64,7 +64,6 @@
   import org.apache.xpath.DOM2Helper;
   import org.apache.xpath.DOMHelper;
   import org.apache.xalan.utils.NodeConsumer;
  -import org.apache.serialize.SerializerHandler;
   
   /**
    * <meta name="usage" content="advanced"/>
  @@ -108,9 +107,9 @@
      *
      * NEEDSDOC @param pos
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void traverse(Node pos) throws SAXException
  +  public void traverse(Node pos) throws org.xml.sax.SAXException
     {
   
       Node top = pos;
  @@ -156,9 +155,9 @@
      * NEEDSDOC @param pos
      * NEEDSDOC @param top
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void traverse(Node pos, Node top) throws SAXException
  +  public void traverse(Node pos, Node top) throws org.xml.sax.SAXException
     {
   
       while (null != pos)
  @@ -194,7 +193,7 @@
     }
   
     /*
  -  public void traverse(Node pos) throws SAXException
  +  public void traverse(Node pos) throws TransformerException
     {
       startNode(pos);
       NodeList children = pos.getChildNodes();
  @@ -219,9 +218,9 @@
      *
      * NEEDSDOC @param node
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  protected void startNode(Node node) throws SAXException
  +  protected void startNode(Node node) throws org.xml.sax.SAXException
     {
   
       if (m_contentHandler instanceof NodeConsumer)
  @@ -324,24 +323,10 @@
         {
           nextIsRaw = false;
   
  -        boolean isSerH = (m_contentHandler instanceof SerializerHandler);
  -        SerializerHandler serH =
  -          isSerH ? ((SerializerHandler) this.m_contentHandler) : null;
  -
  -        if (isSerH)
  -        {
  -          serH.startNonEscaping();
  -        }
  -
  -        this.m_contentHandler.characters(data.toCharArray(), 0,
  +        m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING, "");
  +        m_contentHandler.characters(data.toCharArray(), 0,
                                            data.length());
  -
  -        {
  -          if (isSerH)
  -          {
  -            serH.endNonEscaping();
  -          }
  -        }
  +        m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING, "");
         }
         else
         {
  @@ -376,9 +361,9 @@
      *
      * NEEDSDOC @param node
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  protected void endNode(Node node) throws SAXException
  +  protected void endNode(Node node) throws org.xml.sax.SAXException
     {
   
       switch (node.getNodeType())
  
  
  
  1.15      +7 -8      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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Process.java	2000/11/03 23:28:14	1.14
  +++ Process.java	2000/11/13 16:27:26	1.15
  @@ -101,12 +101,11 @@
   import javax.xml.transform.stream.StreamResult;
   import javax.xml.transform.stream.StreamSource;
   import javax.xml.transform.sax.SAXTransformerFactory;
  -import javax.xml.transform.stream.OutputKeys;
  +import javax.xml.transform.OutputKeys;
  +import javax.xml.transform.TransformerException;
   
   // Needed SAX classes
   import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
   import org.xml.sax.XMLReader;
   import org.xml.sax.helpers.ParserAdapter;
   import org.xml.sax.helpers.XMLReaderFactory;
  @@ -117,9 +116,9 @@
   import org.w3c.dom.Document;
   
   // Needed Serializer classes
  -import org.apache.serialize.OutputFormat;
  -import org.apache.serialize.Serializer;
  -import org.apache.serialize.SerializerFactory;
  +import org.apache.xalan.serialize.OutputFormat;
  +import org.apache.xalan.serialize.Serializer;
  +import org.apache.xalan.serialize.SerializerFactory;
   
   /**
    * <meta name="usage" content="general"/>
  @@ -457,10 +456,10 @@
             else
             {
               if (null != media)
  -              throw new SAXException("No stylesheet found in: " + inFileName
  +              throw new TransformerException("No stylesheet found in: " + inFileName
                                        + ", media=" + media);
               else
  -              throw new SAXException("No xml-stylesheet PI found in: "
  +              throw new TransformerException("No xml-stylesheet PI found in: "
                                        + inFileName);
             }
           }
  
  
  
  1.9       +15 -13    xml-xalan/java/src/org/apache/xpath/DOM2Helper.java
  
  Index: DOM2Helper.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/DOM2Helper.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DOM2Helper.java	2000/10/30 18:58:20	1.8
  +++ DOM2Helper.java	2000/11/13 16:27:26	1.9
  @@ -69,13 +69,13 @@
   import org.w3c.dom.Element;
   import org.w3c.dom.Text;
   import org.w3c.dom.Attr;
  -
  -import org.xml.sax.SAXException;
   import org.xml.sax.InputSource;
   import org.xml.sax.Parser;
   
   import javax.xml.parsers.*;
   
  +import javax.xml.transform.TransformerException;
  +
   /**
    * <meta name="usage" content="general"/>
    * Provides XSLTProcessor an interface to the Xerces XML parser.  This
  @@ -98,13 +98,13 @@
      *
      * NEEDSDOC @param node
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void checkNode(Node node) throws SAXException
  +  public void checkNode(Node node) throws TransformerException
     {
   
       // if(!(node instanceof org.apache.xerces.dom.NodeImpl))
  -    //  throw new SAXException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_XERCES_CANNOT_HANDLE_NODES, new Object[]{((Object)node).getClass()})); //"DOM2Helper can not handle nodes of type"
  +    //  throw new TransformerException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_XERCES_CANNOT_HANDLE_NODES, new Object[]{((Object)node).getClass()})); //"DOM2Helper can not handle nodes of type"
       //+((Object)node).getClass());
     }
   
  @@ -163,7 +163,7 @@
      *
      * @param source The input source for the top-level of the
      *        XML document.
  -   * @exception org.xml.sax.SAXException Any SAX exception, possibly
  +   * @exception javax.xml.transform.TransformerException Any SAX exception, possibly
      *            wrapping another exception.
      * @exception java.io.IOException An IO exception from the parser,
      *            possibly from a byte stream or character stream
  @@ -175,9 +175,9 @@
      * @see #setContentHandler
      * @see #setErrorHandler
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void parse(InputSource source) throws SAXException
  +  public void parse(InputSource source) throws TransformerException
     {
   
       try
  @@ -208,11 +208,9 @@
   
         parser.setFeature("http://apache.org/xml/features/allow-java-encodings", true);
         */
  -      String ident = (null == source.getSystemId())
  -                     ? "Input XSL" : source.getSystemId();
   
         parser.setErrorHandler(
  -        new org.apache.xalan.utils.DefaultErrorHandler(ident));
  +        new org.apache.xalan.utils.DefaultErrorHandler());
   
         // if(null != m_entityResolver)
         // {
  @@ -221,13 +219,17 @@
         // }
         setDocument(parser.parse(source));
       }
  +    catch (org.xml.sax.SAXException se)
  +    {
  +      throw new TransformerException(se);
  +    }
       catch (ParserConfigurationException pce)
       {
  -      throw new SAXException(pce);
  +      throw new TransformerException(pce);
       }
       catch (IOException ioe)
       {
  -      throw new SAXException(ioe);
  +      throw new TransformerException(ioe);
       }
   
       // setDocument(((org.apache.xerces.parsers.DOMParser)parser).getDocument());
  
  
  
  1.10      +3 -3      xml-xalan/java/src/org/apache/xpath/DOMHelper.java
  
  Index: DOMHelper.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/DOMHelper.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DOMHelper.java	2000/10/31 17:06:37	1.9
  +++ DOMHelper.java	2000/11/13 16:27:26	1.10
  @@ -61,7 +61,7 @@
   
   import org.w3c.dom.*;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xalan.utils.NSInfo;
   import org.apache.xalan.utils.QName;
  @@ -126,10 +126,10 @@
      * @param textNode A text node from the source tree.
      * @return true if the text node should be stripped of extra whitespace.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public boolean shouldStripSourceNode(Node textNode)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       // return (null == m_envSupport) ? false : m_envSupport.shouldStripSourceNode(textNode);
  
  
  
  1.9       +16 -49    xml-xalan/java/src/org/apache/xpath/Expression.java
  
  Index: Expression.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/Expression.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Expression.java	2000/11/08 17:14:48	1.8
  +++ Expression.java	2000/11/13 16:27:26	1.9
  @@ -62,13 +62,13 @@
   import org.apache.xpath.res.XPATHErrorResources;
   import org.apache.xalan.res.XSLMessages;
   
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXParseException;
   import org.xml.sax.XMLReader;
   
   import javax.xml.transform.TransformerConfigurationException;
  +import javax.xml.transform.TransformerException;
   import org.apache.xalan.utils.SAXSourceLocator;
   import javax.xml.transform.SourceLocator;
  +import javax.xml.transform.ErrorListener;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -94,10 +94,10 @@
      *
      * NEEDSDOC (execute) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public abstract XObject execute(XPathContext xctxt)
  -    throws org.xml.sax.SAXException;
  +    throws javax.xml.transform.TransformerException;
   
     /**
      * Warn the user of an problem.
  @@ -106,37 +106,20 @@
      * NEEDSDOC @param msg
      * NEEDSDOC @param args
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void warn(XPathContext xctxt, int msg, Object[] args)
  -          throws org.xml.sax.SAXException
  +    throws javax.xml.transform.TransformerException
     {
   
       java.lang.String fmsg = XSLMessages.createXPATHWarning(msg, args);
  -    XMLReader reader = xctxt.getPrimaryReader();
  -    
  -    if (null != reader && null != reader.getErrorHandler())
  +    if(null != xctxt)
       {
  -      ErrorHandler eh = reader.getErrorHandler();
  +      ErrorListener eh = xctxt.getErrorListener();
   
         // TO DO: Need to get stylesheet Locator from here.
  -      eh.warning(new SAXParseException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator()));
  +      eh.warning(new TransformerException(fmsg, xctxt.getSAXLocator()));
       }
  -    else
  -    {
  -      // Where to send diagnostics in this case?
  -      if(null != m_slocator)
  -      {
  -        SourceLocator slocator = m_slocator;
  -        System.out.println(fmsg + "; file " + slocator.getSystemId()
  -                           + "; line " + slocator.getLineNumber() + "; column "
  -                           + slocator.getColumnNumber()); 
  -      }
  -      else
  -      {
  -        System.out.println(fmsg); 
  -      }
  -    }
     }
   
     /**
  @@ -146,10 +129,10 @@
      * NEEDSDOC @param b
      * NEEDSDOC @param msg
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void assert(boolean b, java.lang.String msg)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       if (!b)
  @@ -170,35 +153,19 @@
      * NEEDSDOC @param msg
      * NEEDSDOC @param args
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void error(XPathContext xctxt, int msg, Object[] args)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args);
  -    XMLReader reader = xctxt.getPrimaryReader();
  -    if((null != reader) && (null != reader.getErrorHandler()))
  +    if(null != xctxt)
       {
  -      ErrorHandler eh = reader.getErrorHandler();
  +      ErrorListener eh = xctxt.getErrorListener();
   
  -      SAXParseException te = new SAXParseException(fmsg,
  -                                                   (SAXSourceLocator)m_slocator);
  +      TransformerException te = new TransformerException(fmsg, m_slocator);
         eh.fatalError(te);
  -    }
  -    else
  -    {
  -      if(null != m_slocator)
  -      {
  -        SourceLocator slocator = m_slocator;
  -        System.out.println(fmsg + "; file " + slocator.getSystemId()
  -                           + "; line " + slocator.getLineNumber() + "; column "
  -                           + slocator.getColumnNumber());
  -      }
  -      else
  -      {
  -        System.out.println(fmsg);
  -      }
       }
       
     }
  
  
  
  1.5       +1 -1      xml-xalan/java/src/org/apache/xpath/NodeSet.java
  
  Index: NodeSet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/NodeSet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NodeSet.java	2000/11/07 17:28:12	1.4
  +++ NodeSet.java	2000/11/13 16:27:26	1.5
  @@ -887,7 +887,7 @@
   
     /**
      * Get the current position, which is one less than
  -   * the next nextNode() call will retreave.  i.e. if
  +   * the next nextNode() call will retrieve.  i.e. if
      * you call getCurrentPos() and the return is 0, the next
      * fetch will take place at index 1.
      *
  
  
  
  1.14      +10 -11    xml-xalan/java/src/org/apache/xpath/SourceTreeManager.java
  
  Index: SourceTreeManager.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/SourceTreeManager.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SourceTreeManager.java	2000/11/10 20:55:10	1.13
  +++ SourceTreeManager.java	2000/11/13 16:27:26	1.14
  @@ -71,8 +71,6 @@
   import javax.xml.transform.TransformerException;
   
   import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
   import org.xml.sax.helpers.XMLReaderFactory;
   import org.xml.sax.XMLReader;
   import org.xml.sax.ContentHandler;
  @@ -82,6 +80,7 @@
   import org.apache.xalan.res.XSLMessages;
   import org.apache.xalan.stree.SourceTreeHandler;
   import org.apache.xalan.utils.SystemIDResolver;
  +import org.apache.xalan.utils.SAXSourceLocator;
   import org.apache.xpath.res.XPATHErrorResources;
   
   import javax.xml.transform.SourceLocator;
  @@ -89,7 +88,7 @@
   import javax.xml.transform.sax.SAXSource;
   import javax.xml.transform.dom.DOMSource;
   import javax.xml.transform.stream.StreamSource;
  -import org.apache.xalan.utils.SAXSourceLocator;
  +import javax.xml.transform.TransformerException;
   
   /**
    * This class bottlenecks all management of source trees.  The methods
  @@ -200,7 +199,7 @@
      */
     public Source resolveURI(
             String base, String urlString, SourceLocator locator)
  -            throws TransformerException, IOException, SAXException
  +            throws TransformerException, IOException, TransformerException
     {
       Source source = null;
       
  @@ -311,7 +310,7 @@
      * @throws TransformerException
      */
     public Node getSourceTree(String base, String urlString, SourceLocator locator)
  -          throws SAXException
  +          throws TransformerException
     {
   
       // System.out.println("getSourceTree");
  @@ -324,11 +323,11 @@
       }
       catch (IOException ioe)
       {
  -      throw new SAXParseException(ioe.getMessage(), (SAXSourceLocator)locator, ioe);
  +      throw new TransformerException(ioe.getMessage(), (SAXSourceLocator)locator, ioe);
       }
       catch (TransformerException te)
       {
  -      throw new SAXParseException(te.getMessage(), (SAXSourceLocator)locator, te);
  +      throw new TransformerException(te.getMessage(), (SAXSourceLocator)locator, te);
       }
     }
   
  @@ -404,7 +403,7 @@
           reader.setProperty("http://xml.org/sax/properties/lexical-handler",
                              handler);
         }
  -      catch (SAXException se){}
  +      catch (org.xml.sax.SAXException se){}
   
         InputSource isource = SAXSource.sourceToInputSource(source);
         reader.parse(isource);
  @@ -418,7 +417,7 @@
       {
         throw new TransformerException(ioe.getMessage(), locator, ioe);
       }
  -    catch (SAXException se)
  +    catch (org.xml.sax.SAXException se)
       {
         throw new TransformerException(se.getMessage(), locator, se);
       }
  @@ -461,7 +460,7 @@
           reader.setFeature("http://apache.org/xml/features/validation/dynamic",
                             true);
         }
  -      catch (SAXException se)
  +      catch (org.xml.sax.SAXException se)
         {
   
           // What can we do?
  @@ -470,7 +469,7 @@
   
         return reader;
       }
  -    catch (SAXException se)
  +    catch (org.xml.sax.SAXException se)
       {
         throw new TransformerException(se.getMessage(), locator, se);
       }
  
  
  
  1.10      +7 -7      xml-xalan/java/src/org/apache/xpath/VariableStack.java
  
  Index: VariableStack.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/VariableStack.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- VariableStack.java	2000/11/09 19:13:50	1.9
  +++ VariableStack.java	2000/11/13 16:27:26	1.10
  @@ -69,7 +69,7 @@
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -236,9 +236,9 @@
      *
      * @return true if the variable is already declared.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public boolean variableIsDeclared(QName qname) throws SAXException
  +  public boolean variableIsDeclared(QName qname) throws TransformerException
     {
   
       int nElems = (-1 == m_searchStart) ? this.size() : m_searchStart;
  @@ -280,9 +280,9 @@
      *
      * @return The wrapped value of the variable.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public XObject getParamVariable(XPathContext xctxt, QName qname) throws SAXException
  +  public XObject getParamVariable(XPathContext xctxt, QName qname) throws TransformerException
     {
   
       XObject val = null;
  @@ -318,9 +318,9 @@
      *
      * @return The wrapped value of the variable.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public Object getVariable(XPathContext xctxt, QName name) throws SAXException
  +  public Object getVariable(XPathContext xctxt, QName name) throws TransformerException
     {
   
       int nElems = (-1 == m_searchStart) ? this.size() : m_searchStart;
  
  
  
  1.10      +21 -24    xml-xalan/java/src/org/apache/xpath/XPath.java
  
  Index: XPath.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPath.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XPath.java	2000/11/03 23:28:14	1.9
  +++ XPath.java	2000/11/13 16:27:27	1.10
  @@ -83,12 +83,9 @@
   import org.apache.xalan.res.XSLMessages;
   import org.apache.xpath.objects.*;
   
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXParseException;
  -// import org.xml.sax.Locator;
  -
   import javax.xml.transform.TransformerException;
   import javax.xml.transform.SourceLocator;
  +import javax.xml.transform.ErrorListener;
   import org.apache.xalan.utils.SAXSourceLocator;
   import org.apache.xpath.patterns.NodeTest;
   
  @@ -187,11 +184,11 @@
      * NEEDSDOC @param prefixResolver
      * NEEDSDOC @param type
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XPath(
             String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
       m_locator = locator; 
         
  @@ -228,21 +225,21 @@
      * @param contextNode The node that "." expresses.
      * @param namespaceContext The context in which namespaces in the
      * XPath are supposed to be expanded.
  -   * @exception SAXException thrown if the active ProblemListener decides
  +   * @exception TransformerException thrown if the active ProblemListener decides
      * the error condition is severe enough to halt processing.
      * @param callback Interface that implements the processLocatedNode method.
      * @param callbackInfo Object that will be passed to the processLocatedNode method.
      * @param stopAtFirst True if the search should stop once the first node in document
      * order is found.
      * @return The result of the XPath or null if callbacks are used.
  -   * @exception SAXException thrown if
  +   * @exception TransformerException thrown if
      * the error condition is severe enough to halt processing.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject execute(
             XPathContext xctxt, Node contextNode, PrefixResolver namespaceContext)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       PrefixResolver savedPrefixResolver = xctxt.getNamespaceContext();
  @@ -262,7 +259,7 @@
         if (e instanceof javax.xml.transform.TransformerException)
         {
           TransformerException te = (TransformerException)e;
  -        throw new SAXParseException(te.getMessage(), 
  +        throw new TransformerException(te.getMessage(), 
             (SAXSourceLocator)te.getLocator(), e);
         }
         else
  @@ -272,7 +269,7 @@
             e = ((org.apache.xalan.utils.WrappedRuntimeException) e).getException();
           }
   
  -        throw new SAXParseException("Error in XPath",
  +        throw new TransformerException("Error in XPath",
                   (SAXSourceLocator)m_locator, e);
         }
       }
  @@ -299,10 +296,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public double getMatchScore(XPathContext xctxt, Node context)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       xctxt.pushCurrentNode(context);
  @@ -472,21 +469,21 @@
      * NEEDSDOC @param msg
      * NEEDSDOC @param args
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void warn(
             XPathContext xctxt, Node sourceNode, int msg, Object[] args)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       String fmsg = XSLMessages.createXPATHWarning(msg, args);
  -    ErrorHandler ehandler = xctxt.getPrimaryReader().getErrorHandler();
  +    ErrorListener ehandler = xctxt.getErrorListener();
   
       if (null != ehandler)
       {
   
         // TO DO: Need to get stylesheet Locator from here.
  -      ehandler.warning(new SAXParseException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator()));
  +      ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator()));
       }
     }
   
  @@ -497,9 +494,9 @@
      * NEEDSDOC @param b
      * NEEDSDOC @param msg
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public void assert(boolean b, String msg) throws org.xml.sax.SAXException
  +  public void assert(boolean b, String msg) throws javax.xml.transform.TransformerException
     {
   
       if (!b)
  @@ -521,19 +518,19 @@
      * NEEDSDOC @param msg
      * NEEDSDOC @param args
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void error(
             XPathContext xctxt, Node sourceNode, int msg, Object[] args)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       String fmsg = XSLMessages.createXPATHMessage(msg, args);
  -    ErrorHandler ehandler = xctxt.getPrimaryReader().getErrorHandler();
  +    ErrorListener ehandler = xctxt.getErrorListener();
   
       if (null != ehandler)
       {
  -      ehandler.fatalError(new SAXParseException(fmsg,
  +      ehandler.fatalError(new TransformerException(fmsg,
                                 (SAXSourceLocator)xctxt.getSAXLocator()));
       }
       else
  
  
  
  1.5       +19 -19    xml-xalan/java/src/org/apache/xpath/XPathAPI.java
  
  Index: XPathAPI.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPathAPI.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XPathAPI.java	2000/10/30 18:58:26	1.4
  +++ XPathAPI.java	2000/11/13 16:27:27	1.5
  @@ -56,7 +56,7 @@
    */
   package org.apache.xpath;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.w3c.dom.Node;
   import org.w3c.dom.Document;
  @@ -92,10 +92,10 @@
      * @param str A valid XPath string.
      * @return The first node found that matches the XPath, or null.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public static Node selectSingleNode(Node contextNode, String str)
  -          throws SAXException
  +          throws TransformerException
     {
       return selectSingleNode(contextNode, str, contextNode);
     }
  @@ -109,11 +109,11 @@
      * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces.
      * @return The first node found that matches the XPath, or null.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public static Node selectSingleNode(
             Node contextNode, String str, Node namespaceNode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       // Have the XObject return its result as a NodeSet.
  @@ -131,10 +131,10 @@
      *  @param str A valid XPath string.
      *  @return A NodeIterator, should never be null.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public static NodeIterator selectNodeIterator(Node contextNode, String str)
  -          throws SAXException
  +          throws TransformerException
     {
       return selectNodeIterator(contextNode, str, contextNode);
     }
  @@ -148,11 +148,11 @@
      *  @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces.
      *  @return A NodeIterator, should never be null.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public static NodeIterator selectNodeIterator(
             Node contextNode, String str, Node namespaceNode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       // Execute the XPath, and have it return the result
  @@ -170,10 +170,10 @@
      *  @param str A valid XPath string.
      *  @return A NodeIterator, should never be null.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public static NodeList selectNodeList(Node contextNode, String str)
  -          throws SAXException
  +          throws TransformerException
     {
       return selectNodeList(contextNode, str, contextNode);
     }
  @@ -187,11 +187,11 @@
      *  @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces.
      *  @return A NodeIterator, should never be null.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public static NodeList selectNodeList(
             Node contextNode, String str, Node namespaceNode)
  -            throws SAXException
  +            throws TransformerException
     {
   
       // Execute the XPath, and have it return the result
  @@ -215,9 +215,9 @@
      *  @see org.apache.xpath.objects.XString
      *  @see org.apache.xpath.objects.XRTreeFrag
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public static XObject eval(Node contextNode, String str) throws SAXException
  +  public static XObject eval(Node contextNode, String str) throws TransformerException
     {
       return eval(contextNode, str, contextNode);
     }
  @@ -240,10 +240,10 @@
      *  @see org.apache.xpath.objects.XString
      *  @see org.apache.xpath.objects.XRTreeFrag
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public static XObject eval(Node contextNode, String str, Node namespaceNode)
  -          throws SAXException
  +          throws TransformerException
     {
   
       // Since we don't have a XML Parser involved here, install some default support
  @@ -287,11 +287,11 @@
      *   @see org.apache.xpath.objects.XString
      *   @see org.apache.xpath.objects.XRTreeFrag
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public static XObject eval(
             Node contextNode, String str, PrefixResolver prefixResolver)
  -            throws SAXException
  +            throws TransformerException
     {
   
       // Since we don't have a XML Parser involved here, install some default support
  
  
  
  1.13      +40 -16    xml-xalan/java/src/org/apache/xpath/XPathContext.java
  
  Index: XPathContext.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPathContext.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XPathContext.java	2000/11/10 20:55:10	1.12
  +++ XPathContext.java	2000/11/13 16:27:27	1.13
  @@ -83,11 +83,8 @@
   import org.apache.xalan.extensions.ExpressionContext;
   
   // SAX2 imports
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXException;
   import org.xml.sax.InputSource;
   import org.xml.sax.XMLReader;
  -import org.xml.sax.SAXParseException;
   // import org.xml.sax.Locator;
   
   // TRaX imports
  @@ -102,6 +99,7 @@
   
   import javax.xml.transform.SourceLocator;
   import javax.xml.transform.Source;
  +import javax.xml.transform.ErrorListener;
   
   /**
    * <meta name="usage" content="advanced"/>
  @@ -117,7 +115,7 @@
   
     /**
      * Create an XPathContext instance.
  -   * @param owner Value that can be retreaved via the getOwnerObject() method.
  +   * @param owner Value that can be retrieved via the getOwnerObject() method.
      * @see getOwnerObject
      */
     public XPathContext(Object owner)
  @@ -130,9 +128,9 @@
      *
      * NEEDSDOC @param from
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  public void copyFromOtherLiaison(XPathContext from) throws SAXException{}
  +  public void copyFromOtherLiaison(XPathContext from) throws TransformerException{}
   
     /**
      * Reset for new run.
  @@ -244,9 +242,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject getVariable(QName qname) throws org.xml.sax.SAXException
  +  public XObject getVariable(QName qname) throws javax.xml.transform.TransformerException
     {
   
       Object obj = getVarStack().getVariable(this, qname);
  @@ -312,6 +310,32 @@
     {
       m_sourceTreeManager = mgr;
     }
  +  
  +  // =================================================
  +
  +  /** The ErrorListener where errors and warnings are to be reported.   */
  +  private ErrorListener m_errorListener;
  +
  +  /**
  +   * Get the ErrorListener where errors and warnings are to be reported.
  +   *
  +   * @return A non-null ErrorListener reference.
  +   */
  +  public final ErrorListener getErrorListener()
  +  {
  +    return m_errorListener;
  +  }
  +
  +  /**
  +   * Set the ErrorListener where errors and warnings are to be reported.
  +   *
  +   * @param listener A non-null ErrorListener reference.
  +   */
  +  public void setErrorListener(ErrorListener listener)
  +  {
  +    m_errorListener = listener;
  +  }
  +
   
     // =================================================
   
  @@ -375,10 +399,10 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     public final String getAbsoluteURI(String urlString, String base)
  -          throws SAXException
  +          throws TransformerException
     {
       try
       {
  @@ -388,11 +412,11 @@
       }
       catch (TransformerException te)
       {
  -      throw new SAXException(te);
  +      throw new TransformerException(te);
       }
       catch (IOException ioe)
       {
  -      throw new SAXException(ioe);
  +      throw new TransformerException(ioe);
       }
     }
   
  @@ -406,17 +430,17 @@
      * NEEDSDOC @param b
      * NEEDSDOC @param msg
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  private void assert(boolean b, String msg) throws org.xml.sax.SAXException
  +  private void assert(boolean b, String msg) throws javax.xml.transform.TransformerException
     {
   
  -    ErrorHandler errorHandler = getPrimaryReader().getErrorHandler();
  +    ErrorListener errorHandler = getErrorListener();
   
       if (errorHandler != null)
       {
         errorHandler.fatalError(
  -        new SAXParseException(
  +        new TransformerException(
             m_XSLMessages.createMessage(
               XPATHErrorResources.ER_INCORRECT_PROGRAMMER_ASSERTION,
               new Object[]{ msg }), (SAXSourceLocator)this.getSAXLocator()));
  
  
  
  1.3       +10 -10    xml-xalan/java/src/org/apache/xpath/XPathException.java
  
  Index: XPathException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPathException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XPathException.java	2000/10/30 18:58:27	1.2
  +++ XPathException.java	2000/11/13 16:27:27	1.3
  @@ -58,18 +58,18 @@
   
   import org.w3c.dom.Node;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   /**
    * <meta name="usage" content="general"/>
    * This class implements an exception object that all
    * XPath classes will throw in case of an error.  This class
  - * extends SAXException, and may hold other exceptions. In the
  + * extends TransformerException, and may hold other exceptions. In the
    * case of nested exceptions, printStackTrace will dump
    * all the traces of the nested exceptions, not just the trace
    * of this object.
    */
  -public class XPathException extends SAXException
  +public class XPathException extends TransformerException
   {
   
     /** NEEDSDOC Field m_styleNode          */
  @@ -170,9 +170,9 @@
         s.println("---------");
         exception.printStackTrace(s);
   
  -      if (exception instanceof SAXException)
  +      if (exception instanceof TransformerException)
         {
  -        SAXException se = (SAXException) exception;
  +        TransformerException se = (TransformerException) exception;
           Exception prev = exception;
   
           exception = se.getException();
  @@ -206,9 +206,9 @@
         if (null != nextMessage)
           lastMessage = nextMessage;
   
  -      if (exception instanceof SAXException)
  +      if (exception instanceof TransformerException)
         {
  -        SAXException se = (SAXException) exception;
  +        TransformerException se = (TransformerException) exception;
           Exception prev = exception;
   
           exception = se.getException();
  @@ -258,9 +258,9 @@
           s.println("Could not print stack trace...");
         }
   
  -      if (exception instanceof SAXException)
  +      if (exception instanceof TransformerException)
         {
  -        SAXException se = (SAXException) exception;
  +        TransformerException se = (TransformerException) exception;
           Exception prev = exception;
   
           exception = se.getException();
  @@ -281,7 +281,7 @@
   
     /**
      *  Return the embedded exception, if any.
  -   *  Overrides org.xml.sax.SAXException.getException().
  +   *  Overrides javax.xml.transform.TransformerException.getException().
      * 
      *  @return The embedded exception, or null if there is none.
      */
  
  
  
  1.8       +12 -12    xml-xalan/java/src/org/apache/xpath/axes/AxesWalker.java
  
  Index: AxesWalker.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/AxesWalker.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AxesWalker.java	2000/11/02 22:42:59	1.7
  +++ AxesWalker.java	2000/11/13 16:27:29	1.8
  @@ -147,10 +147,10 @@
      * NEEDSDOC @param opPos
      * NEEDSDOC @param stepType
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void init(Compiler compiler, int opPos, int stepType)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       // int nodeTestOpPos = compiler.getFirstChildPosOfStep(opPos);
  @@ -307,9 +307,9 @@
     /**
      * Reset the proximity positions counts.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public void resetProximityPositions() throws org.xml.sax.SAXException
  +  public void resetProximityPositions() throws javax.xml.transform.TransformerException
     {
   
       if (m_predicateCount > 0)
  @@ -329,9 +329,9 @@
      *
      * NEEDSDOC @param i
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public void initProximityPosition(int i) throws org.xml.sax.SAXException
  +  public void initProximityPosition(int i) throws javax.xml.transform.TransformerException
     {
       m_proximityPositions[i] = 0;
     }
  @@ -381,10 +381,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     boolean executePredicates(Node context, XPathContext xctxt)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       m_predicateIndex = 0;
  @@ -473,10 +473,10 @@
      * NEEDSDOC @param compiler
      * NEEDSDOC @param opPos
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     private void initPredicateInfo(Compiler compiler, int opPos)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       int pos = compiler.getFirstPredicateOpPos(opPos);
  @@ -568,7 +568,7 @@
       {
         resetProximityPositions();
       }
  -    catch (org.xml.sax.SAXException se)
  +    catch (javax.xml.transform.TransformerException se)
       {
   
         // TODO: Fix this...
  @@ -1635,7 +1635,7 @@
           return NodeFilter.FILTER_ACCEPT;
         }
       }
  -    catch (org.xml.sax.SAXException se)
  +    catch (javax.xml.transform.TransformerException se)
       {
   
         // TODO: Fix this.
  
  
  
  1.2       +3 -3      xml-xalan/java/src/org/apache/xpath/axes/ChildIterator.java
  
  Index: ChildIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/ChildIterator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ChildIterator.java	2000/10/31 17:03:04	1.1
  +++ ChildIterator.java	2000/11/13 16:27:29	1.2
  @@ -56,7 +56,7 @@
    */
   package org.apache.xpath.axes;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.apache.xpath.compiler.Compiler;
   
  @@ -80,10 +80,10 @@
      * @param opPos The position within the op map, which contains the 
      * location path expression for this itterator.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public ChildIterator(Compiler compiler, int opPos)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       super(compiler, opPos, false);
     }
  
  
  
  1.3       +1 -1      xml-xalan/java/src/org/apache/xpath/axes/ContextNodeList.java
  
  Index: ContextNodeList.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/ContextNodeList.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContextNodeList.java	2000/10/30 18:58:47	1.2
  +++ ContextNodeList.java	2000/11/13 16:27:29	1.3
  @@ -76,7 +76,7 @@
   
     /**
      * Get the current position, which is one less than
  -   * the next nextNode() call will retreave.  i.e. if
  +   * the next nextNode() call will retrieve.  i.e. if
      * you call getCurrentPos() and the return is 0, the next
      * fetch will take place at index 1.
      *
  
  
  
  1.7       +4 -4      xml-xalan/java/src/org/apache/xpath/axes/FilterExprWalker.java
  
  Index: FilterExprWalker.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/FilterExprWalker.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FilterExprWalker.java	2000/11/08 17:15:13	1.6
  +++ FilterExprWalker.java	2000/11/13 16:27:30	1.7
  @@ -98,10 +98,10 @@
      * NEEDSDOC @param opPos
      * NEEDSDOC @param stepType
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void init(Compiler compiler, int opPos, int stepType)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       super.init(compiler, opPos, stepType);
  @@ -145,7 +145,7 @@
         
         m_peek = null;
       }
  -    catch (org.xml.sax.SAXException se)
  +    catch (javax.xml.transform.TransformerException se)
       {
   
         // TODO: Fix...
  @@ -212,7 +212,7 @@
   
         return NodeFilter.FILTER_ACCEPT;
       }
  -    catch (org.xml.sax.SAXException se)
  +    catch (javax.xml.transform.TransformerException se)
       {
         throw new RuntimeException(se.getMessage());
       }
  
  
  
  1.12      +8 -8      xml-xalan/java/src/org/apache/xpath/axes/LocPathIterator.java
  
  Index: LocPathIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/LocPathIterator.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- LocPathIterator.java	2000/11/09 19:11:47	1.11
  +++ LocPathIterator.java	2000/11/13 16:27:30	1.12
  @@ -198,10 +198,10 @@
      * @param opPos The position of this iterator in the 
      * opcode list from the compiler.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public LocPathIterator(Compiler compiler, int opPos)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       this(compiler, opPos, true);
     }
  @@ -219,11 +219,11 @@
      * loaded, or false if this is a derived iterator and 
      * it doesn't wish to load child walkers.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public LocPathIterator(
             Compiler compiler, int opPos, boolean shouldLoadWalkers)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       int firstStepPos = compiler.getFirstChildPos(opPos);
  @@ -246,9 +246,9 @@
      *
      * @return An XNodeSet reference that holds this iterator.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       try
  @@ -264,7 +264,7 @@
       }
       catch (CloneNotSupportedException ncse)
       {
  -      throw new org.xml.sax.SAXException(ncse);
  +      throw new javax.xml.transform.TransformerException(ncse);
       }
     }
       
  @@ -315,7 +315,7 @@
   
     /**
      * Get the current position, which is one less than
  -   * the next nextNode() call will retreave.  i.e. if
  +   * the next nextNode() call will retrieve.  i.e. if
      * you call getCurrentPos() and the return is 0, the next
      * fetch will take place at index 1.
      *
  
  
  
  1.3       +3 -3      xml-xalan/java/src/org/apache/xpath/axes/PrecedingWalker.java
  
  Index: PrecedingWalker.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/PrecedingWalker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PrecedingWalker.java	2000/10/30 18:58:52	1.2
  +++ PrecedingWalker.java	2000/11/13 16:27:30	1.3
  @@ -102,7 +102,7 @@
       {
         super.resetProximityPositions();
       }
  -    catch (org.xml.sax.SAXException se)
  +    catch (javax.xml.transform.TransformerException se)
       {
   
         // TODO: Fix this...
  @@ -113,9 +113,9 @@
     /**
      * Reset the proximity positions counts.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public void resetProximityPositions() throws org.xml.sax.SAXException{}
  +  public void resetProximityPositions() throws javax.xml.transform.TransformerException{}
   
     /**
      *  Moves to and returns the closest visible ancestor node of the current
  
  
  
  1.3       +1 -1      xml-xalan/java/src/org/apache/xpath/axes/ReverseAxesWalker.java
  
  Index: ReverseAxesWalker.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/ReverseAxesWalker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReverseAxesWalker.java	2000/10/30 18:58:54	1.2
  +++ ReverseAxesWalker.java	2000/11/13 16:27:30	1.3
  @@ -64,7 +64,7 @@
   import org.apache.xpath.compiler.OpCodes;
   import org.apache.xpath.objects.XObject;
   
  -import org.xml.sax.SAXException;
  +import javax.xml.transform.TransformerException;
   
   import org.w3c.dom.Node;
   import org.w3c.dom.traversal.NodeFilter;
  
  
  
  1.7       +9 -9      xml-xalan/java/src/org/apache/xpath/axes/UnionPathIterator.java
  
  Index: UnionPathIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/UnionPathIterator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- UnionPathIterator.java	2000/11/02 22:42:59	1.6
  +++ UnionPathIterator.java	2000/11/13 16:27:30	1.7
  @@ -160,9 +160,9 @@
      *
      * NEEDSDOC (execute) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       try
  @@ -351,10 +351,10 @@
      * NEEDSDOC @param compiler
      * NEEDSDOC @param opPos
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public UnionPathIterator(Compiler compiler, int opPos)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       super();
  @@ -429,10 +429,10 @@
      * NEEDSDOC @param opPos
      * NEEDSDOC @param count
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     protected void loadLocationPaths(Compiler compiler, int opPos, int count)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       // TODO: Handle unwrapped FilterExpr
  @@ -480,10 +480,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     protected LocPathIterator createLocPathIterator(
  -          Compiler compiler, int opPos) throws org.xml.sax.SAXException
  +          Compiler compiler, int opPos) throws javax.xml.transform.TransformerException
     {
       return WalkerFactory.newLocPathIterator(compiler, opPos);
     }
  @@ -599,7 +599,7 @@
   
     /**
      * Get the current position, which is one less than
  -   * the next nextNode() call will retreave.  i.e. if
  +   * the next nextNode() call will retrieve.  i.e. if
      * you call getCurrentPos() and the return is 0, the next
      * fetch will take place at index 1.
      *
  
  
  
  1.6       +10 -10    xml-xalan/java/src/org/apache/xpath/axes/WalkerFactory.java
  
  Index: WalkerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/WalkerFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WalkerFactory.java	2000/11/09 02:30:18	1.5
  +++ WalkerFactory.java	2000/11/13 16:27:30	1.6
  @@ -82,11 +82,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     static AxesWalker loadOneWalker(
             LocPathIterator lpi, Compiler compiler, int stepOpCodePos)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       AxesWalker firstWalker = null;
  @@ -119,11 +119,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     static AxesWalker loadWalkers(
             LocPathIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       int stepType;
  @@ -168,10 +168,10 @@
      *
      * NEEDSDOC (newLocPathIterator) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public static LocPathIterator newLocPathIterator(
  -          Compiler compiler, int opPos) throws org.xml.sax.SAXException
  +          Compiler compiler, int opPos) throws javax.xml.transform.TransformerException
     {
   
       int firstStepPos = compiler.getFirstChildPos(opPos);
  @@ -232,11 +232,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     private static int analyze(
             Compiler compiler, int stepOpCodePos, int stepIndex)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       int stepType;
  @@ -364,10 +364,10 @@
      *
      * NEEDSDOC (analyzePredicate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     static int analyzePredicate(Compiler compiler, int opPos, int stepType)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       int argLen;
  
  
  
  1.14      +84 -86    xml-xalan/java/src/org/apache/xpath/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/Compiler.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Compiler.java	2000/11/09 19:13:50	1.13
  +++ Compiler.java	2000/11/13 16:27:31	1.14
  @@ -90,10 +90,8 @@
   import javax.xml.transform.SourceLocator;
   import org.apache.xalan.utils.SAXSourceLocator;
   
  -import org.xml.sax.ErrorHandler;
  -// import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
  +import javax.xml.transform.ErrorListener;
  +import javax.xml.transform.TransformerException;
   
   import org.w3c.dom.traversal.NodeFilter;
   
  @@ -111,7 +109,7 @@
      * NEEDSDOC @param errorHandler
      * NEEDSDOC @param locator
      */
  -  public Compiler(ErrorHandler errorHandler, SourceLocator locator)
  +  public Compiler(ErrorListener errorHandler, SourceLocator locator)
     {
       m_errorHandler = errorHandler;
       if(null != locator)
  @@ -145,9 +143,9 @@
      * @param callbackInfo Object that will be passed to the processLocatedNode method.
      * @return The result of the XPath.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  public Expression compile(int opPos) throws org.xml.sax.SAXException
  +  public Expression compile(int opPos) throws TransformerException
     {
   
       int op = m_opMap[opPos];
  @@ -236,10 +234,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     private Expression compileOperation(Operation operation, int opPos)
  -          throws SAXException
  +          throws TransformerException
     {
   
       int leftPos = getFirstChildPos(opPos);
  @@ -258,10 +256,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
     private Expression compileUnary(UnaryOperation unary, int opPos)
  -          throws SAXException
  +          throws TransformerException
     {
   
       int rightPos = getFirstChildPos(opPos);
  @@ -279,9 +277,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression or(int opPos) throws org.xml.sax.SAXException
  +  protected Expression or(int opPos) throws TransformerException
     {
       return compileOperation(new Or(), opPos);
     }
  @@ -294,9 +292,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression and(int opPos) throws org.xml.sax.SAXException
  +  protected Expression and(int opPos) throws TransformerException
     {
       return compileOperation(new And(), opPos);
     }
  @@ -309,9 +307,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression notequals(int opPos) throws org.xml.sax.SAXException
  +  protected Expression notequals(int opPos) throws TransformerException
     {
       return compileOperation(new NotEquals(), opPos);
     }
  @@ -324,9 +322,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression equals(int opPos) throws org.xml.sax.SAXException
  +  protected Expression equals(int opPos) throws TransformerException
     {
       return compileOperation(new Equals(), opPos);
     }
  @@ -339,9 +337,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression lte(int opPos) throws org.xml.sax.SAXException
  +  protected Expression lte(int opPos) throws TransformerException
     {
       return compileOperation(new Lte(), opPos);
     }
  @@ -354,9 +352,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression lt(int opPos) throws org.xml.sax.SAXException
  +  protected Expression lt(int opPos) throws TransformerException
     {
       return compileOperation(new Lt(), opPos);
     }
  @@ -369,9 +367,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression gte(int opPos) throws org.xml.sax.SAXException
  +  protected Expression gte(int opPos) throws TransformerException
     {
       return compileOperation(new Gte(), opPos);
     }
  @@ -384,9 +382,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression gt(int opPos) throws org.xml.sax.SAXException
  +  protected Expression gt(int opPos) throws TransformerException
     {
       return compileOperation(new Gt(), opPos);
     }
  @@ -399,9 +397,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression plus(int opPos) throws org.xml.sax.SAXException
  +  protected Expression plus(int opPos) throws TransformerException
     {
       return compileOperation(new Plus(), opPos);
     }
  @@ -414,9 +412,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression minus(int opPos) throws org.xml.sax.SAXException
  +  protected Expression minus(int opPos) throws TransformerException
     {
       return compileOperation(new Minus(), opPos);
     }
  @@ -429,9 +427,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression mult(int opPos) throws org.xml.sax.SAXException
  +  protected Expression mult(int opPos) throws TransformerException
     {
       return compileOperation(new Mult(), opPos);
     }
  @@ -443,10 +441,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      * @returns arg1 / arg2.
      */
  -  protected Expression div(int opPos) throws org.xml.sax.SAXException
  +  protected Expression div(int opPos) throws TransformerException
     {
       return compileOperation(new Div(), opPos);
     }
  @@ -459,9 +457,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression mod(int opPos) throws org.xml.sax.SAXException
  +  protected Expression mod(int opPos) throws TransformerException
     {
       return compileOperation(new Mod(), opPos);
     }
  @@ -475,9 +473,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression quo(int opPos) throws org.xml.sax.SAXException
  +  protected Expression quo(int opPos) throws TransformerException
     {
       return compileOperation(new Quo(), opPos);
     }
  @@ -490,9 +488,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression neg(int opPos) throws org.xml.sax.SAXException
  +  protected Expression neg(int opPos) throws TransformerException
     {
       return compileUnary(new Neg(), opPos);
     }
  @@ -505,9 +503,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression string(int opPos) throws org.xml.sax.SAXException
  +  protected Expression string(int opPos) throws TransformerException
     {
       return compileUnary(new org.apache.xpath.operations.String(), opPos);
     }
  @@ -520,9 +518,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression bool(int opPos) throws org.xml.sax.SAXException
  +  protected Expression bool(int opPos) throws TransformerException
     {
       return compileUnary(new org.apache.xpath.operations.Bool(), opPos);
     }
  @@ -535,9 +533,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression number(int opPos) throws org.xml.sax.SAXException
  +  protected Expression number(int opPos) throws TransformerException
     {
       return compileUnary(new org.apache.xpath.operations.Number(), opPos);
     }
  @@ -582,9 +580,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression variable(int opPos) throws org.xml.sax.SAXException
  +  protected Expression variable(int opPos) throws TransformerException
     {
   
       Variable var = new Variable();
  @@ -612,9 +610,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression group(int opPos) throws org.xml.sax.SAXException
  +  protected Expression group(int opPos) throws TransformerException
     {
   
       // no-op
  @@ -629,9 +627,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression arg(int opPos) throws org.xml.sax.SAXException
  +  protected Expression arg(int opPos) throws TransformerException
     {
   
       // no-op
  @@ -648,9 +646,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression union(int opPos) throws org.xml.sax.SAXException
  +  protected Expression union(int opPos) throws TransformerException
     {
       return new UnionPathIterator(this, opPos);
     }
  @@ -668,9 +666,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  public Expression locationPath(int opPos) throws org.xml.sax.SAXException
  +  public Expression locationPath(int opPos) throws TransformerException
     {
       locPathDepth++;
       LocPathIterator iter = WalkerFactory.newLocPathIterator(this, opPos);
  @@ -689,9 +687,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  public Expression predicate(int opPos) throws org.xml.sax.SAXException
  +  public Expression predicate(int opPos) throws TransformerException
     {
       return compile(opPos + 2);
     }
  @@ -704,9 +702,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  protected Expression matchPattern(int opPos) throws org.xml.sax.SAXException
  +  protected Expression matchPattern(int opPos) throws TransformerException
     {
   
       // First, count...
  @@ -748,10 +746,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
     public Expression locationPathPattern(int opPos)
  -          throws org.xml.sax.SAXException
  +          throws TransformerException
     {
   
       opPos = getFirstChildPos(opPos);
  @@ -843,11 +841,11 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
     protected StepPattern stepPattern(
             int opPos, int stepCount, StepPattern ancestorPattern)
  -            throws org.xml.sax.SAXException
  +            throws TransformerException
     {
   
       int startOpPos = opPos;
  @@ -919,10 +917,10 @@
      *
      * NEEDSDOC (getCompiledPredicates) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
     public Expression[] getCompiledPredicates(int opPos)
  -          throws org.xml.sax.SAXException
  +          throws TransformerException
     {
   
       int count = countPredicates(opPos);
  @@ -946,9 +944,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  public int countPredicates(int opPos) throws org.xml.sax.SAXException
  +  public int countPredicates(int opPos) throws TransformerException
     {
   
       int count = 0;
  @@ -969,10 +967,10 @@
      * NEEDSDOC @param opPos
      * NEEDSDOC @param predicates
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
     private void compilePredicates(int opPos, Expression[] predicates)
  -          throws org.xml.sax.SAXException
  +          throws TransformerException
     {
   
       for (int i = 0; OpCodes.OP_PREDICATE == getOp(opPos); i++)
  @@ -989,9 +987,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  Expression compileFunction(int opPos) throws org.xml.sax.SAXException
  +  Expression compileFunction(int opPos) throws TransformerException
     {
   
       int endFunc = opPos + m_opMap[opPos + 1] - 1;
  @@ -1024,7 +1022,7 @@
         {
           java.lang.String name = FunctionTable.m_functions[funcID].getName();
   
  -        throw new SAXException(name + " only allows " + wnae.m_argsExpected
  +        throw new TransformerException(name + " only allows " + wnae.m_argsExpected
                                  + " arguments");
         }
   
  @@ -1045,10 +1043,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
     private Expression compileExtension(int opPos)
  -          throws org.xml.sax.SAXException
  +          throws TransformerException
     {
   
       int endExtFunc = opPos + m_opMap[opPos + 1] - 1;
  @@ -1098,16 +1096,16 @@
      * NEEDSDOC @param msg
      * NEEDSDOC @param args
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  public void warn(int msg, Object[] args) throws org.xml.sax.SAXException
  +  public void warn(int msg, Object[] args) throws TransformerException
     {
   
       java.lang.String fmsg = XSLMessages.createXPATHWarning(msg, args);
   
       if (null != m_errorHandler)
       {
  -      m_errorHandler.warning(new SAXParseException(fmsg, (SAXSourceLocator)m_locator));
  +      m_errorHandler.warning(new TransformerException(fmsg, m_locator));
       }
       else
       {
  @@ -1125,10 +1123,10 @@
      * NEEDSDOC @param b
      * NEEDSDOC @param msg
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
     public void assert(boolean b, java.lang.String msg)
  -          throws org.xml.sax.SAXException
  +          throws TransformerException
     {
   
       if (!b)
  @@ -1148,16 +1146,16 @@
      * NEEDSDOC @param msg
      * NEEDSDOC @param args
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws TransformerException
      */
  -  public void error(int msg, Object[] args) throws org.xml.sax.SAXException
  +  public void error(int msg, Object[] args) throws TransformerException
     {
   
       java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args);
   
       if (null != m_errorHandler)
       {
  -      m_errorHandler.fatalError(new SAXParseException(fmsg, (SAXSourceLocator)m_locator));
  +      m_errorHandler.fatalError(new TransformerException(fmsg, m_locator));
       }
       else
       {
  @@ -1166,7 +1164,7 @@
         //                    +"; file "+te.getSystemId()
         //                    +"; line "+te.getLineNumber()
         //                    +"; column "+te.getColumnNumber());
  -      throw new SAXParseException(fmsg, (SAXSourceLocator)m_locator);
  +      throw new TransformerException(fmsg, (SAXSourceLocator)m_locator);
       }
     }
   
  @@ -1196,7 +1194,7 @@
     }
   
     /** NEEDSDOC Field m_errorHandler          */
  -  ErrorHandler m_errorHandler;
  +  ErrorListener m_errorHandler;
   
     /** NEEDSDOC Field m_locator          */
     SourceLocator m_locator;
  
  
  
  1.3       +5 -5      xml-xalan/java/src/org/apache/xpath/compiler/FuncLoader.java
  
  Index: FuncLoader.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/FuncLoader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncLoader.java	2000/10/30 18:59:20	1.2
  +++ FuncLoader.java	2000/11/13 16:27:31	1.3
  @@ -115,9 +115,9 @@
      *
      * NEEDSDOC (getFunction) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public Function getFunction() throws org.xml.sax.SAXException
  +  public Function getFunction() throws javax.xml.transform.TransformerException
     {
   
       try
  @@ -144,15 +144,15 @@
       }
       catch (ClassNotFoundException e)
       {
  -      throw new org.xml.sax.SAXException(e);
  +      throw new javax.xml.transform.TransformerException(e);
       }
       catch (IllegalAccessException e)
       {
  -      throw new org.xml.sax.SAXException(e);
  +      throw new javax.xml.transform.TransformerException(e);
       }
       catch (InstantiationException e)
       {
  -      throw new org.xml.sax.SAXException(e);
  +      throw new javax.xml.transform.TransformerException(e);
       }
     }
   }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/compiler/FunctionTable.java
  
  Index: FunctionTable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/FunctionTable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FunctionTable.java	2000/10/30 18:59:21	1.2
  +++ FunctionTable.java	2000/11/13 16:27:31	1.3
  @@ -267,10 +267,10 @@
      *
      * NEEDSDOC (getFunction) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public static Function getFunction(int which)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return m_functions[which].getFunction();
     }
  
  
  
  1.3       +4 -4      xml-xalan/java/src/org/apache/xpath/compiler/Lexer.java
  
  Index: Lexer.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/Lexer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Lexer.java	2000/10/30 18:59:22	1.2
  +++ Lexer.java	2000/11/13 16:27:31	1.3
  @@ -131,9 +131,9 @@
      * elements.
      * @param pat XSLT Expression.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  void tokenize(String pat) throws org.xml.sax.SAXException
  +  void tokenize(String pat) throws javax.xml.transform.TransformerException
     {
       tokenize(pat, null);
     }
  @@ -144,10 +144,10 @@
      * @param pat XSLT Expression.
      * @param targetStrings Vector to hold Strings, may be null.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     void tokenize(String pat, Vector targetStrings)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       m_compiler.m_tokenQueueSize = 0;
  
  
  
  1.7       +91 -92    xml-xalan/java/src/org/apache/xpath/compiler/XPathParser.java
  
  Index: XPathParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/XPathParser.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XPathParser.java	2000/11/09 19:13:50	1.6
  +++ XPathParser.java	2000/11/13 16:27:31	1.7
  @@ -67,13 +67,13 @@
   import org.apache.xalan.res.XSLMessages;
   import org.apache.xalan.utils.StringKey;
   
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
  +import javax.xml.transform.TransformerException;
   import org.xml.sax.Locator;
   import org.xml.sax.helpers.LocatorImpl;
   
   import javax.xml.transform.TransformerConfigurationException;
  +import javax.xml.transform.TransformerException;
  +import javax.xml.transform.ErrorListener;
   
   /**
    * <meta name="usage" content="general"/>
  @@ -125,11 +125,11 @@
      * @param namespaceContext An object that is able to resolve prefixes in
      * the XPath to namespaces.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void initXPath(
             Compiler compiler, String expression, PrefixResolver namespaceContext)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       m_ops = compiler;
  @@ -184,11 +184,11 @@
      * @param namespaceContext An object that is able to resolve prefixes in
      * the XPath to namespaces.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public void initMatchPattern(
             Compiler compiler, String expression, PrefixResolver namespaceContext)
  -            throws org.xml.sax.SAXException
  +            throws javax.xml.transform.TransformerException
     {
   
       m_ops = compiler;
  @@ -230,14 +230,14 @@
     }
   
     /** NEEDSDOC Field m_errorHandler          */
  -  private ErrorHandler m_errorHandler;
  +  private ErrorListener m_errorHandler;
   
     /**
      * Allow an application to register an error event handler.
      *
      * NEEDSDOC @param handler
      */
  -  public void setErrorHandler(ErrorHandler handler)
  +  public void setErrorHandler(ErrorListener handler)
     {
       m_errorHandler = handler;
     }
  @@ -247,7 +247,7 @@
      *
      * NEEDSDOC ($objectName$) @return
      */
  -  public ErrorHandler getErrorHandler()
  +  public ErrorListener getErrorListener()
     {
       return m_errorHandler;
     }
  @@ -479,10 +479,10 @@
      *
      * NEEDSDOC @param expected
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     private final void consumeExpected(String expected)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       if (tokenIs(expected))
  @@ -502,10 +502,10 @@
      *
      * NEEDSDOC @param expected
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     private final void consumeExpected(char expected)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       if (tokenIs(expected))
  @@ -526,22 +526,22 @@
      * NEEDSDOC @param msg
      * NEEDSDOC @param args
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  void warn(int msg, Object[] args) throws SAXException
  +  void warn(int msg, Object[] args) throws TransformerException
     {
   
       String fmsg = XSLMessages.createXPATHWarning(msg, args);
  -    ErrorHandler ehandler = this.getErrorHandler();
  +    ErrorListener ehandler = this.getErrorListener();
   
       if (null != ehandler)
       {
  -
         // TO DO: Need to get stylesheet Locator from here.
  -      ehandler.warning(new SAXParseException(fmsg, new LocatorImpl()));
  +      ehandler.warning(new TransformerException(fmsg));
       }
       else
       {
  +      // Should never happen.
         System.out.println(fmsg);
       }
     }
  @@ -573,19 +573,18 @@
      * NEEDSDOC @param msg
      * NEEDSDOC @param args
      *
  -   * @throws SAXException
  +   * @throws TransformerException
      */
  -  void error(int msg, Object[] args) throws SAXException
  +  void error(int msg, Object[] args) throws TransformerException
     {
   
       String fmsg = XSLMessages.createXPATHMessage(msg, args);
  -    ErrorHandler ehandler = this.getErrorHandler();
  +    ErrorListener ehandler = this.getErrorListener();
   
       if (null != ehandler)
       {
  -
         // TO DO: Need to get stylesheet Locator from here.
  -      ehandler.fatalError(new SAXParseException(fmsg, new LocatorImpl()));
  +      ehandler.fatalError(new TransformerException(fmsg));
       }
       else
       {
  @@ -703,9 +702,9 @@
      * Expr  ::=  OrExpr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void Expr() throws org.xml.sax.SAXException
  +  protected void Expr() throws javax.xml.transform.TransformerException
     {
       OrExpr();
     }
  @@ -717,9 +716,9 @@
      * | OrExpr 'or' AndExpr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void OrExpr() throws org.xml.sax.SAXException
  +  protected void OrExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -744,9 +743,9 @@
      * | AndExpr 'and' EqualityExpr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void AndExpr() throws org.xml.sax.SAXException
  +  protected void AndExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -777,9 +776,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected int EqualityExpr(int addPos) throws org.xml.sax.SAXException
  +  protected int EqualityExpr(int addPos) throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -837,9 +836,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected int RelationalExpr(int addPos) throws org.xml.sax.SAXException
  +  protected int RelationalExpr(int addPos) throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -914,9 +913,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected int AdditiveExpr(int addPos) throws org.xml.sax.SAXException
  +  protected int AdditiveExpr(int addPos) throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -975,9 +974,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected int MultiplicativeExpr(int addPos) throws org.xml.sax.SAXException
  +  protected int MultiplicativeExpr(int addPos) throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1051,9 +1050,9 @@
      * | '-' UnaryExpr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void UnaryExpr() throws org.xml.sax.SAXException
  +  protected void UnaryExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1079,9 +1078,9 @@
      * StringExpr  ::=  Expr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void StringExpr() throws org.xml.sax.SAXException
  +  protected void StringExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1099,9 +1098,9 @@
      * StringExpr  ::=  Expr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void BooleanExpr() throws org.xml.sax.SAXException
  +  protected void BooleanExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1125,9 +1124,9 @@
      * NumberExpr  ::=  Expr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void NumberExpr() throws org.xml.sax.SAXException
  +  protected void NumberExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1150,9 +1149,9 @@
      * | UnionExpr '|' PathExpr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void UnionExpr() throws org.xml.sax.SAXException
  +  protected void UnionExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1271,9 +1270,9 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void PathExpr() throws org.xml.sax.SAXException
  +  protected void PathExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1306,9 +1305,9 @@
      * @exception XSLProcessorException thrown if the active ProblemListener and XPathContext decide
      * the error condition is severe enough to halt processing.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void FilterExpr() throws org.xml.sax.SAXException
  +  protected void FilterExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1358,9 +1357,9 @@
      * | FunctionCall
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void PrimaryExpr() throws org.xml.sax.SAXException
  +  protected void PrimaryExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1416,9 +1415,9 @@
      * Argument    ::=    Expr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void Argument() throws org.xml.sax.SAXException
  +  protected void Argument() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1435,9 +1434,9 @@
      * FunctionCall    ::=    FunctionName '(' ( Argument ( ',' Argument)*)? ')'
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void FunctionCall() throws org.xml.sax.SAXException
  +  protected void FunctionCall() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1523,9 +1522,9 @@
      * | AbsoluteLocationPath
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void LocationPath() throws org.xml.sax.SAXException
  +  protected void LocationPath() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1564,9 +1563,9 @@
      * | AbbreviatedRelativeLocationPath
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void RelativeLocationPath() throws org.xml.sax.SAXException
  +  protected void RelativeLocationPath() throws javax.xml.transform.TransformerException
     {
   
       Step();
  @@ -1583,9 +1582,9 @@
      * Step    ::=    Basis Predicate
      * | AbbreviatedStep
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void Step() throws org.xml.sax.SAXException
  +  protected void Step() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1641,9 +1640,9 @@
      * Basis    ::=    AxisName '::' NodeTest
      * | AbbreviatedBasis
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void Basis() throws org.xml.sax.SAXException
  +  protected void Basis() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1719,9 +1718,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected int AxisName() throws org.xml.sax.SAXException
  +  protected int AxisName() throws javax.xml.transform.TransformerException
     {
   
       Object val = Keywords.m_axisnames.get(m_token);
  @@ -1747,9 +1746,9 @@
      *
      * NEEDSDOC @param axesType
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void NodeTest(int axesType) throws org.xml.sax.SAXException
  +  protected void NodeTest(int axesType) throws javax.xml.transform.TransformerException
     {
   
       if (lookahead('(', 1))
  @@ -1844,9 +1843,9 @@
      * Predicate ::= '[' PredicateExpr ']'
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void Predicate() throws org.xml.sax.SAXException
  +  protected void Predicate() throws javax.xml.transform.TransformerException
     {
   
       if (tokenIs('['))
  @@ -1862,9 +1861,9 @@
      * PredicateExpr ::= Expr
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void PredicateExpr() throws org.xml.sax.SAXException
  +  protected void PredicateExpr() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -1884,9 +1883,9 @@
      * Prefix ::=  NCName
      * LocalPart ::=  NCName
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void QName() throws org.xml.sax.SAXException
  +  protected void QName() throws javax.xml.transform.TransformerException
     {
       // Namespace
       if(lookahead(':', 1))
  @@ -1931,9 +1930,9 @@
      * | "'" [^']* "'"
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void Literal() throws org.xml.sax.SAXException
  +  protected void Literal() throws javax.xml.transform.TransformerException
     {
   
       int last = m_token.length() - 1;
  @@ -1971,9 +1970,9 @@
      * Number ::= [0-9]+('.'[0-9]+)? | '.'[0-9]+
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void Number() throws org.xml.sax.SAXException
  +  protected void Number() throws javax.xml.transform.TransformerException
     {
   
       if (null != m_token)
  @@ -2011,9 +2010,9 @@
      * | Pattern '|' LocationPathPattern
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void Pattern() throws org.xml.sax.SAXException
  +  protected void Pattern() throws javax.xml.transform.TransformerException
     {
   
       while (true)
  @@ -2039,9 +2038,9 @@
      * | '//'? RelativePathPattern
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void LocationPathPattern() throws org.xml.sax.SAXException
  +  protected void LocationPathPattern() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  @@ -2105,9 +2104,9 @@
      * (Also handle doc())
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void IdKeyPattern() throws org.xml.sax.SAXException
  +  protected void IdKeyPattern() throws javax.xml.transform.TransformerException
     {
       FunctionCall();
     }
  @@ -2119,9 +2118,9 @@
      * | RelativePathPattern '//' StepPattern
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void RelativePathPattern() throws org.xml.sax.SAXException
  +  protected void RelativePathPattern() throws javax.xml.transform.TransformerException
     {
   
       StepPattern();
  @@ -2138,9 +2137,9 @@
      * StepPattern  ::=  AbbreviatedNodeTestStep
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void StepPattern() throws org.xml.sax.SAXException
  +  protected void StepPattern() throws javax.xml.transform.TransformerException
     {
       AbbreviatedNodeTestStep();
     }
  @@ -2150,9 +2149,9 @@
      * AbbreviatedNodeTestStep    ::=    '@'? NodeTest Predicate
      *
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void AbbreviatedNodeTestStep() throws org.xml.sax.SAXException
  +  protected void AbbreviatedNodeTestStep() throws javax.xml.transform.TransformerException
     {
   
       int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH];
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncBoolean.java
  
  Index: FuncBoolean.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncBoolean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncBoolean.java	2000/10/30 18:59:32	1.2
  +++ FuncBoolean.java	2000/11/13 16:27:33	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return m_arg0.execute(xctxt).bool() ? XBoolean.S_TRUE : XBoolean.S_FALSE;
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncCeiling.java
  
  Index: FuncCeiling.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncCeiling.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncCeiling.java	2000/10/30 18:59:32	1.2
  +++ FuncCeiling.java	2000/11/13 16:27:33	1.3
  @@ -80,9 +80,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return new XNumber(Math.ceil(m_arg0.execute(xctxt).num()));
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncConcat.java
  
  Index: FuncConcat.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncConcat.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncConcat.java	2000/10/30 18:59:33	1.2
  +++ FuncConcat.java	2000/11/13 16:27:33	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       StringBuffer sb = new StringBuffer();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncContains.java
  
  Index: FuncContains.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncContains.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncContains.java	2000/10/30 18:59:33	1.2
  +++ FuncContains.java	2000/11/13 16:27:33	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String s1 = m_arg0.execute(xctxt).str();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncCount.java
  
  Index: FuncCount.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncCount.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncCount.java	2000/10/30 18:59:33	1.2
  +++ FuncCount.java	2000/11/13 16:27:33	1.3
  @@ -82,9 +82,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       NodeIterator nl = m_arg0.execute(xctxt).nodeset();
  
  
  
  1.4       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncCurrent.java
  
  Index: FuncCurrent.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncCurrent.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FuncCurrent.java	2000/11/07 17:28:58	1.3
  +++ FuncCurrent.java	2000/11/13 16:27:33	1.4
  @@ -99,9 +99,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       // If we're in a predicate, then this will return non-null.
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncDoclocation.java
  
  Index: FuncDoclocation.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncDoclocation.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncDoclocation.java	2000/10/30 18:59:34	1.2
  +++ FuncDoclocation.java	2000/11/13 16:27:33	1.3
  @@ -81,9 +81,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       Node whereNode = getArg0AsNode(xctxt);
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncExtElementAvailable.java
  
  Index: FuncExtElementAvailable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncExtElementAvailable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncExtElementAvailable.java	2000/10/30 18:59:34	1.2
  +++ FuncExtElementAvailable.java	2000/11/13 16:27:33	1.3
  @@ -81,9 +81,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String fullName = m_arg0.execute(xctxt).str();
  
  
  
  1.5       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncExtFunction.java
  
  Index: FuncExtFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncExtFunction.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FuncExtFunction.java	2000/10/30 18:59:34	1.4
  +++ FuncExtFunction.java	2000/11/13 16:27:33	1.5
  @@ -109,9 +109,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       XObject result;
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncExtFunctionAvailable.java
  
  Index: FuncExtFunctionAvailable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncExtFunctionAvailable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncExtFunctionAvailable.java	2000/10/30 18:59:35	1.2
  +++ FuncExtFunctionAvailable.java	2000/11/13 16:27:33	1.3
  @@ -81,9 +81,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String fullName = m_arg0.execute(xctxt).str();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncFalse.java
  
  Index: FuncFalse.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncFalse.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncFalse.java	2000/10/30 18:59:35	1.2
  +++ FuncFalse.java	2000/11/13 16:27:33	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return XBoolean.S_FALSE;
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncFloor.java
  
  Index: FuncFloor.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncFloor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncFloor.java	2000/10/30 18:59:35	1.2
  +++ FuncFloor.java	2000/11/13 16:27:33	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return new XNumber(java.lang.Math.floor(m_arg0.execute(xctxt).num()));
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncFormatNumber.java
  
  Index: FuncFormatNumber.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncFormatNumber.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncFormatNumber.java	2000/10/30 18:59:36	1.2
  +++ FuncFormatNumber.java	2000/11/13 16:27:33	1.3
  @@ -80,9 +80,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       double num = m_arg0.execute(xctxt).num();
  
  
  
  1.4       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncGenerateId.java
  
  Index: FuncGenerateId.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncGenerateId.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FuncGenerateId.java	2000/10/30 18:59:36	1.3
  +++ FuncGenerateId.java	2000/11/13 16:27:33	1.4
  @@ -79,9 +79,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       Node which = getArg0AsNode(xctxt);
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncId.java
  
  Index: FuncId.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncId.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncId.java	2000/10/30 18:59:37	1.2
  +++ FuncId.java	2000/11/13 16:27:33	1.3
  @@ -143,9 +143,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       Node context = xctxt.getCurrentNode();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncLang.java
  
  Index: FuncLang.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncLang.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncLang.java	2000/10/30 18:59:37	1.2
  +++ FuncLang.java	2000/11/13 16:27:33	1.3
  @@ -79,9 +79,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String lang = m_arg0.execute(xctxt).str();
  
  
  
  1.3       +4 -4      xml-xalan/java/src/org/apache/xpath/functions/FuncLast.java
  
  Index: FuncLast.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncLast.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncLast.java	2000/10/30 18:59:37	1.2
  +++ FuncLast.java	2000/11/13 16:27:33	1.3
  @@ -85,10 +85,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public int getCountOfContextNodeList(XPathContext xctxt)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       //    assert(null != m_contextNodeList, "m_contextNodeList must be non-null");
  @@ -123,9 +123,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return new XNumber((double) getCountOfContextNodeList(xctxt));
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncLocalPart.java
  
  Index: FuncLocalPart.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncLocalPart.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncLocalPart.java	2000/10/30 18:59:38	1.2
  +++ FuncLocalPart.java	2000/11/13 16:27:33	1.3
  @@ -81,9 +81,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       Node context = getArg0AsNode(xctxt);
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncNamespace.java
  
  Index: FuncNamespace.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncNamespace.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncNamespace.java	2000/10/30 18:59:38	1.2
  +++ FuncNamespace.java	2000/11/13 16:27:33	1.3
  @@ -81,9 +81,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       Node context = getArg0AsNode(xctxt);
  
  
  
  1.4       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncNormalizeSpace.java
  
  Index: FuncNormalizeSpace.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncNormalizeSpace.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FuncNormalizeSpace.java	2000/10/30 18:59:38	1.3
  +++ FuncNormalizeSpace.java	2000/11/13 16:27:33	1.4
  @@ -82,9 +82,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String s1 = getArg0AsString(xctxt);
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncNot.java
  
  Index: FuncNot.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncNot.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncNot.java	2000/10/30 18:59:39	1.2
  +++ FuncNot.java	2000/11/13 16:27:35	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return m_arg0.execute(xctxt).bool() ? XBoolean.S_FALSE : XBoolean.S_TRUE;
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncNumber.java
  
  Index: FuncNumber.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncNumber.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncNumber.java	2000/10/30 18:59:39	1.2
  +++ FuncNumber.java	2000/11/13 16:27:35	1.3
  @@ -81,9 +81,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return new XNumber(getArg0AsNumber(xctxt));
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncPosition.java
  
  Index: FuncPosition.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncPosition.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncPosition.java	2000/10/30 18:59:39	1.2
  +++ FuncPosition.java	2000/11/13 16:27:35	1.3
  @@ -117,9 +117,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return new XNumber((double) getPositionInContextNodeList(xctxt));
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncQname.java
  
  Index: FuncQname.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncQname.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncQname.java	2000/10/30 18:59:40	1.2
  +++ FuncQname.java	2000/11/13 16:27:35	1.3
  @@ -83,9 +83,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       Node context = getArg0AsNode(xctxt);
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncRound.java
  
  Index: FuncRound.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncRound.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncRound.java	2000/10/30 18:59:40	1.2
  +++ FuncRound.java	2000/11/13 16:27:35	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return new XNumber(java.lang.Math.floor(m_arg0.execute(xctxt).num()
                                               + 0.5));
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncStartsWith.java
  
  Index: FuncStartsWith.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncStartsWith.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncStartsWith.java	2000/10/30 18:59:40	1.2
  +++ FuncStartsWith.java	2000/11/13 16:27:35	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return m_arg0.execute(xctxt).str().startsWith(m_arg1.execute(xctxt).str())
              ? XBoolean.S_TRUE : XBoolean.S_FALSE;
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncString.java
  
  Index: FuncString.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncString.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncString.java	2000/10/30 18:59:41	1.2
  +++ FuncString.java	2000/11/13 16:27:35	1.3
  @@ -81,9 +81,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return new XString(getArg0AsString(xctxt));
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncStringLength.java
  
  Index: FuncStringLength.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncStringLength.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncStringLength.java	2000/10/30 18:59:41	1.2
  +++ FuncStringLength.java	2000/11/13 16:27:35	1.3
  @@ -81,9 +81,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return new XNumber(getArg0AsString(xctxt).length());
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncSubstring.java
  
  Index: FuncSubstring.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncSubstring.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncSubstring.java	2000/10/30 18:59:42	1.2
  +++ FuncSubstring.java	2000/11/13 16:27:35	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String s1 = m_arg0.execute(xctxt).str();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncSubstringAfter.java
  
  Index: FuncSubstringAfter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncSubstringAfter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncSubstringAfter.java	2000/10/30 18:59:42	1.2
  +++ FuncSubstringAfter.java	2000/11/13 16:27:35	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String s1 = m_arg0.execute(xctxt).str();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncSubstringBefore.java
  
  Index: FuncSubstringBefore.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncSubstringBefore.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncSubstringBefore.java	2000/10/30 18:59:42	1.2
  +++ FuncSubstringBefore.java	2000/11/13 16:27:35	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String s1 = m_arg0.execute(xctxt).str();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncSum.java
  
  Index: FuncSum.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncSum.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncSum.java	2000/10/30 18:59:45	1.2
  +++ FuncSum.java	2000/11/13 16:27:35	1.3
  @@ -81,9 +81,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       NodeIterator nodes = m_arg0.execute(xctxt).nodeset();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncSystemProperty.java
  
  Index: FuncSystemProperty.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncSystemProperty.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncSystemProperty.java	2000/10/30 18:59:45	1.2
  +++ FuncSystemProperty.java	2000/11/13 16:27:35	1.3
  @@ -95,9 +95,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String fullName = m_arg0.execute(xctxt).str();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncTranslate.java
  
  Index: FuncTranslate.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncTranslate.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncTranslate.java	2000/10/30 18:59:46	1.2
  +++ FuncTranslate.java	2000/11/13 16:27:35	1.3
  @@ -79,9 +79,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String theFirstString = m_arg0.execute(xctxt).str();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncTrue.java
  
  Index: FuncTrue.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncTrue.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncTrue.java	2000/10/30 18:59:46	1.2
  +++ FuncTrue.java	2000/11/13 16:27:35	1.3
  @@ -78,9 +78,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return XBoolean.S_TRUE;
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/FuncUnparsedEntityURI.java
  
  Index: FuncUnparsedEntityURI.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncUnparsedEntityURI.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FuncUnparsedEntityURI.java	2000/10/30 18:59:47	1.2
  +++ FuncUnparsedEntityURI.java	2000/11/13 16:27:35	1.3
  @@ -80,9 +80,9 @@
      * @param xctxt The current execution context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       String name = m_arg0.execute(xctxt).str();
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/functions/Function.java
  
  Index: Function.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/Function.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Function.java	2000/10/30 18:59:47	1.2
  +++ Function.java	2000/11/13 16:27:35	1.3
  @@ -113,9 +113,9 @@
      * @param xctxt The execution current context.
      * @return A valid XObject.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       // Programmer's assert.  (And, no, I don't want the method to be abstract).
  
  
  
  1.3       +6 -6      xml-xalan/java/src/org/apache/xpath/functions/FunctionDef1Arg.java
  
  Index: FunctionDef1Arg.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FunctionDef1Arg.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FunctionDef1Arg.java	2000/10/30 18:59:49	1.2
  +++ FunctionDef1Arg.java	2000/11/13 16:27:35	1.3
  @@ -77,10 +77,10 @@
      *
      * NEEDSDOC (getArg0AsNode) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     protected Node getArg0AsNode(XPathContext xctxt)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       return (null == m_arg0)
  @@ -96,10 +96,10 @@
      *
      * NEEDSDOC (getArg0AsString) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     protected String getArg0AsString(XPathContext xctxt)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       return (null == m_arg0)
  @@ -115,10 +115,10 @@
      *
      * NEEDSDOC (getArg0AsNumber) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     protected double getArg0AsNumber(XPathContext xctxt)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       return (null == m_arg0)
  
  
  
  1.5       +2 -2      xml-xalan/java/src/org/apache/xpath/objects/XBoolean.java
  
  Index: XBoolean.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XBoolean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XBoolean.java	2000/10/30 19:00:23	1.4
  +++ XBoolean.java	2000/11/13 16:27:45	1.5
  @@ -163,9 +163,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean equals(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean equals(XObject obj2) throws javax.xml.transform.TransformerException
     {
   
       // In order to handle the 'all' semantics of 
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/objects/XBooleanStatic.java
  
  Index: XBooleanStatic.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XBooleanStatic.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XBooleanStatic.java	2000/10/30 19:00:23	1.2
  +++ XBooleanStatic.java	2000/11/13 16:27:45	1.3
  @@ -92,9 +92,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean equals(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean equals(XObject obj2) throws javax.xml.transform.TransformerException
     {
       return m_val == obj2.bool();
     }
  
  
  
  1.8       +14 -14    xml-xalan/java/src/org/apache/xpath/objects/XNodeSet.java
  
  Index: XNodeSet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XNodeSet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XNodeSet.java	2000/11/03 23:28:16	1.7
  +++ XNodeSet.java	2000/11/13 16:27:45	1.8
  @@ -320,10 +320,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public boolean compare(XObject obj2, Comparator comparator)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       boolean result = false;
  @@ -513,9 +513,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean lessThan(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean lessThan(XObject obj2) throws javax.xml.transform.TransformerException
     {
       return compare(obj2, S_LT);
     }
  @@ -527,9 +527,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean lessThanOrEqual(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean lessThanOrEqual(XObject obj2) throws javax.xml.transform.TransformerException
     {
       return compare(obj2, S_LTE);
     }
  @@ -541,9 +541,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean greaterThan(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean greaterThan(XObject obj2) throws javax.xml.transform.TransformerException
     {
       return compare(obj2, S_GT);
     }
  @@ -555,10 +555,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public boolean greaterThanOrEqual(XObject obj2)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return compare(obj2, S_GTE);
     }
  @@ -570,9 +570,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean equals(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean equals(XObject obj2) throws javax.xml.transform.TransformerException
     {
       return compare(obj2, S_EQ);
     }
  @@ -584,9 +584,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean notEquals(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean notEquals(XObject obj2) throws javax.xml.transform.TransformerException
     {
       return compare(obj2, S_NEQ);
     }
  
  
  
  1.6       +2 -2      xml-xalan/java/src/org/apache/xpath/objects/XNumber.java
  
  Index: XNumber.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XNumber.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XNumber.java	2000/10/30 19:00:24	1.5
  +++ XNumber.java	2000/11/13 16:27:45	1.6
  @@ -228,9 +228,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean equals(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean equals(XObject obj2) throws javax.xml.transform.TransformerException
     {
   
       // In order to handle the 'all' semantics of 
  
  
  
  1.6       +28 -28    xml-xalan/java/src/org/apache/xpath/objects/XObject.java
  
  Index: XObject.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XObject.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XObject.java	2000/11/09 19:13:52	1.5
  +++ XObject.java	2000/11/13 16:27:45	1.6
  @@ -106,9 +106,9 @@
      *
      * @return This object.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
       return this;
     }
  @@ -212,9 +212,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public double num() throws org.xml.sax.SAXException
  +  public double num() throws javax.xml.transform.TransformerException
     {
   
       error(XPATHErrorResources.ER_CANT_CONVERT_TO_NUMBER,
  @@ -228,9 +228,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean bool() throws org.xml.sax.SAXException
  +  public boolean bool() throws javax.xml.transform.TransformerException
     {
   
       error(XPATHErrorResources.ER_CANT_CONVERT_TO_NUMBER,
  @@ -312,9 +312,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public NodeIterator nodeset() throws org.xml.sax.SAXException
  +  public NodeIterator nodeset() throws javax.xml.transform.TransformerException
     {
   
       error(XPATHErrorResources.ER_CANT_CONVERT_TO_NODELIST,
  @@ -328,9 +328,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public NodeSet mutableNodeset() throws org.xml.sax.SAXException
  +  public NodeSet mutableNodeset() throws javax.xml.transform.TransformerException
     {
   
       error(XPATHErrorResources.ER_CANT_CONVERT_TO_MUTABLENODELIST,
  @@ -347,10 +347,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public Object castToType(int t, XPathContext support)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       Object result;
  @@ -393,9 +393,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean lessThan(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean lessThan(XObject obj2) throws javax.xml.transform.TransformerException
     {
   
       // In order to handle the 'all' semantics of 
  @@ -416,9 +416,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean lessThanOrEqual(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean lessThanOrEqual(XObject obj2) throws javax.xml.transform.TransformerException
     {
   
       // In order to handle the 'all' semantics of 
  @@ -439,9 +439,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean greaterThan(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean greaterThan(XObject obj2) throws javax.xml.transform.TransformerException
     {
   
       // In order to handle the 'all' semantics of 
  @@ -462,10 +462,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public boolean greaterThanOrEqual(XObject obj2)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       // In order to handle the 'all' semantics of 
  @@ -486,9 +486,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean equals(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean equals(XObject obj2) throws javax.xml.transform.TransformerException
     {
   
       // In order to handle the 'all' semantics of 
  @@ -507,9 +507,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean notEquals(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean notEquals(XObject obj2) throws javax.xml.transform.TransformerException
     {
   
       // In order to handle the 'all' semantics of 
  @@ -527,9 +527,9 @@
      *
      * NEEDSDOC @param msg
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void error(int msg) throws org.xml.sax.SAXException
  +  protected void error(int msg) throws javax.xml.transform.TransformerException
     {
       error(msg, null);
     }
  @@ -541,9 +541,9 @@
      * NEEDSDOC @param msg
      * NEEDSDOC @param args
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  protected void error(int msg, Object[] args) throws org.xml.sax.SAXException
  +  protected void error(int msg, Object[] args) throws javax.xml.transform.TransformerException
     {
   
       String fmsg = XSLMessages.createXPATHMessage(msg, args);
  
  
  
  1.9       +2 -2      xml-xalan/java/src/org/apache/xpath/objects/XRTreeFrag.java
  
  Index: XRTreeFrag.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XRTreeFrag.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XRTreeFrag.java	2000/10/30 19:00:25	1.8
  +++ XRTreeFrag.java	2000/11/13 16:27:45	1.9
  @@ -210,9 +210,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean equals(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean equals(XObject obj2) throws javax.xml.transform.TransformerException
     {
   
       if (XObject.CLASS_NODESET == obj2.getType())
  
  
  
  1.5       +2 -2      xml-xalan/java/src/org/apache/xpath/objects/XString.java
  
  Index: XString.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XString.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XString.java	2000/10/30 19:00:26	1.4
  +++ XString.java	2000/11/13 16:27:45	1.5
  @@ -217,9 +217,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public boolean equals(XObject obj2) throws org.xml.sax.SAXException
  +  public boolean equals(XObject obj2) throws javax.xml.transform.TransformerException
     {
   
       // In order to handle the 'all' semantics of 
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/And.java
  
  Index: And.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/And.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- And.java	2000/10/30 19:00:30	1.2
  +++ And.java	2000/11/13 16:27:49	1.3
  @@ -79,9 +79,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       XObject expr1 = m_left.execute(xctxt);
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Bool.java
  
  Index: Bool.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Bool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Bool.java	2000/10/30 19:00:30	1.2
  +++ Bool.java	2000/11/13 16:27:49	1.3
  @@ -74,9 +74,9 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject operate(XObject right) throws org.xml.sax.SAXException
  +  public XObject operate(XObject right) throws javax.xml.transform.TransformerException
     {
   
       if (XObject.CLASS_BOOLEAN == right.getType())
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Div.java
  
  Index: Div.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Div.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Div.java	2000/10/30 19:00:31	1.2
  +++ Div.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return new XNumber(left.num() / right.num());
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Equals.java
  
  Index: Equals.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Equals.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Equals.java	2000/10/30 19:00:31	1.2
  +++ Equals.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return left.equals(right) ? XBoolean.S_TRUE : XBoolean.S_FALSE;
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Gt.java
  
  Index: Gt.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Gt.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Gt.java	2000/10/30 19:00:32	1.2
  +++ Gt.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return left.greaterThan(right) ? XBoolean.S_TRUE : XBoolean.S_FALSE;
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Gte.java
  
  Index: Gte.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Gte.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Gte.java	2000/10/30 19:00:32	1.2
  +++ Gte.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return left.greaterThanOrEqual(right)
              ? XBoolean.S_TRUE : XBoolean.S_FALSE;
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Lt.java
  
  Index: Lt.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Lt.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Lt.java	2000/10/30 19:00:33	1.2
  +++ Lt.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return left.lessThan(right) ? XBoolean.S_TRUE : XBoolean.S_FALSE;
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Lte.java
  
  Index: Lte.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Lte.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Lte.java	2000/10/30 19:00:33	1.2
  +++ Lte.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return left.lessThanOrEqual(right) ? XBoolean.S_TRUE : XBoolean.S_FALSE;
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Minus.java
  
  Index: Minus.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Minus.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Minus.java	2000/10/30 19:00:34	1.2
  +++ Minus.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return new XNumber(left.num() - right.num());
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Mod.java
  
  Index: Mod.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Mod.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Mod.java	2000/10/30 19:00:35	1.2
  +++ Mod.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return new XNumber(left.num() % right.num());
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Mult.java
  
  Index: Mult.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Mult.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Mult.java	2000/10/30 19:00:35	1.2
  +++ Mult.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return new XNumber(left.num() * right.num());
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Neg.java
  
  Index: Neg.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Neg.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Neg.java	2000/10/30 19:00:36	1.2
  +++ Neg.java	2000/11/13 16:27:49	1.3
  @@ -74,9 +74,9 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject operate(XObject right) throws org.xml.sax.SAXException
  +  public XObject operate(XObject right) throws javax.xml.transform.TransformerException
     {
       return new XNumber(-right.num());
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/NotEquals.java
  
  Index: NotEquals.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/NotEquals.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NotEquals.java	2000/10/30 19:00:36	1.2
  +++ NotEquals.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return (left.notEquals(right)) ? XBoolean.S_TRUE : XBoolean.S_FALSE;
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Number.java
  
  Index: Number.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Number.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Number.java	2000/10/30 19:00:37	1.2
  +++ Number.java	2000/11/13 16:27:49	1.3
  @@ -74,9 +74,9 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject operate(XObject right) throws org.xml.sax.SAXException
  +  public XObject operate(XObject right) throws javax.xml.transform.TransformerException
     {
   
       if (XObject.CLASS_NUMBER == right.getType())
  
  
  
  1.3       +4 -4      xml-xalan/java/src/org/apache/xpath/operations/Operation.java
  
  Index: Operation.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Operation.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Operation.java	2000/10/30 19:00:37	1.2
  +++ Operation.java	2000/11/13 16:27:49	1.3
  @@ -97,9 +97,9 @@
      *
      * NEEDSDOC (execute) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       XObject left = m_left.execute(xctxt);
  @@ -117,10 +117,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return null;  // no-op
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Or.java
  
  Index: Or.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Or.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Or.java	2000/10/30 19:00:37	1.2
  +++ Or.java	2000/11/13 16:27:49	1.3
  @@ -79,9 +79,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       XObject expr1 = m_left.execute(xctxt);
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Plus.java
  
  Index: Plus.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Plus.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Plus.java	2000/10/30 19:00:38	1.2
  +++ Plus.java	2000/11/13 16:27:49	1.3
  @@ -75,10 +75,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return new XNumber(left.num() + right.num());
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Quo.java
  
  Index: Quo.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Quo.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Quo.java	2000/10/30 19:00:38	1.2
  +++ Quo.java	2000/11/13 16:27:49	1.3
  @@ -77,10 +77,10 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject operate(XObject left, XObject right)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
       return new XNumber((int) (left.num() / right.num()));
     }
  
  
  
  1.3       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/String.java
  
  Index: String.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/String.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- String.java	2000/10/30 19:00:39	1.2
  +++ String.java	2000/11/13 16:27:49	1.3
  @@ -74,9 +74,9 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject operate(XObject right) throws org.xml.sax.SAXException
  +  public XObject operate(XObject right) throws javax.xml.transform.TransformerException
     {
   
       if (XObject.CLASS_STRING == right.getType())
  
  
  
  1.3       +4 -4      xml-xalan/java/src/org/apache/xpath/operations/UnaryOperation.java
  
  Index: UnaryOperation.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/UnaryOperation.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UnaryOperation.java	2000/10/30 19:00:39	1.2
  +++ UnaryOperation.java	2000/11/13 16:27:49	1.3
  @@ -92,9 +92,9 @@
      *
      * NEEDSDOC (execute) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       XObject right = m_right.execute(xctxt);
  @@ -110,8 +110,8 @@
      *
      * NEEDSDOC (operate) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public abstract XObject operate(XObject right)
  -    throws org.xml.sax.SAXException;
  +    throws javax.xml.transform.TransformerException;
   }
  
  
  
  1.4       +2 -2      xml-xalan/java/src/org/apache/xpath/operations/Variable.java
  
  Index: Variable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/operations/Variable.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Variable.java	2000/10/30 19:00:40	1.3
  +++ Variable.java	2000/11/13 16:27:49	1.4
  @@ -96,9 +96,9 @@
      *
      * NEEDSDOC (execute) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       // Is the variable fetched always the same?
  
  
  
  1.6       +4 -4      xml-xalan/java/src/org/apache/xpath/patterns/AncestorStepPattern.java
  
  Index: AncestorStepPattern.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/patterns/AncestorStepPattern.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AncestorStepPattern.java	2000/10/30 19:00:49	1.5
  +++ AncestorStepPattern.java	2000/11/13 16:27:54	1.6
  @@ -116,9 +116,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       int whatToShow = getWhatToShow();
  @@ -146,10 +146,10 @@
      *
      * NEEDSDOC (executeRelativePathPattern) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject executeRelativePathPattern(XPathContext xctxt)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       XObject score = NodeTest.SCORE_NONE;
  
  
  
  1.4       +2 -2      xml-xalan/java/src/org/apache/xpath/patterns/FunctionPattern.java
  
  Index: FunctionPattern.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/patterns/FunctionPattern.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FunctionPattern.java	2000/10/30 19:00:50	1.3
  +++ FunctionPattern.java	2000/11/13 16:27:54	1.4
  @@ -116,9 +116,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       Node context = xctxt.getCurrentNode();
  
  
  
  1.12      +2 -2      xml-xalan/java/src/org/apache/xpath/patterns/NodeTest.java
  
  Index: NodeTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/patterns/NodeTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- NodeTest.java	2000/10/31 17:04:29	1.11
  +++ NodeTest.java	2000/11/13 16:27:54	1.12
  @@ -341,9 +341,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       if (m_whatToShow == NodeFilter.SHOW_ALL)
  
  
  
  1.14      +10 -10    xml-xalan/java/src/org/apache/xpath/patterns/StepPattern.java
  
  Index: StepPattern.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/patterns/StepPattern.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- StepPattern.java	2000/11/09 02:28:02	1.13
  +++ StepPattern.java	2000/11/13 16:27:54	1.14
  @@ -232,10 +232,10 @@
      *
      * NEEDSDOC (executeStep) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject executeStep(XPathContext xctxt)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       XObject score;
  @@ -340,7 +340,7 @@
           }
         }
       }
  -    catch (org.xml.sax.SAXException se)
  +    catch (javax.xml.transform.TransformerException se)
       {
   
         // TODO: should keep throw sax exception...
  @@ -394,7 +394,7 @@
   
         return count;
       }
  -    catch (org.xml.sax.SAXException se)
  +    catch (javax.xml.transform.TransformerException se)
       {
   
         // TODO: should keep throw sax exception...
  @@ -416,10 +416,10 @@
      *
      * NEEDSDOC (executeRelativePathPattern) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public XObject executeRelativePathPattern(XPathContext xctxt)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       XObject score;
  @@ -456,9 +456,9 @@
      *
      * NEEDSDOC (execute) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       XObject score;
  @@ -487,10 +487,10 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
     public double getMatchScore(XPathContext xctxt, Node context)
  -          throws org.xml.sax.SAXException
  +          throws javax.xml.transform.TransformerException
     {
   
       xctxt.pushCurrentNode(context);
  
  
  
  1.4       +2 -2      xml-xalan/java/src/org/apache/xpath/patterns/UnionPattern.java
  
  Index: UnionPattern.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/patterns/UnionPattern.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UnionPattern.java	2000/10/30 19:00:52	1.3
  +++ UnionPattern.java	2000/11/13 16:27:54	1.4
  @@ -106,9 +106,9 @@
      *
      * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws javax.xml.transform.TransformerException
      */
  -  public XObject execute(XPathContext xctxt) throws org.xml.sax.SAXException
  +  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
     {
   
       XObject bestScore = null;