morten      01/07/20 05:52:18

  Modified:    java/src/org/apache/xalan/xsltc/compiler XSLTC.java
               java/src/org/apache/xalan/xsltc/trax
                        TransformerFactoryImpl.java
  Log:
  Added default error-reporting behaviour for our trax code (error messages
  are dumped to System.err).
  PR:           n/a
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.17      +2 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XSLTC.java
  
  Index: XSLTC.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XSLTC.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- XSLTC.java        2001/07/19 18:48:31     1.16
  +++ XSLTC.java        2001/07/20 12:52:18     1.17
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: XSLTC.java,v 1.16 2001/07/19 18:48:31 morten Exp $
  + * @(#)$Id: XSLTC.java,v 1.17 2001/07/20 12:52:18 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -230,9 +230,8 @@
   
       /**
        * Compiles an XSL stylesheet passed in through an InputStream
  -     * @param input An InputStream that will pass in the stylesheet contents
  +     * @param input An InputSource that will pass in the stylesheet contents
        * @param name The name of the translet class to generate - can be null
  -     * @param url Identifies the original stylesheet location
        * @return 'true' if the compilation was successful
        */
       public boolean compile(InputSource input, String name) {
  
  
  
  1.10      +9 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
  
  Index: TransformerFactoryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TransformerFactoryImpl.java       2001/07/20 11:56:48     1.9
  +++ TransformerFactoryImpl.java       2001/07/20 12:52:18     1.10
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: TransformerFactoryImpl.java,v 1.9 2001/07/20 11:56:48 morten Exp 
$
  + * @(#)$Id: TransformerFactoryImpl.java,v 1.10 2001/07/20 12:52:18 morten 
Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -400,12 +400,18 @@
        final String transletName = xsltc.getClassName();
   
        // Pass compiler warnings to the error listener
  -     passWarningsToListener(xsltc.getWarnings());
  +     if (_errorListener != null)
  +         passWarningsToListener(xsltc.getWarnings());
  +     else
  +         xsltc.printWarnings();
   
        // Check that the transformation went well before returning
        if (bytecodes == null) {
            // Pass compiler errors to the error listener
  -         passErrorsToListener(xsltc.getErrors());
  +         if (_errorListener != null)
  +             passErrorsToListener(xsltc.getErrors());
  +         else
  +             xsltc.printErrors();
            throw new TransformerConfigurationException(COMPILE_ERR);
        }
        return(new TemplatesImpl(bytecodes, transletName));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to