morten      01/07/23 00:39:35

  Modified:    java/src/org/apache/xalan/xsltc/compiler XSLTC.java
  Log:
  Added a small fix to the compiler (XSLTC.java) to make sure that the SAX
  parser reference was not reset prior to compiling the translet.
  PR:           n/a
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.20      +4 -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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XSLTC.java        2001/07/20 20:06:50     1.19
  +++ XSLTC.java        2001/07/23 07:39:35     1.20
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: XSLTC.java,v 1.19 2001/07/20 20:06:50 tmiller Exp $
  + * @(#)$Id: XSLTC.java,v 1.20 2001/07/23 07:39:35 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -152,6 +152,7 @@
        */
       public void init() {
        reset();
  +     _reader = null;
        _classes = new Vector();
       }
       
  @@ -159,7 +160,6 @@
        * Initializes the compiler to produce a new translet
        */
       private void reset() {
  -     _reader = null;
        _nextGType      = DOM.NTYPES;
        _elements       = new Hashtable();
        _attributes     = new Hashtable();
  @@ -249,7 +249,7 @@
       public boolean compile(InputSource input, String name) {
        try {
            // Reset globals in case we're called by compile(Vector v);
  -         reset();   // GTM,Morten- this reset sets _reader back to null
  +         reset();
   
            // The systemId may not be set, so we'll have to check the URL
            String systemId = null; 
  @@ -297,6 +297,7 @@
            _parser.reportError(Constants.FATAL, new ErrorMsg(e.getMessage()));
        }
        finally {
  +         _reader = null; // reset this here to be sure it is not re-used
            return !_parser.errorsFound();
        }
       }
  
  
  

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

Reply via email to