santiagopg    2003/01/10 08:50:51

  Modified:    java/src/org/apache/xalan/xsltc/cmdline Tag: xslt20
                        Compile.java Transform.java
               java/src/org/apache/xalan/xsltc/compiler Tag: xslt20
                        ApplyImports.java ApplyTemplates.java
                        AttributeSet.java AttributeValueTemplate.java
                        BinOpExpr.java BooleanCall.java CastExpr.java
                        CeilingCall.java Choose.java Comment.java
                        ConcatCall.java ContainsCall.java Copy.java
                        DocumentCall.java ElementAvailableCall.java
                        Expression.java Fallback.java FilterExpr.java
                        FloorCall.java FlowList.java ForEach.java
                        FormatNumberCall.java FunctionAvailableCall.java
                        FunctionCall.java GenerateIdCall.java Import.java
                        Include.java KeyCall.java LangCall.java
                        LiteralElement.java LocalNameCall.java
                        LogicalExpr.java Mode.java NameBase.java
                        NameCall.java NamespaceAlias.java
                        NamespaceUriCall.java NotCall.java Number.java
                        NumberCall.java Output.java Param.java Parser.java
                        Predicate.java ProcessingInstructionPattern.java
                        RelationalExpr.java RoundCall.java Sort.java
                        StartsWithCall.java Step.java StepPattern.java
                        StringCall.java StringLengthCall.java
                        Stylesheet.java SymbolTable.java
                        SyntaxTreeNode.java Template.java TestSeq.java
                        Text.java TopLevelElement.java UnaryOpExpr.java
                        UnionPathExpr.java UnparsedEntityUriCall.java
                        UnsupportedElement.java UseAttributeSets.java
                        Variable.java VariableBase.java Whitespace.java
                        XSLTC.java XslAttribute.java XslElement.java
                        xpath.cup
               java/src/org/apache/xalan/xsltc/compiler/util Tag: xslt20
                        AttributeSetMethodGenerator.java ErrorMessages.java
                        ErrorMessages_no.java MethodType.java
                        MultiHashtable.java NamedMethodGenerator.java
                        RtMethodGenerator.java
               java/src/org/apache/xalan/xsltc/trax Tag: xslt20
                        TransformerFactoryImpl.java
  Log:
  Eliminated the use of synchronized container classes (synchronization
  is redundant as XSLTC is single threaded). This patch is applied only
  to the xslt20 branch.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.11.2.1.2.2 +5 -5      
xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/Compile.java
  
  Index: Compile.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/Compile.java,v
  retrieving revision 1.11.2.1.2.1
  retrieving revision 1.11.2.1.2.2
  diff -u -r1.11.2.1.2.1 -r1.11.2.1.2.2
  --- Compile.java      2 Dec 2002 15:51:15 -0000       1.11.2.1.2.1
  +++ Compile.java      10 Jan 2003 16:50:37 -0000      1.11.2.1.2.2
  @@ -66,7 +66,7 @@
   package org.apache.xalan.xsltc.cmdline;
   
   import java.io.*;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.net.URL;
   
   import org.apache.xalan.xsltc.DOM;
  @@ -171,7 +171,7 @@
            else {
                // Generate a vector containg URLs for all stylesheets specified
                final String[] stylesheetNames = getopt.getCmdArgs();
  -             final Vector   stylesheetVector = new Vector();
  +             final ArrayList   stylesheetArrayList = new ArrayList();
                for (int i = 0; i < stylesheetNames.length; i++) {
                    final String name = stylesheetNames[i];
                    URL url;
  @@ -179,9 +179,9 @@
                        url = new URL(name);
                    else
                        url = (new File(name)).toURL();
  -                 stylesheetVector.addElement(url);
  +                 stylesheetArrayList.add(url);
                }
  -             compileOK = xsltc.compile(stylesheetVector);
  +             compileOK = xsltc.compile(stylesheetArrayList);
            }
   
            // Compile the stylesheet and output class/jar file(s)
  
  
  
  1.20.2.1.2.2 +15 -15    
xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/Transform.java
  
  Index: Transform.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/Transform.java,v
  retrieving revision 1.20.2.1.2.1
  retrieving revision 1.20.2.1.2.2
  diff -u -r1.20.2.1.2.1 -r1.20.2.1.2.2
  --- Transform.java    2 Dec 2002 15:51:15 -0000       1.20.2.1.2.1
  +++ Transform.java    10 Jan 2003 16:50:37 -0000      1.20.2.1.2.2
  @@ -69,7 +69,7 @@
   import java.io.InputStream;
   import java.net.MalformedURLException;
   import java.net.UnknownHostException;
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import javax.xml.parsers.SAXParser;
   import javax.xml.parsers.SAXParserFactory;
  @@ -105,7 +105,7 @@
       private String  _className;
       private String  _jarFileSrc;
       private boolean _isJarFileSpecified = false;
  -    private Vector  _params = null;
  +    private ArrayList  _params = null;
       private boolean _uri, _debug;
       private int     _iterations;
   
  @@ -119,11 +119,11 @@
        _debug = debug;
        _iterations = iterations;
     }
  -  
  +
      public String getFileName(){return _fileName;}
      public String getClassName(){return _className;}
   
  -    public void setParameters(Vector params) {
  +    public void setParameters(ArrayList params) {
        _params = params;
       }
   
  @@ -132,10 +132,10 @@
        // information, attempts to add the jarfile to the CLASSPATH
        // were successful via System.setProperty, but the effects
        // were not visible to the running JVM. For now we add jarfile
  -     // to CLASSPATH in the wrapper script that calls this program. 
  +     // to CLASSPATH in the wrapper script that calls this program.
        _isJarFileSpecified = flag;
        // TODO verify jarFile exists...
  -     _jarFileSrc = jarFile;  
  +     _jarFileSrc = jarFile;
       }
   
       private Class loadTranslet(String name) throws ClassNotFoundException {
  @@ -154,7 +154,7 @@
   
       private void doTransform() {
        try {
  -         
  +
            final Class clazz = loadTranslet(_className);
            final Translet translet = (Translet)clazz.newInstance();
   
  @@ -181,7 +181,7 @@
            catch (SAXException e) {
                // quitely ignored
            }
  -         
  +
            // Create a DTD monitor and pass it to the XMLReader object
            final DTDMonitor dtdMonitor = new DTDMonitor(reader);
            AbstractTranslet _translet = (AbstractTranslet)translet;
  @@ -201,12 +201,12 @@
            // Pass global parameters
            int n = _params.size();
            for (int i = 0; i < n; i++) {
  -             Parameter param = (Parameter) _params.elementAt(i);
  +             Parameter param = (Parameter) _params.get(i);
                translet.addParameter(param._name, param._value);
            }
   
            // Transform the document
  -         TransletOutputHandlerFactory tohFactory = 
  +         TransletOutputHandlerFactory tohFactory =
                TransletOutputHandlerFactory.newInstance();
            tohFactory.setOutputType(TransletOutputHandlerFactory.STREAM);
            tohFactory.setEncoding(_translet._encoding);
  @@ -241,7 +241,7 @@
            if (_debug) e.printStackTrace();
            System.err.println(ErrorMsg.getTransletErrorMessage()+
                               e.getMessage());
  -         if (_allowExit) System.exit(-1);        
  +         if (_allowExit) System.exit(-1);
        }
        catch (RuntimeException e) {
            if (_debug) e.printStackTrace();
  @@ -324,7 +324,7 @@
                        _allowExit = false;
                    }
                    else if (args[i].equals("-j")) {
  -                     isJarFileSpecified = true;      
  +                     isJarFileSpecified = true;
                        jarFile = args[++i];
                    }
                    else if (args[i].equals("-e")) {
  @@ -352,13 +352,13 @@
                handler.setJarFileInputSrc(isJarFileSpecified,  jarFile);
   
                // Parse stylesheet parameters
  -             Vector params = new Vector();
  +             ArrayList params = new ArrayList();
                for (i += 2; i < args.length; i++) {
                    final int equal = args[i].indexOf('=');
                    if (equal > 0) {
                        final String name  = args[i].substring(0, equal);
                        final String value = args[i].substring(equal+1);
  -                     params.addElement(new Parameter(name, value));
  +                     params.add(new Parameter(name, value));
                    }
                    else {
                        printUsage();
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.10.2.1.2.1 +6 -6      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ApplyImports.java
  
  Index: ApplyImports.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ApplyImports.java,v
  retrieving revision 1.10.2.1
  retrieving revision 1.10.2.1.2.1
  diff -u -r1.10.2.1 -r1.10.2.1.2.1
  --- ApplyImports.java 14 Aug 2002 19:21:32 -0000      1.10.2.1
  +++ ApplyImports.java 10 Jan 2003 16:50:38 -0000      1.10.2.1.2.1
  @@ -62,8 +62,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.xalan.xsltc.compiler.util.ReferenceType;
  @@ -107,9 +107,9 @@
   
        int min = max;
   
  -     Enumeration templates = root.getContents().elements();
  -     while (templates.hasMoreElements()) {
  -         SyntaxTreeNode child = (SyntaxTreeNode)templates.nextElement();
  +     Iterator templates = root.getContents().iterator();
  +     while (templates.hasNext()) {
  +         SyntaxTreeNode child = (SyntaxTreeNode)templates.next();
            if (child instanceof Template) {
                Stylesheet curr = child.getStylesheet();
                while ((curr != null) && (curr != stylesheet)) {
  
  
  
  1.14.2.1.2.2 +8 -8      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ApplyTemplates.java
  
  Index: ApplyTemplates.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ApplyTemplates.java,v
  retrieving revision 1.14.2.1.2.1
  retrieving revision 1.14.2.1.2.2
  diff -u -r1.14.2.1.2.1 -r1.14.2.1.2.2
  --- ApplyTemplates.java       2 Dec 2002 15:51:16 -0000       1.14.2.1.2.1
  +++ ApplyTemplates.java       10 Jan 2003 16:50:38 -0000      1.14.2.1.2.2
  @@ -63,8 +63,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   
   import javax.xml.parsers.*;
   
  @@ -152,12 +152,12 @@
        final int current = methodGen.getLocalIndex("current");
   
        // check if sorting nodes is required
  -     final Vector sortObjects = new Vector();
  -     final Enumeration children = elements();
  -     while (children.hasMoreElements()) {
  -         final Object child = children.nextElement();
  +     final ArrayList sortObjects = new ArrayList();
  +     final Iterator children = iterator();
  +     while (children.hasNext()) {
  +         final Object child = children.next();
            if (child instanceof Sort) {
  -             sortObjects.addElement(child);
  +             sortObjects.add(child);
            }
        }
   
  
  
  
  1.12.2.1.2.2 +11 -11    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AttributeSet.java
  
  Index: AttributeSet.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AttributeSet.java,v
  retrieving revision 1.12.2.1.2.1
  retrieving revision 1.12.2.1.2.2
  diff -u -r1.12.2.1.2.1 -r1.12.2.1.2.2
  --- AttributeSet.java 2 Dec 2002 15:51:16 -0000       1.12.2.1.2.1
  +++ AttributeSet.java 10 Jan 2003 16:50:38 -0000      1.12.2.1.2.2
  @@ -64,8 +64,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   
   import javax.xml.parsers.*;
  @@ -134,10 +134,10 @@
   
        // Parse the contents of this node. All child elements must be
        // <xsl:attribute> elements. Other elements cause an error.
  -     final Vector contents = getContents();
  +     final ArrayList contents = getContents();
        final int count = contents.size();
        for (int i=0; i<count; i++) {
  -         SyntaxTreeNode child = (SyntaxTreeNode)contents.elementAt(i);
  +         SyntaxTreeNode child = (SyntaxTreeNode)contents.get(i);
            if (child instanceof XslAttribute) {
                parser.getSymbolTable().setCurrentNode(child);
                child.parseContents(parser);
  @@ -202,9 +202,9 @@
        if (_useSets != null) _useSets.translate(classGen, methodGen);
   
        // Translate all local attributes
  -     final Enumeration attributes = elements();
  -     while (attributes.hasMoreElements()) {
  -         SyntaxTreeNode element = (SyntaxTreeNode)attributes.nextElement();
  +     final Iterator attributes = iterator();
  +     while (attributes.hasNext()) {
  +         SyntaxTreeNode element = (SyntaxTreeNode)attributes.next();
            if (element instanceof XslAttribute) {
                final XslAttribute attribute = (XslAttribute)element;
                attribute.translate(classGen, methodGen);
  @@ -223,10 +223,10 @@
       public String toString() {
        StringBuffer buf = new StringBuffer("attribute-set: ");
        // Translate all local attributes
  -     final Enumeration attributes = elements();
  -     while (attributes.hasMoreElements()) {
  +     final Iterator attributes = iterator();
  +     while (attributes.hasNext()) {
            final XslAttribute attribute =
  -             (XslAttribute)attributes.nextElement();
  +             (XslAttribute)attributes.next();
            buf.append(attribute);
        }
        return(buf.toString());
  
  
  
  1.6.2.1.2.1 +27 -27    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AttributeValueTemplate.java
  
  Index: AttributeValueTemplate.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AttributeValueTemplate.java,v
  retrieving revision 1.6.2.1
  retrieving revision 1.6.2.1.2.1
  diff -u -r1.6.2.1 -r1.6.2.1.2.1
  --- AttributeValueTemplate.java       14 Aug 2002 19:21:32 -0000      1.6.2.1
  +++ AttributeValueTemplate.java       10 Jan 2003 16:50:38 -0000      
1.6.2.1.2.1
  @@ -63,8 +63,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.Instruction;
   import org.apache.bcel.generic.*;
  @@ -72,8 +72,8 @@
   
   final class AttributeValueTemplate extends AttributeValue {
   
  -    public AttributeValueTemplate(String value, Parser parser, 
  -     SyntaxTreeNode parent) 
  +    public AttributeValueTemplate(String value, Parser parser,
  +     SyntaxTreeNode parent)
       {
        setParent(parent);
        setParser(parser);
  @@ -91,8 +91,8 @@
        int open = start - 2;
        do {
            open = text.indexOf('{', open+2);
  -     } while ((open != -1) && 
  -              (open < (text.length()-1)) && 
  +     } while ((open != -1) &&
  +              (open < (text.length()-1)) &&
                 (text.charAt(open+1) == '{'));
   
        if (open != -1) {
  @@ -100,29 +100,29 @@
            int close = open - 2;
            do {
                close = text.indexOf('}', close+2);
  -         } while ((close != -1) && 
  -                  (close < (text.length()-1)) && 
  +         } while ((close != -1) &&
  +                  (close < (text.length()-1)) &&
                     (text.charAt(close+1) == '}'));
  -         
  +
            // Add literal expressiong before AVT
            if (open > start) {
                str = removeDuplicateBraces(text.substring(start, open));
  -             addElement(new LiteralExpr(str));
  +             add(new LiteralExpr(str));
            }
            // Add the AVT itself
            if (close > open + 1) {
                str = text.substring(open + 1, close);
                str = removeDuplicateBraces(text.substring(open+1,close));
  -             addElement(parser.parseExpression(this, str));
  +             add(parser.parseExpression(this, str));
            }
            // Parse rest of string
            parseAVTemplate(close + 1, text, parser);
  -         
  +
        }
        else if (start < text.length()) {
            // Add literal expression following AVT
            str = removeDuplicateBraces(text.substring(start));
  -         addElement(new LiteralExpr(str));
  +         add(new LiteralExpr(str));
        }
       }
   
  @@ -131,12 +131,12 @@
        int index;
   
        while ((index = result.indexOf("{{")) != -1) {
  -         result = result.substring(0,index) + 
  +         result = result.substring(0,index) +
                result.substring(index+1,result.length());
        }
   
        while ((index = result.indexOf("}}")) != -1) {
  -         result = result.substring(0,index) + 
  +         result = result.substring(0,index) +
                result.substring(index+1,result.length());
        }
   
  @@ -144,12 +144,12 @@
       }
   
       public Type typeCheck(SymbolTable stable) throws TypeCheckError {
  -     final Vector contents = getContents();
  +     final ArrayList contents = getContents();
        final int n = contents.size();
        for (int i = 0; i < n; i++) {
  -         final Expression exp = (Expression)contents.elementAt(i);
  +         final Expression exp = (Expression)contents.get(i);
            if (!exp.typeCheck(stable).identicalTo(Type.String)) {
  -             contents.setElementAt(new CastExpr(exp, Type.String), i);
  +             contents.set(i, new CastExpr(exp, Type.String));
            }
        }
        return _type = Type.String;
  @@ -159,16 +159,16 @@
        final StringBuffer buffer = new StringBuffer("AVT:[");
        final int count = elementCount();
        for (int i = 0; i < count; i++) {
  -         buffer.append(elementAt(i).toString());
  +         buffer.append(get(i).toString());
            if (i < count - 1)
                buffer.append(' ');
        }
        return buffer.append(']').toString();
       }
  -             
  +
       public void translate(ClassGenerator classGen, MethodGenerator 
methodGen) {
        if (elementCount() == 1) {
  -         final Expression exp = (Expression)elementAt(0);
  +         final Expression exp = (Expression)get(0);
            exp.translate(classGen, methodGen);
        }
        else {
  @@ -181,7 +181,7 @@
                                                   "append",
                                                   "(" + STRING_SIG + ")"
                                                   + STRING_BUFFER_SIG));
  -         
  +
            final int toString = cpg.addMethodref(STRING_BUFFER_CLASS,
                                                  "toString",
                                                  "()"+STRING_SIG);
  @@ -189,9 +189,9 @@
            il.append(DUP);
            il.append(new INVOKESPECIAL(initBuffer));
            // StringBuffer is on the stack
  -         final Enumeration enum = elements();
  -         while (enum.hasMoreElements()) {
  -             final Expression exp = (Expression)enum.nextElement();
  +         final Iterator enum = iterator();
  +         while (enum.hasNext()) {
  +             final Expression exp = (Expression)enum.next();
                exp.translate(classGen, methodGen);
                il.append(append);
            }
  @@ -213,7 +213,7 @@
                else
                    i++;
                break;
  -         case '}':   
  +         case '}':
                if (((i+1) == (chars.length)) || (chars[i+1] != '}'))
                    --level;
                else
  
  
  
  1.7.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/BinOpExpr.java
  
  Index: BinOpExpr.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/BinOpExpr.java,v
  retrieving revision 1.7.8.1
  retrieving revision 1.7.8.1.2.1
  diff -u -r1.7.8.1 -r1.7.8.1.2.1
  --- BinOpExpr.java    14 Aug 2002 19:21:32 -0000      1.7.8.1
  +++ BinOpExpr.java    10 Jan 2003 16:50:38 -0000      1.7.8.1.2.1
  @@ -110,11 +110,11 @@
                                              new MethodType(Type.Void,
                                                             tleft, tright)); 
        if (ptype != null) {
  -         final Type arg1 = (Type) ptype.argsType().elementAt(0);
  +         final Type arg1 = (Type) ptype.argsType().get(0);
            if (!arg1.identicalTo(tleft)) {
                _left = new CastExpr(_left, arg1);
            }
  -         final Type arg2 = (Type) ptype.argsType().elementAt(1);
  +         final Type arg2 = (Type) ptype.argsType().get(1);
            if (!arg2.identicalTo(tright)) {
                _right = new CastExpr(_right, arg1);
            }
  
  
  
  1.3.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/BooleanCall.java
  
  Index: BooleanCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/BooleanCall.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.1.2.1
  diff -u -r1.3.8.1 -r1.3.8.1.2.1
  --- BooleanCall.java  14 Aug 2002 19:21:32 -0000      1.3.8.1
  +++ BooleanCall.java  10 Jan 2003 16:50:38 -0000      1.3.8.1.2.1
  @@ -63,7 +63,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
  @@ -72,7 +72,7 @@
   
       private Expression _arg = null;
   
  -    public BooleanCall(QName fname, Vector arguments) {
  +    public BooleanCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
        _arg = argument(0);
       }
  
  
  
  1.14.2.1.2.2 +12 -12    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/CastExpr.java
  
  Index: CastExpr.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/CastExpr.java,v
  retrieving revision 1.14.2.1.2.1
  retrieving revision 1.14.2.1.2.2
  diff -u -r1.14.2.1.2.1 -r1.14.2.1.2.2
  --- CastExpr.java     2 Dec 2002 15:51:16 -0000       1.14.2.1.2.1
  +++ CastExpr.java     10 Jan 2003 16:50:38 -0000      1.14.2.1.2.2
  @@ -149,7 +149,7 @@
       private boolean _typeTest = false;
   
       /**
  -     * Construct a cast expression and check that the conversion is 
  +     * Construct a cast expression and check that the conversion is
        * valid by calling typeCheck().
        */
       public CastExpr(Expression left, Type type) throws TypeCheckError {
  @@ -158,17 +158,17 @@
   
        if ((_left instanceof Step) && (_type == Type.Boolean)) {
            Step step = (Step)_left;
  -         if ((step.getAxis() == Axis.SELF) && (step.getNodeType() != -1)) 
  +         if ((step.getAxis() == Axis.SELF) && (step.getNodeType() != -1))
                _typeTest = true;
        }
  -     
  +
        // check if conversion is valid
        setParser(left.getParser());
        setParent(left.getParent());
        left.setParent(this);
        typeCheck(left.getParser().getSymbolTable());
       }
  -             
  +
       public Expression getExpr() {
        return _left;
       }
  @@ -190,11 +190,11 @@
       }
   
       /**
  -     * Type checking a cast expression amounts to verifying that the  
  -     * type conversion is legal. Cast expressions are created during 
  -     * type checking, but typeCheck() is usually not called on them. 
  +     * Type checking a cast expression amounts to verifying that the
  +     * type conversion is legal. Cast expressions are created during
  +     * type checking, but typeCheck() is usually not called on them.
        * As a result, this method is called from the constructor.
  -     */      
  +     */
       public Type typeCheck(SymbolTable stable) throws TypeCheckError {
        Type tleft = _left.getType();
        if (tleft == null) {
  @@ -209,10 +209,10 @@
        if (InternalTypeMap.maps(tleft, _type) != null) {
            return _type;
        }
  -     throw new TypeCheckError(this); 
  +     throw new TypeCheckError(this);
       }
   
  -    public void translateDesynthesized(ClassGenerator classGen, 
  +    public void translateDesynthesized(ClassGenerator classGen,
                                       MethodGenerator methodGen) {
        FlowList fl;
        final Type ltype = _left.getType();
  @@ -245,7 +245,7 @@
                    }
                }
                else {
  -                 ltype.translateTo(classGen, methodGen, _type);      
  +                 ltype.translateTo(classGen, methodGen, _type);
                }
            }
        }
  
  
  
  1.2.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/CeilingCall.java
  
  Index: CeilingCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/CeilingCall.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- CeilingCall.java  14 Aug 2002 19:21:32 -0000      1.2.8.1
  +++ CeilingCall.java  10 Jan 2003 16:50:38 -0000      1.2.8.1.2.1
  @@ -63,12 +63,12 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   
   final class CeilingCall extends FunctionCall {
  -    public CeilingCall(QName fname, Vector arguments) {
  +    public CeilingCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.6.8.1.2.1 +17 -17    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Choose.java
  
  Index: Choose.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Choose.java,v
  retrieving revision 1.6.8.1
  retrieving revision 1.6.8.1.2.1
  diff -u -r1.6.8.1 -r1.6.8.1.2.1
  --- Choose.java       14 Aug 2002 19:21:32 -0000      1.6.8.1
  +++ Choose.java       10 Jan 2003 16:50:38 -0000      1.6.8.1.2.1
  @@ -64,8 +64,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -88,20 +88,20 @@
        * <xsl:when> elements and default to the <xsl:otherwise> if present.
        */
       public void translate(ClassGenerator classGen, MethodGenerator 
methodGen) {
  -     final Vector whenElements = new Vector();
  +     final ArrayList whenElements = new ArrayList();
        Otherwise otherwise = null;
  -     Enumeration elements = elements();
  +     Iterator elements = iterator();
   
        // These two are for reporting errors only
        ErrorMsg error = null;
        final int line = getLineNumber();
   
        // Traverse all child nodes - must be either When or Otherwise
  -     while (elements.hasMoreElements()) {
  -         Object element = elements.nextElement();
  +     while (elements.hasNext()) {
  +         Object element = elements.next();
            // Add a When child element
            if (element instanceof When) {
  -             whenElements.addElement(element);
  +             whenElements.add(element);
            }
            // Add an Otherwise child element
            else if (element instanceof Otherwise) {
  @@ -135,12 +135,12 @@
        // next element will hold a handle to the beginning of next
        // When/Otherwise if test on current When fails
        BranchHandle nextElement = null;
  -     Vector exitHandles = new Vector();
  +     ArrayList exitHandles = new ArrayList();
        InstructionHandle exit = null;
   
  -     Enumeration whens = whenElements.elements();
  -     while (whens.hasMoreElements()) {
  -         final When when = (When)whens.nextElement();
  +     Iterator whens = whenElements.iterator();
  +     while (whens.hasNext()) {
  +         final When when = (When)whens.next();
            final Expression test = when.getTest();
   
            InstructionHandle truec = il.getEnd();
  @@ -169,8 +169,8 @@
            if (!when.ignore()) when.translateContents(classGen, methodGen);
   
            // goto exit after executing the body of when
  -         exitHandles.addElement(il.append(new GOTO(null)));
  -         if (whens.hasMoreElements() || otherwise != null) {
  +         exitHandles.add(il.append(new GOTO(null)));
  +         if (whens.hasNext() || otherwise != null) {
                nextElement = il.append(new GOTO(null));
                test.backPatchFalseList(nextElement);
            }
  @@ -187,9 +187,9 @@
        }
   
        // now that end is known set targets of exit gotos
  -     Enumeration exitGotos = exitHandles.elements();
  -     while (exitGotos.hasMoreElements()) {
  -         BranchHandle gotoExit = (BranchHandle)exitGotos.nextElement();
  +     Iterator exitGotos = exitHandles.iterator();
  +     while (exitGotos.hasNext()) {
  +         BranchHandle gotoExit = (BranchHandle)exitGotos.next();
            gotoExit.setTarget(exit);
        }
       }
  
  
  
  1.4.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Comment.java
  
  Index: Comment.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Comment.java,v
  retrieving revision 1.4.8.1
  retrieving revision 1.4.8.1.2.1
  diff -u -r1.4.8.1 -r1.4.8.1.2.1
  --- Comment.java      14 Aug 2002 19:21:32 -0000      1.4.8.1
  +++ Comment.java      10 Jan 2003 16:50:38 -0000      1.4.8.1.2.1
  @@ -68,8 +68,8 @@
   
   import org.xml.sax.*;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   
  
  
  
  1.4.8.1.2.1 +4 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ConcatCall.java
  
  Index: ConcatCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ConcatCall.java,v
  retrieving revision 1.4.8.1
  retrieving revision 1.4.8.1.2.1
  diff -u -r1.4.8.1 -r1.4.8.1.2.1
  --- ConcatCall.java   14 Aug 2002 19:21:32 -0000      1.4.8.1
  +++ ConcatCall.java   10 Jan 2003 16:50:38 -0000      1.4.8.1.2.1
  @@ -63,15 +63,15 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.Instruction;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   
   final class ConcatCall extends FunctionCall {
  -    public ConcatCall(QName fname, Vector arguments) {
  +    public ConcatCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.4.8.1.2.1 +4 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ContainsCall.java
  
  Index: ContainsCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ContainsCall.java,v
  retrieving revision 1.4.8.1
  retrieving revision 1.4.8.1.2.1
  diff -u -r1.4.8.1 -r1.4.8.1.2.1
  --- ContainsCall.java 14 Aug 2002 19:21:32 -0000      1.4.8.1
  +++ ContainsCall.java 10 Jan 2003 16:50:38 -0000      1.4.8.1.2.1
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.xalan.xsltc.compiler.util.TypeCheckError;
   import org.apache.xalan.xsltc.compiler.util.ErrorMsg;
  @@ -77,9 +77,9 @@
       private Expression _token = null;
   
       /**
  -     * Create a contains() call - two arguments, both strings
  +     * Create a containsValue() call - two arguments, both strings
        */
  -    public ContainsCall(QName fname, Vector arguments) {
  +    public ContainsCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.7.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Copy.java
  
  Index: Copy.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Copy.java,v
  retrieving revision 1.7.8.1
  retrieving revision 1.7.8.1.2.1
  diff -u -r1.7.8.1 -r1.7.8.1.2.1
  --- Copy.java 14 Aug 2002 19:21:32 -0000      1.7.8.1
  +++ Copy.java 10 Jan 2003 16:50:38 -0000      1.7.8.1.2.1
  @@ -63,8 +63,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   
   import javax.xml.parsers.*;
  
  
  
  1.13.2.1.2.1 +4 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/DocumentCall.java
  
  Index: DocumentCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/DocumentCall.java,v
  retrieving revision 1.13.2.1
  retrieving revision 1.13.2.1.2.1
  diff -u -r1.13.2.1 -r1.13.2.1.2.1
  --- DocumentCall.java 14 Aug 2002 19:21:32 -0000      1.13.2.1
  +++ DocumentCall.java 10 Jan 2003 16:50:39 -0000      1.13.2.1.2.1
  @@ -63,8 +63,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.xalan.xsltc.compiler.util.TypeCheckError;
   import org.apache.xalan.xsltc.compiler.util.ErrorMsg;
  @@ -81,7 +81,7 @@
       /**
        * Default function call constructor
        */
  -    public DocumentCall(QName fname, Vector arguments) {
  +    public DocumentCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.7.2.1.2.2 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ElementAvailableCall.java
  
  Index: ElementAvailableCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ElementAvailableCall.java,v
  retrieving revision 1.7.2.1.2.1
  retrieving revision 1.7.2.1.2.2
  diff -u -r1.7.2.1.2.1 -r1.7.2.1.2.2
  --- ElementAvailableCall.java 2 Dec 2002 15:51:16 -0000       1.7.2.1.2.1
  +++ ElementAvailableCall.java 10 Jan 2003 16:50:39 -0000      1.7.2.1.2.2
  @@ -63,7 +63,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.HashSet;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -71,7 +71,7 @@
   
   final class ElementAvailableCall extends FunctionCall {
   
  -    public ElementAvailableCall(QName fname, Vector arguments) {
  +    public ElementAvailableCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.15.2.1.2.2 +4 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Expression.java
  
  Index: Expression.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Expression.java,v
  retrieving revision 1.15.2.1.2.1
  retrieving revision 1.15.2.1.2.2
  diff -u -r1.15.2.1.2.1 -r1.15.2.1.2.2
  --- Expression.java   2 Dec 2002 15:51:16 -0000       1.15.2.1.2.1
  +++ Expression.java   10 Jan 2003 16:50:39 -0000      1.15.2.1.2.2
  @@ -69,7 +69,7 @@
   import org.apache.xalan.xsltc.compiler.util.ReferenceType;
   import org.apache.xalan.xsltc.compiler.util.*;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.bcel.generic.*;
   
  @@ -232,12 +232,12 @@
       public MethodType lookupPrimop(SymbolTable stable, String op,
                                   MethodType ctype) {
        MethodType result = null;
  -     final Vector primop = stable.lookupPrimop(op);
  +     final ArrayList primop = stable.lookupPrimop(op);
        if (primop != null) {
            final int n = primop.size();
            int minDistance = Integer.MAX_VALUE;
            for (int i = 0; i < n; i++) {
  -             final MethodType ptype = (MethodType) primop.elementAt(i);
  +             final MethodType ptype = (MethodType) primop.get(i);
                // Skip if different arity
                if (ptype.argsCount() != ctype.argsCount()) {
                    continue;
  
  
  
  1.4.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Fallback.java
  
  Index: Fallback.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Fallback.java,v
  retrieving revision 1.4.8.1
  retrieving revision 1.4.8.1.2.1
  diff -u -r1.4.8.1 -r1.4.8.1.2.1
  --- Fallback.java     14 Aug 2002 19:21:32 -0000      1.4.8.1
  +++ Fallback.java     10 Jan 2003 16:50:39 -0000      1.4.8.1.2.1
  @@ -62,8 +62,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   
   import javax.xml.parsers.*;
  
  
  
  1.6.8.1.2.1 +16 -15    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FilterExpr.java
  
  Index: FilterExpr.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FilterExpr.java,v
  retrieving revision 1.6.8.1
  retrieving revision 1.6.8.1.2.1
  diff -u -r1.6.8.1 -r1.6.8.1.2.1
  --- FilterExpr.java   14 Aug 2002 19:21:32 -0000      1.6.8.1
  +++ FilterExpr.java   10 Jan 2003 16:50:39 -0000      1.6.8.1.2.1
  @@ -64,8 +64,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.xalan.xsltc.compiler.util.ReferenceType;
   import org.apache.bcel.generic.*;
  @@ -73,9 +73,9 @@
   
   class FilterExpr extends Expression {
       private Expression   _primary;
  -    private final Vector _predicates;
  +    private final ArrayList _predicates;
   
  -    public FilterExpr(Expression primary, Vector predicates) {
  +    public FilterExpr(Expression primary, ArrayList predicates) {
        _primary = primary;
        _predicates = predicates;
        primary.setParent(this);
  @@ -94,20 +94,20 @@
        if (_predicates != null) {
            final int n = _predicates.size();
            for (int i = 0; i < n; i++) {
  -             final Expression exp = (Expression)_predicates.elementAt(i);
  +             final Expression exp = (Expression)_predicates.get(i);
                exp.setParser(parser);
                exp.setParent(this);
            }
        }
       }
  -    
  +
       public String toString() {
        return "filter-expr(" + _primary + ", " + _predicates + ")";
       }
   
       /**
  -     * Type check a FilterParentPath. If the filter is not a node-set add a 
  -     * cast to node-set only if it is of reference type. This type coercion 
  +     * Type check a FilterParentPath. If the filter is not a node-set add a
  +     * cast to node-set only if it is of reference type. This type coercion
        * is needed for expressions like $x where $x is a parameter reference.
        */
       public Type typeCheck(SymbolTable stable) throws TypeCheckError {
  @@ -124,12 +124,12 @@
   
        int n = _predicates.size();
        for (int i = 0; i < n; i++) {
  -         Expression pred = (Expression)_predicates.elementAt(i);
  +         Expression pred = (Expression)_predicates.get(i);
            pred.typeCheck(stable);
        }
  -     return _type = Type.NodeSet;    
  +     return _type = Type.NodeSet;
       }
  -     
  +
       /**
        * Translate a filter expression by pushing the appropriate iterator
        * onto the stack.
  @@ -149,7 +149,7 @@
        * Each predicate is translated by constructing an instance
        * of <code>CurrentNodeListIterator</code> which is initialized from
        * another iterator (recursive call), a filter and a closure
  -     * (call to translate on the predicate) and "this". 
  +     * (call to translate on the predicate) and "this".
        */
       public void translatePredicates(ClassGenerator classGen,
                                    MethodGenerator methodGen) {
  @@ -166,12 +166,13 @@
                                                  CURRENT_NODE_LIST_FILTER_SIG +
                                                  NODE_SIG+TRANSLET_SIG+")V");
   
  -         Predicate predicate = (Predicate)_predicates.lastElement();
  +         Predicate predicate =
  +               (Predicate)_predicates.get(_predicates.size() - 1);
            _predicates.remove(predicate);
   
            if (predicate.isNthPositionFilter()) {
                final int start = cpg.addInterfaceMethodref(NODE_ITERATOR,
  -                                                         "setStartNode", 
  +                                                         "setStartNode",
                                                            "(I)"+
                                                            NODE_ITERATOR_SIG);
                final int reset = cpg.addInterfaceMethodref(NODE_ITERATOR,
  
  
  
  1.2.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FloorCall.java
  
  Index: FloorCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FloorCall.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- FloorCall.java    14 Aug 2002 19:21:32 -0000      1.2.8.1
  +++ FloorCall.java    10 Jan 2003 16:50:39 -0000      1.2.8.1.2.1
  @@ -63,12 +63,12 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   
   final class FloorCall extends FunctionCall {
  -    public FloorCall(QName fname, Vector arguments) {
  +    public FloorCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.3.2.1.2.2 +11 -11    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FlowList.java
  
  Index: FlowList.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FlowList.java,v
  retrieving revision 1.3.2.1.2.1
  retrieving revision 1.3.2.1.2.2
  diff -u -r1.3.2.1.2.1 -r1.3.2.1.2.2
  --- FlowList.java     2 Dec 2002 15:51:16 -0000       1.3.2.1.2.1
  +++ FlowList.java     10 Jan 2003 16:50:39 -0000      1.3.2.1.2.2
  @@ -63,20 +63,20 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Iterator;
   import org.apache.bcel.generic.*;
   
   public final class FlowList {
  -    private Vector _elements;
  +    private ArrayList _elements;
   
       public FlowList() {
        _elements = null;
       }
   
       public FlowList(InstructionHandle bh) {
  -     _elements = new Vector();
  -     _elements.addElement(bh);
  +     _elements = new ArrayList();
  +     _elements.add(bh);
       }
   
       public FlowList(FlowList list) {
  @@ -85,9 +85,9 @@
   
       public FlowList add(InstructionHandle bh) {
        if (_elements == null) {
  -         _elements = new Vector();
  +         _elements = new ArrayList();
        }
  -     _elements.addElement(bh);
  +     _elements.add(bh);
        return this;
       }
   
  @@ -96,11 +96,11 @@
            _elements = right._elements;
        }
        else {
  -         final Vector temp = right._elements;
  +         final ArrayList temp = right._elements;
            if (temp != null) {
                final int n = temp.size();
                for (int i = 0; i < n; i++) {
  -                 _elements.addElement(temp.elementAt(i));
  +                 _elements.add(temp.get(i));
                }
            }
        }
  @@ -114,7 +114,7 @@
        if (_elements != null) {
            final int n = _elements.size();
            for (int i = 0; i < n; i++) {
  -             BranchHandle bh = (BranchHandle)_elements.elementAt(i);
  +             BranchHandle bh = (BranchHandle)_elements.get(i);
                bh.setTarget(target);
            }
            _elements.clear();          // avoid backpatching more than once
  @@ -142,7 +142,7 @@
            final InstructionHandle newIh = (InstructionHandle) newIter.next();
   
            for (int i = 0; i < n; i++) {
  -             if (_elements.elementAt(i) == oldIh) {
  +             if (_elements.get(i) == oldIh) {
                    result.add(newIh);
                }
            }
  
  
  
  1.12.8.1.2.2 +9 -9      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ForEach.java
  
  Index: ForEach.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ForEach.java,v
  retrieving revision 1.12.8.1.2.1
  retrieving revision 1.12.8.1.2.2
  diff -u -r1.12.8.1.2.1 -r1.12.8.1.2.2
  --- ForEach.java      2 Dec 2002 15:51:16 -0000       1.12.8.1.2.1
  +++ ForEach.java      10 Jan 2003 16:50:39 -0000      1.12.8.1.2.2
  @@ -64,8 +64,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   
   import javax.xml.parsers.*;
   
  @@ -131,12 +131,12 @@
        il.append(methodGen.loadIterator());
                
        // Collect sort objects associated with this instruction
  -     final Vector sortObjects = new Vector();
  -     Enumeration children = elements();
  -     while (children.hasMoreElements()) {
  -         final Object child = children.nextElement();
  +     final ArrayList sortObjects = new ArrayList();
  +     Iterator children = iterator();
  +     while (children.hasNext()) {
  +         final Object child = children.next();
            if (child instanceof Sort) {
  -             sortObjects.addElement(child);
  +             sortObjects.add(child);
            }
        }
   
  @@ -221,7 +221,7 @@
                                   MethodGenerator methodGen) {
        final int n = elementCount();
        for (int i = 0; i < n; i++) {
  -         final Object child = getContents().elementAt(i);
  +         final Object child = getContents().get(i);
            if (child instanceof Variable) {
                Variable var = (Variable)child;
                var.initialize(classGen, methodGen);
  
  
  
  1.8.2.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FormatNumberCall.java
  
  Index: FormatNumberCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FormatNumberCall.java,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.1.2.1
  diff -u -r1.8.2.1 -r1.8.2.1.2.1
  --- FormatNumberCall.java     14 Aug 2002 19:21:32 -0000      1.8.2.1
  +++ FormatNumberCall.java     10 Jan 2003 16:50:39 -0000      1.8.2.1.2.1
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -76,7 +76,7 @@
       private Expression _name;
       private QName      _resolvedQName = null;
   
  -    public FormatNumberCall(QName fname, Vector arguments) {
  +    public FormatNumberCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
        _value = argument(0);
        _format = argument(1);
  
  
  
  1.11.2.1.2.2 +4 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FunctionAvailableCall.java
  
  Index: FunctionAvailableCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FunctionAvailableCall.java,v
  retrieving revision 1.11.2.1.2.1
  retrieving revision 1.11.2.1.2.2
  diff -u -r1.11.2.1.2.1 -r1.11.2.1.2.2
  --- FunctionAvailableCall.java        2 Dec 2002 15:51:16 -0000       
1.11.2.1.2.1
  +++ FunctionAvailableCall.java        10 Jan 2003 16:50:39 -0000      
1.11.2.1.2.2
  @@ -63,7 +63,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.lang.reflect.Modifier;
   import java.lang.reflect.Method;
   import org.apache.xalan.xsltc.compiler.util.Type;
  @@ -84,9 +84,9 @@
        * a list of arguments where the arguments must be instances of 
        * LiteralExpression. 
        */
  -    public FunctionAvailableCall(QName fname, Vector arguments) {
  +    public FunctionAvailableCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
  -     _arg = (Expression)arguments.elementAt(0);
  +     _arg = (Expression)arguments.get(0);
        _type = null; 
   
           if (_arg instanceof LiteralExpr) {
  
  
  
  1.22.2.1.2.2 +129 -129  
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FunctionCall.java
  
  Index: FunctionCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FunctionCall.java,v
  retrieving revision 1.22.2.1.2.1
  retrieving revision 1.22.2.1.2.2
  diff -u -r1.22.2.1.2.1 -r1.22.2.1.2.2
  --- FunctionCall.java 2 Dec 2002 15:51:16 -0000       1.22.2.1.2.1
  +++ FunctionCall.java 10 Jan 2003 16:50:40 -0000      1.22.2.1.2.2
  @@ -66,9 +66,9 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  -import java.util.Hashtable;
  +import java.util.ArrayList;
  +import java.util.Iterator;
  +import java.util.HashMap;
   
   import java.lang.reflect.*;
   
  @@ -92,15 +92,15 @@
       // Name of this function call
       private QName  _fname;
       // Arguments to this function call (might not be any)
  -    private final Vector _arguments;
  +    private final ArrayList _arguments;
       // Empty argument list, used for certain functions
  -    private final static Vector EMPTY_ARG_LIST = new Vector(0);
  +    private final static ArrayList EMPTY_ARG_LIST = new ArrayList(0);
   
       // Valid namespaces for Java function-call extension
  -    protected final static String EXT_XSLTC = 
  +    protected final static String EXT_XSLTC =
        TRANSLET_URI;
   
  -    protected final static String JAVA_EXT_XSLTC = 
  +    protected final static String JAVA_EXT_XSLTC =
        EXT_XSLTC + "/java";
   
       protected final static String EXT_XALAN =
  @@ -111,13 +111,13 @@
   
       protected final static String JAVA_EXT_XALAN_OLD =
        "http://xml.apache.org/xslt/java";;
  -     
  +
       protected final static String EXSLT_COMMON =
        "http://exslt.org/common";;
   
       protected final static String EXSLT_MATH =
        "http://exslt.org/math";;
  -     
  +
       protected final static String EXSLT_SETS =
        "http://exslt.org/sets";;
   
  @@ -126,16 +126,16 @@
   
       protected final static String EXSLT_STRINGS =
        "http://exslt.org/strings";;
  -     
  +
       // Namespace format constants
       protected final static int NAMESPACE_FORMAT_JAVA = 0;
       protected final static int NAMESPACE_FORMAT_CLASS = 1;
       protected final static int NAMESPACE_FORMAT_PACKAGE = 2;
       protected final static int NAMESPACE_FORMAT_CLASS_OR_PACKAGE = 3;
  -     
  +
       // Namespace format
       private int _namespace_format = NAMESPACE_FORMAT_JAVA;
  -        
  +
       /**
        * Stores reference to object for non-static Java calls
        */
  @@ -151,8 +151,8 @@
       // Encapsulates all unsupported external function calls
       private boolean    unresolvedExternal;
   
  -    // If FunctionCall is a external java constructor 
  -    private boolean     _isExtConstructor = false; 
  +    // If FunctionCall is a external java constructor
  +    private boolean     _isExtConstructor = false;
   
       // If the java method is static
       private boolean    _isStatic = false;
  @@ -161,22 +161,22 @@
       private static final MultiHashtable _internal2Java = new 
MultiHashtable();
   
       // Legal conversions between Java and internal types.
  -    private static final Hashtable _java2Internal = new Hashtable();
  -    
  +    private static final HashMap _java2Internal = new HashMap();
  +
       // The mappings between EXSLT extension namespaces and implementation 
classes
  -    private static final Hashtable _extensionNamespaceTable = new 
Hashtable();
  +    private static final HashMap _extensionNamespaceTable = new HashMap();
   
       // Extension functions that are implemented in BasisLibrary
  -    private static final Hashtable _extensionFunctionTable = new Hashtable();
  +    private static final HashMap _extensionFunctionTable = new HashMap();
       /**
        * inner class to used in internal2Java mappings, contains
        * the Java type and the distance between the internal type and
  -     * the Java type. 
  +     * the Java type.
        */
       static class JavaType {
        public Class  type;
        public int distance;
  -     
  +
        public JavaType(Class type, int distance){
            this.type = type;
            this.distance = distance;
  @@ -184,7 +184,7 @@
        public boolean equals(Object query){
            return query.equals(type);
        }
  -    } 
  +    }
   
       /**
        * Defines 2 conversion tables:
  @@ -216,7 +216,7 @@
            _internal2Java.put(Type.Int, new JavaType(Double.TYPE, 4));
   
            _internal2Java.put(Type.Real, new JavaType(objectClass, 8));
  -         _internal2Java.put(Type.Real, new JavaType(Character.TYPE, 7)); 
  +         _internal2Java.put(Type.Real, new JavaType(Character.TYPE, 7));
            _internal2Java.put(Type.Real, new JavaType(Byte.TYPE, 6));
            _internal2Java.put(Type.Real, new JavaType(Short.TYPE, 5));
            _internal2Java.put(Type.Real, new JavaType(Integer.TYPE, 4));
  @@ -226,20 +226,20 @@
            _internal2Java.put(Type.Real, new JavaType(Double.TYPE, 0));
   
            _internal2Java.put(Type.String, new JavaType(objectClass, 1));
  -         _internal2Java.put(Type.String, new JavaType(stringClass, 0)); 
  +         _internal2Java.put(Type.String, new JavaType(stringClass, 0));
   
  -         _internal2Java.put(Type.Node, new JavaType(nodeClass, 0));  
  +         _internal2Java.put(Type.Node, new JavaType(nodeClass, 0));
            _internal2Java.put(Type.Node, new JavaType(nodeListClass, 1));
            _internal2Java.put(Type.Node, new JavaType(objectClass, 2));
            _internal2Java.put(Type.Node, new JavaType(stringClass, 3));
   
            _internal2Java.put(Type.NodeSet, new JavaType(Integer.TYPE, 10));
  -         _internal2Java.put(Type.NodeSet, new JavaType(stringClass, 3)); 
  +         _internal2Java.put(Type.NodeSet, new JavaType(stringClass, 3));
            _internal2Java.put(Type.NodeSet, new JavaType(objectClass, 2));
  -         _internal2Java.put(Type.NodeSet, new JavaType(nodeClass, 1)); 
  -         _internal2Java.put(Type.NodeSet, new JavaType(nodeListClass,0)); 
  +         _internal2Java.put(Type.NodeSet, new JavaType(nodeClass, 1));
  +         _internal2Java.put(Type.NodeSet, new JavaType(nodeListClass,0));
   
  -         _internal2Java.put(Type.ResultTree, new JavaType(nodeClass, 1)); 
  +         _internal2Java.put(Type.ResultTree, new JavaType(nodeClass, 1));
            _internal2Java.put(Type.ResultTree, new JavaType(nodeListClass, 0));
            _internal2Java.put(Type.ResultTree, new JavaType(objectClass, 2));
            _internal2Java.put(Type.ResultTree, new JavaType(stringClass, 3));
  @@ -248,9 +248,9 @@
            _internal2Java.put(Type.Reference, new JavaType(objectClass,0));
   
            // Possible conversions between Java and internal types
  -         _java2Internal.put(Boolean.TYPE, Type.Boolean); 
  +         _java2Internal.put(Boolean.TYPE, Type.Boolean);
            _java2Internal.put(Void.TYPE, Type.Void);
  -         _java2Internal.put(Character.TYPE, Type.Real); 
  +         _java2Internal.put(Character.TYPE, Type.Real);
            _java2Internal.put(Byte.TYPE, Type.Real);
            _java2Internal.put(Short.TYPE, Type.Real);
            _java2Internal.put(Integer.TYPE, Type.Real);
  @@ -265,7 +265,7 @@
            // Conversions from org.w3c.dom.Node/NodeList to internal NodeSet
            _java2Internal.put(nodeListClass, Type.NodeSet);
            _java2Internal.put(nodeClass, Type.NodeSet);
  -         
  +
            // Initialize the extension namespace table
            _extensionNamespaceTable.put(EXT_XALAN, 
"org.apache.xalan.lib.Extensions");
            _extensionNamespaceTable.put(EXSLT_COMMON, 
"org.apache.xalan.lib.ExsltCommon");
  @@ -273,18 +273,18 @@
            _extensionNamespaceTable.put(EXSLT_SETS, 
"org.apache.xalan.lib.ExsltSets");
            _extensionNamespaceTable.put(EXSLT_DATETIME, 
"org.apache.xalan.lib.ExsltDatetime");
            _extensionNamespaceTable.put(EXSLT_STRINGS, 
"org.apache.xalan.lib.ExsltStrings");
  -         
  +
            // Initialize the extension function table
            _extensionFunctionTable.put(EXSLT_COMMON + ":nodeSet", "nodeset");
  -         _extensionFunctionTable.put(EXSLT_COMMON + ":objectType", 
"objectType");        
  +         _extensionFunctionTable.put(EXSLT_COMMON + ":objectType", 
"objectType");
            _extensionFunctionTable.put(EXT_XALAN + ":nodeset", "nodeset");
        }
        catch (ClassNotFoundException e) {
            System.err.println(e);
        }
       }
  -             
  -    public FunctionCall(QName fname, Vector arguments) {
  +
  +    public FunctionCall(QName fname, ArrayList arguments) {
        _fname = fname;
        _arguments = arguments;
        _type = null;
  @@ -303,17 +303,17 @@
        if (_arguments != null) {
            final int n = _arguments.size();
            for (int i = 0; i < n; i++) {
  -             final Expression exp = (Expression)_arguments.elementAt(i);
  +             final Expression exp = (Expression)_arguments.get(i);
                exp.setParser(parser);
                exp.setParent(this);
            }
        }
       }
   
  -    public String getClassNameFromUri(String uri) 
  -    {   
  +    public String getClassNameFromUri(String uri)
  +    {
           String className = (String)_extensionNamespaceTable.get(uri);
  -    
  +
           if (className != null)
               return className;
           else {
  @@ -332,7 +332,7 @@
               else {
                        int index = uri.lastIndexOf('/');
                        return (index > 0) ? uri.substring(index+1) : uri;
  -            }      
  +            }
           }
       }
   
  @@ -340,8 +340,8 @@
        * Type check a function call. Since different type conversions apply,
        * type checking is different for standard and external (Java) functions.
        */
  -    public Type typeCheck(SymbolTable stable) 
  -     throws TypeCheckError 
  +    public Type typeCheck(SymbolTable stable)
  +     throws TypeCheckError
       {
           if (_type != null) return _type;
   
  @@ -359,7 +359,7 @@
        else {
            try {
                _className = getClassNameFromUri(namespace);
  -               
  +
                   final int pos = local.lastIndexOf('.');
                if (pos > 0) {
                    _isStatic = true;
  @@ -371,27 +371,27 @@
                        _namespace_format = NAMESPACE_FORMAT_JAVA;
                        _className = local.substring(0, pos);
                    }
  -                       
  +
                    _fname = new QName(namespace, null, local.substring(pos + 
1));
                }
                else {
                    if (_className != null && _className.length() > 0) {
  -                     try {                           
  +                     try {
                            TransletLoader loader = new TransletLoader();
  -                         _clazz = loader.loadClass(_className);              
                
  +                         _clazz = loader.loadClass(_className);
                            _namespace_format = NAMESPACE_FORMAT_CLASS;
                        }
                        catch (ClassNotFoundException e) {
  -                         _namespace_format = NAMESPACE_FORMAT_PACKAGE;       
  +                         _namespace_format = NAMESPACE_FORMAT_PACKAGE;
                        }
                    }
                    else
                        _namespace_format = NAMESPACE_FORMAT_JAVA;
  -                     
  +
                    if (local.indexOf('-') > 0) {
                        local = replaceDash(local);
                    }
  -                 
  +
                    String extFunction = 
(String)_extensionFunctionTable.get(namespace + ":" + local);
                    if (extFunction != null) {
                        _fname = new QName(null, null, extFunction);
  @@ -400,9 +400,9 @@
                    else
                        _fname = new QName(namespace, null, local);
                }
  -               
  +
                return typeCheckExternal(stable);
  -         } 
  +         }
            catch (TypeCheckError e) {
                ErrorMsg errorMsg = e.getErrorMsg();
                if (errorMsg == null) {
  @@ -417,25 +417,25 @@
   
       /**
        * Type check a call to a standard function. Insert CastExprs when 
needed.
  -     * If as a result of the insertion of a CastExpr a type check error is 
  +     * If as a result of the insertion of a CastExpr a type check error is
        * thrown, then catch it and re-throw it with a new "this".
        */
       public Type typeCheckStandard(SymbolTable stable) throws TypeCheckError {
        _fname.clearNamespace();        // HACK!!!
   
        final int n = _arguments.size();
  -     final Vector argsType = typeCheckArgs(stable);
  +     final ArrayList argsType = typeCheckArgs(stable);
        final MethodType args = new MethodType(Type.Void, argsType);
        final MethodType ptype =
            lookupPrimop(stable, _fname.getLocalPart(), args);
   
        if (ptype != null) {
            for (int i = 0; i < n; i++) {
  -             final Type argType = (Type) ptype.argsType().elementAt(i);
  -             final Expression exp = (Expression)_arguments.elementAt(i);
  +             final Type argType = (Type) ptype.argsType().get(i);
  +             final Expression exp = (Expression)_arguments.get(i);
                if (!argType.identicalTo(exp.getType())) {
                    try {
  -                     _arguments.setElementAt(new CastExpr(exp, argType), i);
  +                     _arguments.set(i, new CastExpr(exp, argType));
                    }
                    catch (TypeCheckError e) {
                        throw new TypeCheckError(this); // invalid conversion
  @@ -448,28 +448,28 @@
        throw new TypeCheckError(this);
       }
   
  -   
  +
   
       public Type typeCheckConstructor(SymbolTable stable) throws 
TypeCheckError{
  -        final Vector constructors = findConstructors();
  +        final ArrayList constructors = findConstructors();
        if (constructors == null) {
               // Constructor not found in this class
  -            throw new TypeCheckError(ErrorMsg.CONSTRUCTOR_NOT_FOUND, 
  +            throw new TypeCheckError(ErrorMsg.CONSTRUCTOR_NOT_FOUND,
                _className);
  -        
  +
        }
   
        final int nConstructors = constructors.size();
        final int nArgs = _arguments.size();
  -     final Vector argsType = typeCheckArgs(stable);
  +     final ArrayList argsType = typeCheckArgs(stable);
   
  -     // Try all constructors 
  +     // Try all constructors
        int bestConstrDistance = Integer.MAX_VALUE;
        _type = null;                   // reset
        for (int j, i = 0; i < nConstructors; i++) {
            // Check if all parameters to this constructor can be converted
  -         final Constructor constructor = 
  -             (Constructor)constructors.elementAt(i);
  +         final Constructor constructor =
  +             (Constructor)constructors.get(i);
            final Class[] paramTypes = constructor.getParameterTypes();
   
            Class extType = null;
  @@ -477,7 +477,7 @@
            for (j = 0; j < nArgs; j++) {
                // Convert from internal (translet) type to external (Java) type
                extType = paramTypes[j];
  -             final Type intType = (Type)argsType.elementAt(j);
  +             final Type intType = (Type)argsType.get(j);
                Object match = _internal2Java.maps(intType, extType);
                if (match != null) {
                    currConstrDistance += ((JavaType)match).distance;
  @@ -486,14 +486,14 @@
                    // no mapping available
                    currConstrDistance = Integer.MAX_VALUE;
                    break;
  -             } 
  +             }
            }
   
            if (j == nArgs && currConstrDistance < bestConstrDistance ) {
                _chosenConstructor = constructor;
                _isExtConstructor = true;
                bestConstrDistance = currConstrDistance;
  -             
  +
                if (_clazz != null)
                  _type = new ObjectType(_clazz);
                else
  @@ -519,7 +519,7 @@
       public Type typeCheckExternal(SymbolTable stable) throws TypeCheckError {
        int nArgs = _arguments.size();
        final String name = _fname.getLocalPart();
  -    
  +
        // check if function is a contructor 'new'
        if (_fname.getLocalPart().equals("new")) {
            return typeCheckConstructor(stable);
  @@ -527,32 +527,32 @@
        // check if we are calling an instance method
        else {
            boolean hasThisArgument = false;
  -       
  +
            if (nArgs == 0)
                _isStatic = true;
  -       
  +
            if (!_isStatic) {
                if (_namespace_format == NAMESPACE_FORMAT_JAVA
                    || _namespace_format == NAMESPACE_FORMAT_PACKAGE)
                    hasThisArgument = true;
  -               
  -             Expression firstArg = (Expression)_arguments.elementAt(0);
  +
  +             Expression firstArg = (Expression)_arguments.get(0);
                Type firstArgType = (Type)firstArg.typeCheck(stable);
  -             
  +
                if (_namespace_format == NAMESPACE_FORMAT_CLASS
                    && firstArgType instanceof ObjectType
                    && _clazz != null
                    && 
_clazz.isAssignableFrom(((ObjectType)firstArgType).getJavaClass()))
                    hasThisArgument = true;
  -             
  +
                if (hasThisArgument) {
  -                 _thisArgument = (Expression) _arguments.elementAt(0);
  +                 _thisArgument = (Expression) _arguments.get(0);
                    _arguments.remove(0); nArgs--;
                    if (firstArgType instanceof ObjectType) {
                        _className = ((ObjectType) 
firstArgType).getJavaClassName();
                    }
                    else
  -                     throw new 
TypeCheckError(ErrorMsg.NO_JAVA_FUNCT_THIS_REF, name);                
  +                     throw new 
TypeCheckError(ErrorMsg.NO_JAVA_FUNCT_THIS_REF, name);
                }
            }
            else if (_className.length() == 0) {
  @@ -571,9 +571,9 @@
                return _type = Type.Int;        // use "Int" as "unknown"
            }
        }
  -     
  -     final Vector methods = findMethods();
  -     
  +
  +     final ArrayList methods = findMethods();
  +
        if (methods == null) {
            // Method not found in this class
            throw new TypeCheckError(ErrorMsg.METHOD_NOT_FOUND_ERR, _className 
+ "." + name);
  @@ -581,25 +581,25 @@
   
        Class extType = null;
        final int nMethods = methods.size();
  -     final Vector argsType = typeCheckArgs(stable);
  +     final ArrayList argsType = typeCheckArgs(stable);
   
  -     // Try all methods to identify the best fit 
  +     // Try all methods to identify the best fit
        int bestMethodDistance  = Integer.MAX_VALUE;
  -     _type = null;                       // reset internal type 
  +     _type = null;                       // reset internal type
        for (int j, i = 0; i < nMethods; i++) {
   
            // Check if all paramteters to this method can be converted
  -         final Method method = (Method)methods.elementAt(i);
  +         final Method method = (Method)methods.get(i);
            final Class[] paramTypes = method.getParameterTypes();
  -         
  +
            int currMethodDistance = 0;
            for (j = 0; j < nArgs; j++) {
                // Convert from internal (translet) type to external (Java) type
                extType = paramTypes[j];
  -             final Type intType = (Type)argsType.elementAt(j);
  +             final Type intType = (Type)argsType.get(j);
                Object match = _internal2Java.maps(intType, extType);
                if (match != null) {
  -                 currMethodDistance += ((JavaType)match).distance; 
  +                 currMethodDistance += ((JavaType)match).distance;
                }
                else {
                    // no mapping available
  @@ -607,7 +607,7 @@
                    // Allow a Reference type to match any external (Java) type 
at
                    // the moment. The real type checking is performed at 
runtime.
                    if (intType instanceof ReferenceType) {
  -                    currMethodDistance += 1; 
  +                    currMethodDistance += 1;
                    }
                    else if (intType instanceof ObjectType) {
                        ObjectType object = (ObjectType)intType;
  @@ -630,11 +630,11 @@
            if (j == nArgs) {
                  // Check if the return type can be converted
                  extType = method.getReturnType();
  -             
  +
                  _type = (Type) _java2Internal.get(extType);
                  if (_type == null) {
                      _type = new ObjectType(extType);
  -               }             
  +               }
   
                  // Use this method if all parameters & return type match
                  if (_type != null && currMethodDistance < bestMethodDistance) 
{
  @@ -643,7 +643,7 @@
                  }
            }
        }
  -     
  +
        // It is an error if the chosen method is an instance menthod but we 
don't
        // have a this argument.
        if (_chosenMethod != null && _thisArgument == null &&
  @@ -664,30 +664,30 @@
       /**
        * Type check the actual arguments of this function call.
        */
  -    public Vector typeCheckArgs(SymbolTable stable) throws TypeCheckError {
  -     final Vector result = new Vector();
  -     final Enumeration e = _arguments.elements();    
  -     while (e.hasMoreElements()) {
  -         final Expression exp = (Expression)e.nextElement();
  -         result.addElement(exp.typeCheck(stable));
  +    public ArrayList typeCheckArgs(SymbolTable stable) throws TypeCheckError 
{
  +     final ArrayList result = new ArrayList();
  +     final Iterator e = _arguments.iterator();
  +     while (e.hasNext()) {
  +         final Expression exp = (Expression)e.next();
  +         result.add(exp.typeCheck(stable));
        }
        return result;
       }
   
       protected final Expression argument(int i) {
  -     return (Expression)_arguments.elementAt(i);
  +     return (Expression)_arguments.get(i);
       }
   
       protected final Expression argument() {
        return argument(0);
       }
  -    
  +
       protected final int argumentCount() {
        return _arguments.size();
       }
   
       protected final void setArgument(int i, Expression exp) {
  -     _arguments.setElementAt(exp, i);
  +     _arguments.set(i, exp);
       }
   
       /**
  @@ -695,7 +695,7 @@
        * Update true/false-lists.
        */
       public void translateDesynthesized(ClassGenerator classGen,
  -                                    MethodGenerator methodGen) 
  +                                    MethodGenerator methodGen)
       {
        Type type = Type.Boolean;
        if (_chosenMethodType != null)
  @@ -761,10 +761,10 @@
            il.append(new INVOKESTATIC(index));
        }
        else if (_isExtConstructor) {
  -         final String clazz = 
  +         final String clazz =
                _chosenConstructor.getDeclaringClass().getName();
            Class[] paramTypes = _chosenConstructor.getParameterTypes();
  -         
  +
            il.append(new NEW(cpg.addClass(_className)));
            il.append(InstructionConstants.DUP);
   
  @@ -785,14 +785,14 @@
            buffer.append("V");
   
            index = cpg.addMethodref(clazz,
  -                                  "<init>", 
  +                                  "<init>",
                                     buffer.toString());
            il.append(new INVOKESPECIAL(index));
   
            // Convert the return type back to our internal type
  -         (Type.Object).translateFrom(classGen, methodGen, 
  +         (Type.Object).translateFrom(classGen, methodGen,
                                _chosenConstructor.getDeclaringClass());
  -         
  +
        }
        // Invoke function calls that are handled in separate classes
        else {
  @@ -802,7 +802,7 @@
            // Push "this" if it is an instance method
            if (_thisArgument != null) {
                _thisArgument.translate(classGen, methodGen);
  -         }       
  +         }
   
            for (int i = 0; i < n; i++) {
                final Expression exp = argument(i);
  @@ -825,7 +825,7 @@
                                     buffer.toString());
            il.append(_thisArgument != null ? (InvokeInstruction) new 
INVOKEVIRTUAL(index) :
                          (InvokeInstruction) new INVOKESTATIC(index));
  - 
  +
            // Convert the return type back to our internal type
            _type.translateFrom(classGen, methodGen,
                                _chosenMethod.getReturnType());
  @@ -851,9 +851,9 @@
        * after stripping its namespace or <code>null</code>
        * if no such methods exist.
        */
  -    private Vector findMethods() {
  -       
  -       Vector result = null;
  +    private ArrayList findMethods() {
  +
  +       ArrayList result = null;
          final String namespace = _fname.getNamespace();
   
          if (_className != null && _className.length() > 0) {
  @@ -862,7 +862,7 @@
              if (_clazz == null) {
                TransletLoader loader = new TransletLoader();
                _clazz = loader.loadClass(_className);
  -             
  +
                if (_clazz == null) {
                  final ErrorMsg msg =
                        new ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR, _className);
  @@ -881,9 +881,9 @@
                    && methods[i].getParameterTypes().length == nArgs)
                {
                  if (result == null) {
  -                 result = new Vector();
  +                 result = new ArrayList();
                  }
  -               result.addElement(methods[i]);
  +               result.add(methods[i]);
                }
              }
            }
  @@ -900,8 +900,8 @@
        * after stripping its namespace or <code>null</code>
        * if no such methods exist.
        */
  -    private Vector findConstructors() {
  -        Vector result = null;
  +    private ArrayList findConstructors() {
  +        ArrayList result = null;
           final String namespace = _fname.getNamespace();
   
           final int nArgs = _arguments.size();
  @@ -909,11 +909,11 @@
             if (_clazz == null) {
               TransletLoader loader = new TransletLoader();
               _clazz = loader.loadClass(_className);
  -          
  +
               if (_clazz == null) {
                 final ErrorMsg msg = new 
ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR, _className);
                 getParser().reportError(Constants.ERROR, msg);
  -            }          
  +            }
             }
   
             final Constructor[] constructors = _clazz.getConstructors();
  @@ -925,9 +925,9 @@
                     constructors[i].getParameterTypes().length == nArgs)
                 {
                   if (result == null) {
  -                  result = new Vector();
  +                  result = new ArrayList();
                   }
  -                result.addElement(constructors[i]);
  +                result.add(constructors[i]);
                 }
             }
           }
  @@ -935,7 +935,7 @@
             final ErrorMsg msg = new ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR, 
_className);
             getParser().reportError(Constants.ERROR, msg);
           }
  -            
  +
           return result;
       }
   
  @@ -1019,27 +1019,27 @@
        }
        return sb.append(")V").toString();
       }
  -    
  +
       /**
        * Return the signature of the current method
        */
  -    private String getMethodSignature(Vector argsType) {
  +    private String getMethodSignature(ArrayList argsType) {
        final StringBuffer buf = new StringBuffer(_className);
           buf.append('.').append(_fname.getLocalPart()).append('(');
  -       
  -     int nArgs = argsType.size();        
  +
  +     int nArgs = argsType.size();
        for (int i = 0; i < nArgs; i++) {
  -         final Type intType = (Type)argsType.elementAt(i);
  +         final Type intType = (Type)argsType.get(i);
            buf.append(intType.toString());
            if (i < nArgs - 1) buf.append(", ");
        }
  -       
  +
        buf.append(')');
        return buf.toString();
       }
   
       /**
  -     * To support EXSLT extensions, convert names with dash to allowable 
Java names: 
  +     * To support EXSLT extensions, convert names with dash to allowable 
Java names:
        * e.g., convert abc-xyz to abcXyz.
        * Note: dashes only appear in middle of an EXSLT function or element 
name.
        */
  @@ -1055,5 +1055,5 @@
           }
           return buff.toString();
       }
  -      
  +
   }
  
  
  
  1.2.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/GenerateIdCall.java
  
  Index: GenerateIdCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/GenerateIdCall.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- GenerateIdCall.java       14 Aug 2002 19:21:32 -0000      1.2.8.1
  +++ GenerateIdCall.java       10 Jan 2003 16:50:40 -0000      1.2.8.1.2.1
  @@ -63,12 +63,12 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   
   final class GenerateIdCall extends FunctionCall {
  -    public GenerateIdCall(QName fname, Vector arguments) {
  +    public GenerateIdCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.16.2.1.2.2 +6 -6      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Import.java
  
  Index: Import.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Import.java,v
  retrieving revision 1.16.2.1.2.1
  retrieving revision 1.16.2.1.2.2
  diff -u -r1.16.2.1.2.1 -r1.16.2.1.2.2
  --- Import.java       2 Dec 2002 15:51:16 -0000       1.16.2.1.2.1
  +++ Import.java       10 Jan 2003 16:50:40 -0000      1.16.2.1.2.2
  @@ -68,7 +68,7 @@
   import java.io.File;
   import java.net.URL;
   import java.net.MalformedURLException;
  -import java.util.Enumeration;
  +import java.util.Iterator;
   
   import javax.xml.parsers.*;
   
  @@ -142,10 +142,10 @@
            parser.setCurrentStylesheet(_imported);
            _imported.parseContents(parser);
   
  -         final Enumeration elements = _imported.elements();
  +         final Iterator elements = _imported.iterator();
            final Stylesheet topStylesheet = parser.getTopLevelStylesheet();
  -         while (elements.hasMoreElements()) {
  -             final Object element = elements.nextElement();
  +         while (elements.hasNext()) {
  +             final Object element = elements.next();
                if (element instanceof TopLevelElement) {
                    if (element instanceof Variable) {
                        topStylesheet.addVariable((Variable) element);
  @@ -154,7 +154,7 @@
                        topStylesheet.addParam((Param) element);
                    }
                    else {
  -                     topStylesheet.addElement((TopLevelElement) element);
  +                     topStylesheet.add((TopLevelElement) element);
                    }
                }
            }
  
  
  
  1.19.2.1.2.2 +6 -6      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Include.java
  
  Index: Include.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Include.java,v
  retrieving revision 1.19.2.1.2.1
  retrieving revision 1.19.2.1.2.2
  diff -u -r1.19.2.1.2.1 -r1.19.2.1.2.2
  --- Include.java      2 Dec 2002 15:51:16 -0000       1.19.2.1.2.1
  +++ Include.java      10 Jan 2003 16:50:40 -0000      1.19.2.1.2.2
  @@ -68,7 +68,7 @@
   import java.io.FileNotFoundException;
   import java.net.URL;
   import java.net.MalformedURLException;
  -import java.util.Enumeration;
  +import java.util.Iterator;
   
   import javax.xml.parsers.*;
   
  @@ -161,10 +161,10 @@
            parser.setCurrentStylesheet(_included);
            _included.parseContents(parser);
   
  -         final Enumeration elements = _included.elements();
  +         final Iterator elements = _included.iterator();
            final Stylesheet topStylesheet = parser.getTopLevelStylesheet();
  -         while (elements.hasMoreElements()) {
  -             final Object element = elements.nextElement();
  +         while (elements.hasNext()) {
  +             final Object element = elements.next();
                if (element instanceof TopLevelElement) {
                    if (element instanceof Variable) {
                        topStylesheet.addVariable((Variable) element);
  @@ -173,7 +173,7 @@
                        topStylesheet.addParam((Param) element);
                    }
                    else {
  -                     topStylesheet.addElement((TopLevelElement) element);
  +                     topStylesheet.add((TopLevelElement) element);
                    }
                }
            }
  
  
  
  1.8.2.1.2.2 +9 -9      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/KeyCall.java
  
  Index: KeyCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/KeyCall.java,v
  retrieving revision 1.8.2.1.2.1
  retrieving revision 1.8.2.1.2.2
  diff -u -r1.8.2.1.2.1 -r1.8.2.1.2.2
  --- KeyCall.java      2 Dec 2002 15:51:16 -0000       1.8.2.1.2.1
  +++ KeyCall.java      10 Jan 2003 16:50:40 -0000      1.8.2.1.2.2
  @@ -63,7 +63,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -103,7 +103,7 @@
        * @param fname The function name (should be 'key' or 'id')
        * @param arguments A vector containing the arguments the the function
        */
  -    public KeyCall(QName fname, Vector arguments) {
  +    public KeyCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
        switch(argumentCount()) {
        case 1:
  @@ -133,11 +133,11 @@
        // Run type check on the key name (first argument) - must be a string,
        // and if it is not it must be converted to one using string() rules.
        if (_name != null) {
  -         final Type nameType = _name.typeCheck(stable); 
  +         final Type nameType = _name.typeCheck(stable);
   
            if (_name instanceof LiteralExpr) {
                final LiteralExpr literal = (LiteralExpr) _name;
  -             _resolvedQName = 
  +             _resolvedQName =
                    getParser().getQNameIgnoreDefaultNs(literal.getValue());
            }
            else if (nameType instanceof StringType == false) {
  @@ -155,7 +155,7 @@
        _valueType = _value.typeCheck(stable);
   
        if (_valueType != Type.NodeSet && _valueType != Type.ResultTree
  -             && _valueType != Type.String) 
  +             && _valueType != Type.String)
        {
            _value = new CastExpr(_value, Type.String);
        }
  @@ -229,7 +229,7 @@
        final int indexConstructor = cpg.addMethodref(TRANSLET_CLASS,
                                                      "createKeyIndex",
                                                      "()"+KEY_INDEX_SIG);
  -     
  +
        // This local variable holds the index/iterator we will return
        final LocalVariableGen returnIndex =
            methodGen.addLocalVariable("returnIndex",
  @@ -284,7 +284,7 @@
   
            // Push returnIndex on stack to prepare for call to merge()
            il.append(new ALOAD(returnIndex.getIndex()));
  -         
  +
            // Lookup index using the string value from the current node
            il.append(new ALOAD(searchIndex.getIndex()));
            il.append(DUP);
  @@ -300,7 +300,7 @@
   
            // Call to returnIndex.merge(searchIndex);
            il.append(new INVOKEVIRTUAL(merge));
  -             
  +
            // Go on with next node in the 2nd parameter node-set
            nextNode.setTarget(il.append(methodGen.loadIterator()));
            il.append(methodGen.nextNode());
  
  
  
  1.2.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LangCall.java
  
  Index: LangCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LangCall.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- LangCall.java     14 Aug 2002 19:21:32 -0000      1.2.8.1
  +++ LangCall.java     10 Jan 2003 16:50:40 -0000      1.2.8.1.2.1
  @@ -62,7 +62,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -76,7 +76,7 @@
        * Get the parameters passed to function:
        *   lang(string)
        */
  -    public LangCall(QName fname, Vector arguments) {
  +    public LangCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
        _lang = argument(0);
       }
  
  
  
  1.18.2.1.2.1 +38 -38    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LiteralElement.java
  
  Index: LiteralElement.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LiteralElement.java,v
  retrieving revision 1.18.2.1
  retrieving revision 1.18.2.1.2.1
  diff -u -r1.18.2.1 -r1.18.2.1.2.1
  --- LiteralElement.java       14 Aug 2002 19:21:33 -0000      1.18.2.1
  +++ LiteralElement.java       10 Jan 2003 16:50:40 -0000      1.18.2.1.2.1
  @@ -64,9 +64,9 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Hashtable;
  -import java.util.Enumeration;
  -import java.util.Vector;
  +import java.util.HashMap;
  +import java.util.Iterator;
  +import java.util.ArrayList;
   
   import javax.xml.parsers.*;
   
  @@ -80,8 +80,8 @@
   
       private String _name;
       private LiteralElement _literalElemParent;
  -    private Vector _attributeElements = null;
  -    private Hashtable _accessedPrefixes = null;
  +    private ArrayList _attributeElements = null;
  +    private HashMap _accessedPrefixes = null;
   
       private final static String XMLNS_STRING = "xmlns";
   
  @@ -91,7 +91,7 @@
       public QName getName() {
        return _qname;
       }
  - 
  +
       /**
        * Displays the contents of this literal element
        */
  @@ -131,7 +131,7 @@
   
        // Check if we have any declared namesaces
        if (_accessedPrefixes == null) {
  -         _accessedPrefixes = new Hashtable();
  +         _accessedPrefixes = new HashMap();
        }
        else {
            if (!declared) {
  @@ -140,7 +140,7 @@
                if (old != null) {
                    if (old.equals(uri))
                        return;
  -                 else 
  +                 else
                        prefix = stable.generateNamespacePrefix();
                }
            }
  @@ -166,7 +166,7 @@
            prefix = Constants.EMPTYSTRING;
        else if (prefix.equals(XMLNS_STRING))
            return(XMLNS_STRING);
  -     
  +
        // Check if we must translate the prefix
        final String alternative = stable.lookupPrefixAlias(prefix);
        if (alternative != null) {
  @@ -193,7 +193,7 @@
        */
       public void addAttribute(SyntaxTreeNode attribute) {
        if (_attributeElements == null) {
  -         _attributeElements = new Vector(2);
  +         _attributeElements = new ArrayList(2);
        }
        _attributeElements.add(attribute);
       }
  @@ -203,9 +203,9 @@
        */
       public void setFirstAttribute(SyntaxTreeNode attribute) {
        if (_attributeElements == null) {
  -         _attributeElements = new Vector(2);
  +         _attributeElements = new ArrayList(2);
        }
  -     _attributeElements.insertElementAt(attribute,0);
  +     _attributeElements.add(0, attribute);
       }
   
       /**
  @@ -217,8 +217,8 @@
        if (_attributeElements != null) {
            final int count = _attributeElements.size();
            for (int i = 0; i < count; i++) {
  -             SyntaxTreeNode node = 
  -                 (SyntaxTreeNode)_attributeElements.elementAt(i);
  +             SyntaxTreeNode node =
  +                 (SyntaxTreeNode)_attributeElements.get(i);
                node.typeCheck(stable);
            }
        }
  @@ -231,15 +231,15 @@
        * and assembles a list of all prefixes that (for the given node) maps
        * to _ANY_ namespace URI. Used by literal result elements to determine
        */
  -    public Enumeration getNamespaceScope(SyntaxTreeNode node) {
  -     Hashtable all = new Hashtable();
  -     
  +    public Iterator getNamespaceScope(SyntaxTreeNode node) {
  +     HashMap all = new HashMap();
  +
        while (node != null) {
  -         Hashtable mapping = node.getPrefixMapping();
  +         HashMap mapping = node.getPrefixMapping();
            if (mapping != null) {
  -             Enumeration prefixes = mapping.keys();
  -             while (prefixes.hasMoreElements()) {
  -                 String prefix = (String)prefixes.nextElement();
  +             Iterator prefixes = mapping.keySet().iterator();
  +             while (prefixes.hasNext()) {
  +                 String prefix = (String)prefixes.next();
                    if (!all.containsKey(prefix)) {
                        all.put(prefix, mapping.get(prefix));
                    }
  @@ -247,7 +247,7 @@
            }
            node = node.getParent();
        }
  -     return(all.keys());
  +     return(all.keySet().iterator());
       }
   
       /**
  @@ -298,7 +298,7 @@
                    prefix == null && qname.getLocalPart().equals("xmlns") ||
                    uri != null && uri.equals(XSLT_URI))
                {
  -                 continue;   
  +                 continue;
                }
   
                // Handle all other literal attributes
  @@ -312,9 +312,9 @@
   
        // Register all namespaces that are in scope, except for those that
        // are listed in the xsl:stylesheet element's *-prefixes attributes
  -     final Enumeration include = getNamespaceScope(this);
  -     while (include.hasMoreElements()) {
  -         final String prefix = (String)include.nextElement();
  +     final Iterator include = getNamespaceScope(this);
  +     while (include.hasNext()) {
  +         final String prefix = (String)include.next();
            if (!prefix.equals("xml")) {
                final String uri = lookupNamespace(prefix);
                if (uri != null && !stable.isExcludedNamespace(uri)) {
  @@ -365,7 +365,7 @@
   
        // The value of an attribute may depend on a (sibling) variable
        for (int i = 0; i < elementCount(); i++) {
  -         final SyntaxTreeNode item = (SyntaxTreeNode) elementAt(i);
  +         final SyntaxTreeNode item = (SyntaxTreeNode) get(i);
            if (item instanceof Variable) {
                item.translate(classGen, methodGen);
                removeElement(item);    // avoid translating it twice
  @@ -375,14 +375,14 @@
        // Compile code to emit namespace attributes
        if (_accessedPrefixes != null) {
            boolean declaresDefaultNS = false;
  -         Enumeration e = _accessedPrefixes.keys();
  +         Iterator e = _accessedPrefixes.keySet().iterator();
   
  -         while (e.hasMoreElements()) {
  -             final String prefix = (String)e.nextElement();
  +         while (e.hasNext()) {
  +             final String prefix = (String)e.next();
                final String uri = (String)_accessedPrefixes.get(prefix);
   
  -             if (uri != Constants.EMPTYSTRING || 
  -                     prefix != Constants.EMPTYSTRING) 
  +             if (uri != Constants.EMPTYSTRING ||
  +                     prefix != Constants.EMPTYSTRING)
                {
                    if (prefix == Constants.EMPTYSTRING) {
                        declaresDefaultNS = true;
  @@ -394,12 +394,12 @@
                }
            }
   
  -         /* 
  +         /*
             * If our XslElement parent redeclares the default NS, and this
             * element doesn't, it must be redeclared one more time.
             */
            if (!declaresDefaultNS && (_parent instanceof XslElement)
  -                 && ((XslElement) _parent).declaresDefaultNS()) 
  +                 && ((XslElement) _parent).declaresDefaultNS())
            {
                il.append(methodGen.loadHandler());
                il.append(new PUSH(cpg, Constants.EMPTYSTRING));
  @@ -412,12 +412,12 @@
        if (_attributeElements != null) {
            final int count = _attributeElements.size();
            for (int i = 0; i < count; i++) {
  -             SyntaxTreeNode node = 
  -                 (SyntaxTreeNode)_attributeElements.elementAt(i);
  +             SyntaxTreeNode node =
  +                 (SyntaxTreeNode)_attributeElements.get(i);
                node.translate(classGen, methodGen);
            }
        }
  -     
  +
        // Compile code to emit attributes and child elements
        translateContents(classGen, methodGen);
   
  
  
  
  1.3.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LocalNameCall.java
  
  Index: LocalNameCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LocalNameCall.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.1.2.1
  diff -u -r1.3.8.1 -r1.3.8.1.2.1
  --- LocalNameCall.java        14 Aug 2002 19:21:33 -0000      1.3.8.1
  +++ LocalNameCall.java        10 Jan 2003 16:50:40 -0000      1.3.8.1.2.1
  @@ -62,7 +62,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -80,7 +80,7 @@
       /**
        * Handles calls with one parameter (either node or node-set).
        */
  -    public LocalNameCall(QName fname, Vector arguments) {
  +    public LocalNameCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.10.2.1.2.2 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LogicalExpr.java
  
  Index: LogicalExpr.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LogicalExpr.java,v
  retrieving revision 1.10.2.1.2.1
  retrieving revision 1.10.2.1.2.2
  diff -u -r1.10.2.1.2.1 -r1.10.2.1.2.2
  --- LogicalExpr.java  2 Dec 2002 15:51:16 -0000       1.10.2.1.2.1
  +++ LogicalExpr.java  10 Jan 2003 16:50:40 -0000      1.10.2.1.2.2
  @@ -163,11 +163,11 @@
        // Yes, the operation is supported
        if (haveType != null) {
            // Check if left-hand side operand must be type casted
  -         Type arg1 = (Type)haveType.argsType().elementAt(0);
  +         Type arg1 = (Type)haveType.argsType().get(0);
            if (!arg1.identicalTo(tleft))
                _left = new CastExpr(_left, arg1);
            // Check if right-hand side operand must be type casted
  -         Type arg2 = (Type) haveType.argsType().elementAt(1);
  +         Type arg2 = (Type) haveType.argsType().get(1);
            if (!arg2.identicalTo(tright))
                _right = new CastExpr(_right, arg1);
            // Return the result type for the operator we will use
  
  
  
  1.24.2.1.2.2 +141 -141  
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Mode.java
  
  Index: Mode.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Mode.java,v
  retrieving revision 1.24.2.1.2.1
  retrieving revision 1.24.2.1.2.2
  diff -u -r1.24.2.1.2.1 -r1.24.2.1.2.2
  --- Mode.java 2 Dec 2002 15:51:17 -0000       1.24.2.1.2.1
  +++ Mode.java 10 Jan 2003 16:50:40 -0000      1.24.2.1.2.2
  @@ -67,9 +67,9 @@
   
   import java.util.Iterator;
   import java.util.HashSet;
  -import java.util.Vector;
  -import java.util.Hashtable;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.HashMap;
  +import java.util.Iterator;
   
   import org.apache.bcel.util.*;
   import org.apache.bcel.generic.*;
  @@ -79,8 +79,8 @@
   import org.apache.xalan.xsltc.compiler.util.Type;
   
   /**
  - * Mode gathers all the templates belonging to a given mode; 
  - * it is responsible for generating an appropriate 
  + * Mode gathers all the templates belonging to a given mode;
  + * it is responsible for generating an appropriate
    * applyTemplates + (mode name) method in the translet.
    */
   final class Mode implements Constants {
  @@ -93,7 +93,7 @@
       /**
        * A reference to the stylesheet object that owns this mode.
        */
  -    private final Stylesheet _stylesheet; 
  +    private final Stylesheet _stylesheet;
   
       /**
        * The name of the method in which this mode is compiled.
  @@ -103,12 +103,12 @@
       /**
        * A vector of all the templates in this mode.
        */
  -    private Vector _templates; 
  +    private ArrayList _templates;
   
       /**
        * Group for patterns with node()-type kernel and child axis.
        */
  -    private Vector _childNodeGroup = null;
  +    private ArrayList _childNodeGroup = null;
   
       /**
        * Test sequence for patterns with node()-type kernel and child axis.
  @@ -118,17 +118,17 @@
       /**
        * Group for patterns with node()-type kernel and attribute axis.
        */
  -    private Vector _attribNodeGroup = null;
  +    private ArrayList _attribNodeGroup = null;
   
       /**
        * Test sequence for patterns with node()-type kernel and attribute axis.
        */
       private TestSeq _attribNodeTestSeq = null;
  -    
  +
       /**
        * Group for patterns with id() or key()-type kernel.
        */
  -    private Vector _idxGroup = null;
  +    private ArrayList _idxGroup = null;
   
       /**
        * Test sequence for patterns with id() or key()-type kernel.
  @@ -138,7 +138,7 @@
       /**
        * Group for patterns with any other kernel type.
        */
  -    private Vector[] _patternGroups;
  +    private ArrayList[] _patternGroups;
   
       /**
        * Test sequence for patterns with any other kernel type.
  @@ -146,32 +146,32 @@
       private TestSeq[] _testSeq;
   
       /**
  -     * A mapping between patterns and instruction lists used by 
  -     * test sequences to avoid compiling the same pattern multiple 
  -     * times. Note that patterns whose kernels are "*", "node()" 
  +     * A mapping between patterns and instruction lists used by
  +     * test sequences to avoid compiling the same pattern multiple
  +     * times. Note that patterns whose kernels are "*", "node()"
        * and "@*" can between shared by test sequences.
        */
  -    private Hashtable _preCompiled = new Hashtable();
  +    private HashMap _preCompiled = new HashMap();
   
       /**
        * A mapping between templates and test sequences.
        */
  -    private Hashtable _neededTemplates = new Hashtable();
  +    private HashMap _neededTemplates = new HashMap();
   
       /**
        * A mapping between named templates and Mode objects.
        */
  -    private Hashtable _namedTemplates = new Hashtable();
  +    private HashMap _namedTemplates = new HashMap();
   
       /**
        * A mapping between templates and instruction handles.
        */
  -    private Hashtable _templateIHs = new Hashtable();
  +    private HashMap _templateIHs = new HashMap();
   
       /**
        * A mapping between templates and instruction lists.
        */
  -    private Hashtable _templateILs = new Hashtable();
  +    private HashMap _templateILs = new HashMap();
   
       /**
        * A reference to the pattern matching the root node.
  @@ -179,15 +179,15 @@
       private LocationPathPattern _rootPattern = null;
   
       /**
  -     * Stores ranges of template precendences for the compilation 
  -     * of apply-imports (a Hashtable for historical reasons).
  +     * Stores ranges of template precendences for the compilation
  +     * of apply-imports (a HashMap for historical reasons).
        */
  -    private Hashtable _importLevels = null;
  +    private HashMap _importLevels = null;
   
       /**
        * A mapping between key names and keys.
        */
  -    private Hashtable _keys = null;
  +    private HashMap _keys = null;
   
       /**
        * Variable index for the current node used in code generation.
  @@ -206,13 +206,13 @@
        _name = name;
        _stylesheet = stylesheet;
        _methodName = APPLY_TEMPLATES + suffix;
  -     _templates = new Vector();
  -     _patternGroups = new Vector[32];
  +     _templates = new ArrayList();
  +     _patternGroups = new ArrayList[32];
       }
   
       /**
  -     * Returns the name of the method (_not_ function) that will be 
  -     * compiled for this mode. Normally takes the form 'applyTemplates()' 
  +     * Returns the name of the method (_not_ function) that will be
  +     * compiled for this mode. Normally takes the form 'applyTemplates()'
        * or * 'applyTemplates2()'.
        *
        * @return Method name for this mode
  @@ -223,23 +223,23 @@
   
       public String functionName(int min, int max) {
        if (_importLevels == null) {
  -         _importLevels = new Hashtable();
  +         _importLevels = new HashMap();
        }
        _importLevels.put(new Integer(max), new Integer(min));
        return _methodName + '_' + max;
       }
   
       /**
  -     * Add a pre-compiled pattern to this mode. 
  +     * Add a pre-compiled pattern to this mode.
        */
  -    public void addInstructionList(Pattern pattern, 
  -     InstructionList ilist) 
  +    public void addInstructionList(Pattern pattern,
  +     InstructionList ilist)
       {
        _preCompiled.put(pattern, ilist);
       }
   
       /**
  -     * Get the instruction list for a pre-compiled pattern. Used by 
  +     * Get the instruction list for a pre-compiled pattern. Used by
        * test sequences to avoid compiling patterns more than once.
        */
       public InstructionList getInstructionList(Pattern pattern) {
  @@ -258,10 +258,10 @@
       }
   
       public void addTemplate(Template template) {
  -     _templates.addElement(template);
  +     _templates.add(template);
       }
   
  -    private Vector quicksort(Vector templates, int p, int r) {
  +    private ArrayList quicksort(ArrayList templates, int p, int r) {
        if (p < r) {
            final int q = partition(templates, p, r);
            quicksort(templates, p, q);
  @@ -269,16 +269,16 @@
        }
        return templates;
       }
  -    
  -    private int partition(Vector templates, int p, int r) {
  -     final Template x = (Template)templates.elementAt(p);
  +
  +    private int partition(ArrayList templates, int p, int r) {
  +     final Template x = (Template)templates.get(p);
        int i = p - 1;
        int j = r + 1;
        while (true) {
  -         while (x.compareTo((Template)templates.elementAt(--j)) > 0);
  -         while (x.compareTo((Template)templates.elementAt(++i)) < 0);
  +         while (x.compareTo((Template)templates.get(--j)) > 0);
  +         while (x.compareTo((Template)templates.get(++i)) < 0);
            if (i < j) {
  -             templates.set(j, templates.set(i, templates.elementAt(j)));
  +             templates.set(j, templates.set(i, templates.get(j)));
            }
            else {
                return j;
  @@ -289,16 +289,16 @@
       /**
        * Process all the test patterns in this mode
        */
  -    public void processPatterns(Hashtable keys) {
  +    public void processPatterns(HashMap keys) {
        _keys = keys;
   
   /*
   System.out.println("Before Sort " + _name);
   for (int i = 0; i < _templates.size(); i++) {
  -    System.out.println("name = " + 
((Template)_templates.elementAt(i)).getName());
  -    System.out.println("pattern = " + 
((Template)_templates.elementAt(i)).getPattern());
  -    System.out.println("priority = " + 
((Template)_templates.elementAt(i)).getPriority());
  -    System.out.println("position = " + 
((Template)_templates.elementAt(i)).getPosition());
  +    System.out.println("name = " + ((Template)_templates.get(i)).getName());
  +    System.out.println("pattern = " + 
((Template)_templates.get(i)).getPattern());
  +    System.out.println("priority = " + 
((Template)_templates.get(i)).getPriority());
  +    System.out.println("position = " + 
((Template)_templates.get(i)).getPosition());
   }
   */
   
  @@ -307,20 +307,20 @@
   /*
   System.out.println("\n After Sort " + _name);
   for (int i = 0; i < _templates.size(); i++) {
  -    System.out.println("name = " + 
((Template)_templates.elementAt(i)).getName());
  -    System.out.println("pattern = " + 
((Template)_templates.elementAt(i)).getPattern());
  -    System.out.println("priority = " + 
((Template)_templates.elementAt(i)).getPriority());
  -    System.out.println("position = " + 
((Template)_templates.elementAt(i)).getPosition());
  +    System.out.println("name = " + ((Template)_templates.get(i)).getName());
  +    System.out.println("pattern = " + 
((Template)_templates.get(i)).getPattern());
  +    System.out.println("priority = " + 
((Template)_templates.get(i)).getPriority());
  +    System.out.println("position = " + 
((Template)_templates.get(i)).getPosition());
   }
   */
   
        // Traverse all templates
  -     final Enumeration templates = _templates.elements();
  -     while (templates.hasMoreElements()) {
  +     final Iterator templates = _templates.iterator();
  +     while (templates.hasNext()) {
            // Get the next template
  -         final Template template = (Template)templates.nextElement();
  +         final Template template = (Template)templates.next();
   
  -         /* 
  +         /*
             * Add this template to a table of named templates if it has a name.
             * If there are multiple templates with the same name, all but one
             * (the one with highest priority) will be disabled.
  @@ -345,14 +345,14 @@
        */
       private void flattenAlternative(Pattern pattern,
                                    Template template,
  -                                 Hashtable keys) {
  +                                 HashMap keys) {
        // Patterns on type id() and key() are special since they do not have
        // any kernel node type (it can be anything as long as the node is in
        // the id's or key's index).
        if (pattern instanceof IdKeyPattern) {
            final IdKeyPattern idkey = (IdKeyPattern)pattern;
            idkey.setTemplate(template);
  -         if (_idxGroup == null) _idxGroup = new Vector();
  +         if (_idxGroup == null) _idxGroup = new ArrayList();
            _idxGroup.add(pattern);
        }
        // Alternative patterns are broken up and re-processed recursively
  @@ -399,56 +399,56 @@
        // Make sure the array of pattern groups is long enough
        final int oldLength = _patternGroups.length;
        if (kernelType >= oldLength) {
  -         Vector[] newGroups = new Vector[kernelType * 2];
  +         ArrayList[] newGroups = new ArrayList[kernelType * 2];
            System.arraycopy(_patternGroups, 0, newGroups, 0, oldLength);
            _patternGroups = newGroups;
        }
  -     
  +
        // Find the vector to put this pattern into
  -     Vector patterns;
  +     ArrayList patterns;
   
        if (kernelType == DOM.NO_TYPE) {
            if (pattern.getAxis() == Axis.ATTRIBUTE) {
                patterns = (_attribNodeGroup == null) ?
  -                 (_attribNodeGroup = new Vector(2)) : _attribNodeGroup;
  +                 (_attribNodeGroup = new ArrayList(2)) : _attribNodeGroup;
            }
            else {
                patterns = (_childNodeGroup == null) ?
  -                 (_childNodeGroup = new Vector(2)) : _childNodeGroup;
  +                 (_childNodeGroup = new ArrayList(2)) : _childNodeGroup;
            }
        }
        else {
            patterns = (_patternGroups[kernelType] == null) ?
  -             (_patternGroups[kernelType] = new Vector(2)) : 
  +             (_patternGroups[kernelType] = new ArrayList(2)) :
                _patternGroups[kernelType];
        }
   
        if (patterns == null) {
  -         patterns.addElement(pattern);
  +         patterns.add(pattern);
        }
        else {
            boolean inserted = false;
            for (int i = 0; i < patterns.size(); i++) {
                final LocationPathPattern lppToCompare =
  -                 (LocationPathPattern)patterns.elementAt(i);
  +                 (LocationPathPattern)patterns.get(i);
   
                if (pattern.noSmallerThan(lppToCompare)) {
                    inserted = true;
  -                 patterns.insertElementAt(pattern, i);
  +                 patterns.add(i, pattern);
                    break;
                }
            }
            if (inserted == false) {
  -             patterns.addElement(pattern);
  +             patterns.add(pattern);
            }
        }
       }
  -    
  +
       /**
        * Complete test sequences of a given type by adding all patterns
        * from a given group.
        */
  -    private void completeTestSequences(int nodeType, Vector patterns) {
  +    private void completeTestSequences(int nodeType, ArrayList patterns) {
        if (patterns != null) {
            if (_patternGroups[nodeType] == null) {
                _patternGroups[nodeType] = patterns;
  @@ -456,40 +456,40 @@
            else {
                final int m = patterns.size();
                for (int j = 0; j < m; j++) {
  -                 addPattern(nodeType, 
  -                     (LocationPathPattern) patterns.elementAt(j));
  +                 addPattern(nodeType,
  +                     (LocationPathPattern) patterns.get(j));
                }
            }
        }
       }
   
       /**
  -     * Build test sequences. The first step is to complete the test 
sequences 
  -     * by including patterns of "*" and "node()" kernel to all element test 
  +     * Build test sequences. The first step is to complete the test sequences
  +     * by including patterns of "*" and "node()" kernel to all element test
        * sequences, and of "@*" to all attribute test sequences.
        */
       private void prepareTestSequences() {
  -     final Vector starGroup = _patternGroups[DOM.ELEMENT];
  -     final Vector atStarGroup = _patternGroups[DOM.ATTRIBUTE];
  +     final ArrayList starGroup = _patternGroups[DOM.ELEMENT];
  +     final ArrayList atStarGroup = _patternGroups[DOM.ATTRIBUTE];
   
        // Complete test sequence for "text()" with "child::node()"
        completeTestSequences(DOM.TEXT, _childNodeGroup);
  -     
  +
        // Complete test sequence for "*" with "child::node()"
        completeTestSequences(DOM.ELEMENT, _childNodeGroup);
  -     
  +
        // Complete test sequence for "pi()" with "child::node()"
        completeTestSequences(DOM.PROCESSING_INSTRUCTION, _childNodeGroup);
  -     
  +
        // Complete test sequence for "comment()" with "child::node()"
        completeTestSequences(DOM.COMMENT, _childNodeGroup);
  -     
  +
        // Complete test sequence for "@*" with "attribute::node()"
        completeTestSequences(DOM.ATTRIBUTE, _attribNodeGroup);
   
  -     final Vector names = _stylesheet.getXSLTC().getNamesIndex();
  -     if (starGroup != null || atStarGroup != null || 
  -         _childNodeGroup != null || _attribNodeGroup != null) 
  +     final ArrayList names = _stylesheet.getXSLTC().getNamesIndex();
  +     if (starGroup != null || atStarGroup != null ||
  +         _childNodeGroup != null || _attribNodeGroup != null)
        {
            final int n = _patternGroups.length;
   
  @@ -497,7 +497,7 @@
            for (int i = DOM.NTYPES; i < n; i++) {
                if (_patternGroups[i] == null) continue;
   
  -             final String name = (String) names.elementAt(i - DOM.NTYPES);
  +             final String name = (String) names.get(i - DOM.NTYPES);
   
                if (isAttributeName(name)) {
                    // If an attribute then copy "@*" to its test sequence
  @@ -517,10 +517,10 @@
        }
   
        _testSeq = new TestSeq[DOM.NTYPES + names.size()];
  -     
  +
        final int n = _patternGroups.length;
        for (int i = 0; i < n; i++) {
  -         final Vector patterns = _patternGroups[i];
  +         final ArrayList patterns = _patternGroups[i];
            if (patterns != null) {
                final TestSeq testSeq = new TestSeq(patterns, i, this);
   // System.out.println("testSeq[" + i + "] = " + testSeq);
  @@ -549,7 +549,7 @@
            _idxTestSeq.reduce();
            _idxTestSeq.findTemplates(_neededTemplates);
        }
  -     
  +
        if (_rootPattern != null) {
            // doesn't matter what is 'put', only key matters
            _neededTemplates.put(_rootPattern.getTemplate(), this);
  @@ -580,10 +580,10 @@
                                     methodName,
                                     getClassName(),
                                     il, cpg);
  -     
  +
        il.append(template.compile(classGen, methodGen));
        il.append(RETURN);
  -     
  +
        methodGen.stripAttributes(true);
        methodGen.setMaxLocals();
        methodGen.setMaxStack();
  @@ -593,17 +593,17 @@
   
       private void compileTemplates(ClassGenerator classGen,
                                  MethodGenerator methodGen,
  -                               InstructionHandle next) 
  +                               InstructionHandle next)
       {
  -        Enumeration templates = _namedTemplates.keys();
  -        while (templates.hasMoreElements()) {
  -            final Template template = (Template)templates.nextElement();
  +        Iterator templates = _namedTemplates.keySet().iterator();
  +        while (templates.hasNext()) {
  +            final Template template = (Template)templates.next();
               compileNamedTemplate(template, classGen);
           }
   
  -     templates = _neededTemplates.keys();
  -     while (templates.hasMoreElements()) {
  -         final Template template = (Template)templates.nextElement();
  +     templates = _neededTemplates.keySet().iterator();
  +     while (templates.hasNext()) {
  +         final Template template = (Template)templates.next();
            if (template.hasContents()) {
                // !!! TODO templates both named and matched
                InstructionList til = template.compile(classGen, methodGen);
  @@ -617,12 +617,12 @@
            }
        }
       }
  -     
  +
       private void appendTemplateCode(InstructionList body) {
  -     final Enumeration templates = _neededTemplates.keys();
  -     while (templates.hasMoreElements()) {
  +     final Iterator templates = _neededTemplates.keySet().iterator();
  +     while (templates.hasNext()) {
            final Object iList =
  -             _templateILs.get(templates.nextElement());
  +             _templateILs.get(templates.next());
            if (iList != null) {
                body.append((InstructionList)iList);
            }
  @@ -672,7 +672,7 @@
                                                    applyTemplatesSig);
        il.append(classGen.loadTranslet());
        il.append(methodGen.loadDOM());
  -     
  +
        il.append(methodGen.loadDOM());
        il.append(new ILOAD(_currentIndex));
        il.append(new INVOKEINTERFACE(git, 2));
  @@ -713,8 +713,8 @@
        final ConstantPoolGen cpg = classGen.getConstantPool();
   
        // Append switch() statement - namespace test dispatch loop
  -     final Vector namespaces = xsltc.getNamespaceIndex();
  -     final Vector names = xsltc.getNamesIndex();
  +     final ArrayList namespaces = xsltc.getNamespaceIndex();
  +     final ArrayList names = xsltc.getNamesIndex();
        final int namespaceCount = namespaces.size() + 1;
        final int namesCount = names.size();
   
  @@ -734,10 +734,10 @@
            // Add test sequences for known namespace types
            for (int i = DOM.NTYPES; i < (DOM.NTYPES+namesCount); i++) {
                if ((isNamespace[i]) && (isAttribute[i] == attrFlag)) {
  -                 String name = (String)names.elementAt(i-DOM.NTYPES);
  +                 String name = (String)names.get(i-DOM.NTYPES);
                    String namespace = name.substring(0,name.lastIndexOf(':'));
                    final int type = xsltc.registerNamespace(namespace);
  -                 
  +
                    if ((i < _testSeq.length) &&
                        (_testSeq[i] != null)) {
                        targets[type] =
  @@ -751,7 +751,7 @@
   
            // Return "null" if no test sequences were compiled
            if (!compiled) return(null);
  -             
  +
            // Append first code in applyTemplates() - get type of current node
            final int getNS = cpg.addInterfaceMethodref(DOM_INTF,
                                                        "getNamespaceType",
  @@ -774,7 +774,7 @@
       public void compileApplyTemplates(ClassGenerator classGen) {
        final XSLTC xsltc = classGen.getParser().getXSLTC();
        final ConstantPoolGen cpg = classGen.getConstantPool();
  -     final Vector names = xsltc.getNamesIndex();
  +     final ArrayList names = xsltc.getNamesIndex();
   
        // Create the applyTemplates() method
        final org.apache.bcel.generic.Type[] argTypes =
  @@ -790,7 +790,7 @@
   
        final InstructionList mainIL = new InstructionList();
        final MethodGenerator methodGen =
  -         new MethodGenerator(ACC_PUBLIC | ACC_FINAL, 
  +         new MethodGenerator(ACC_PUBLIC | ACC_FINAL,
                                org.apache.bcel.generic.Type.VOID,
                                argTypes, argNames, functionName(),
                                getClassName(), mainIL,
  @@ -844,7 +844,7 @@
        final boolean[] isAttribute = new boolean[types.length];
        final boolean[] isNamespace = new boolean[types.length];
        for (int i = 0; i < names.size(); i++) {
  -         final String name = (String)names.elementAt(i);
  +         final String name = (String)names.get(i);
            isAttribute[i + DOM.NTYPES] = isAttributeName(name);
            isNamespace[i + DOM.NTYPES] = isNamespaceName(name);
        }
  @@ -887,8 +887,8 @@
                elemPrio = elemTest.getPriority();
                elemPos  = elemTest.getPosition();
            }
  -         if (elemPrio == Double.NaN || elemPrio < nodePrio || 
  -             (elemPrio == nodePrio && elemPos < nodePos)) 
  +         if (elemPrio == Double.NaN || elemPrio < nodePrio ||
  +             (elemPrio == nodePrio && elemPos < nodePos))
            {
                ihElem = _childNodeTestSeq.compile(classGen, methodGen, ihLoop);
            }
  @@ -903,7 +903,7 @@
                textPos  = textTest.getPosition();
            }
            if (textPrio == Double.NaN || textPrio < nodePrio ||
  -             (textPrio == nodePrio && textPos < nodePos)) 
  +             (textPrio == nodePrio && textPos < nodePos))
            {
                ihText = _childNodeTestSeq.compile(classGen, methodGen, ihLoop);
                _testSeq[DOM.TEXT] = _childNodeTestSeq;
  @@ -954,7 +954,7 @@
        targets[DOM.ROOT] = _rootPattern != null
            ? getTemplateInstructionHandle(_rootPattern.getTemplate())
            : ihRecurse;
  -     
  +
        // Handle any pattern with match on text nodes - default: output text
        targets[DOM.TEXT] = _testSeq[DOM.TEXT] != null
            ? _testSeq[DOM.TEXT].compile(classGen, methodGen, ihText)
  @@ -978,7 +978,7 @@
                compile(classGen, methodGen, ihPI);
        else
            targets[DOM.PROCESSING_INSTRUCTION] = ihPI;
  -     
  +
        // Match on comments - default: process next node
        InstructionHandle ihComment = ihLoop;
        if (_childNodeTestSeq != null) ihComment = ihElem;
  @@ -1042,7 +1042,7 @@
   
        peepHoleOptimization(methodGen);
        methodGen.stripAttributes(true);
  -     
  +
        methodGen.setMaxLocals();
        methodGen.setMaxStack();
        methodGen.removeNOPs();
  @@ -1050,9 +1050,9 @@
   
        // Compile method(s) for <xsl:apply-imports/> for this mode
        if (_importLevels != null) {
  -         Enumeration levels = _importLevels.keys();
  -         while (levels.hasMoreElements()) {
  -             Integer max = (Integer)levels.nextElement();
  +         Iterator levels = _importLevels.keySet().iterator();
  +         while (levels.hasNext()) {
  +             Integer max = (Integer)levels.next();
                Integer min = (Integer)_importLevels.get(max);
                compileApplyImports(classGen, min.intValue(), max.intValue());
            }
  @@ -1062,9 +1062,9 @@
       private void compileTemplateCalls(ClassGenerator classGen,
                                      MethodGenerator methodGen,
                                      InstructionHandle next, int min, int max){
  -        Enumeration templates = _neededTemplates.keys();
  -     while (templates.hasMoreElements()) {
  -         final Template template = (Template)templates.nextElement();
  +        Iterator templates = _neededTemplates.keySet().iterator();
  +     while (templates.hasNext()) {
  +         final Template template = (Template)templates.next();
            final int prec = template.getImportPrecedence();
            if ((prec >= min) && (prec < max)) {
                if (template.hasContents()) {
  @@ -1085,24 +1085,24 @@
       public void compileApplyImports(ClassGenerator classGen, int min, int 
max) {
        final XSLTC xsltc = classGen.getParser().getXSLTC();
        final ConstantPoolGen cpg = classGen.getConstantPool();
  -     final Vector names      = xsltc.getNamesIndex();
  +     final ArrayList names      = xsltc.getNamesIndex();
   
        // Clear some datastructures
  -     _namedTemplates = new Hashtable();
  -     _neededTemplates = new Hashtable();
  -     _templateIHs = new Hashtable();
  -     _templateILs = new Hashtable();
  -     _patternGroups = new Vector[32];
  +     _namedTemplates = new HashMap();
  +     _neededTemplates = new HashMap();
  +     _templateIHs = new HashMap();
  +     _templateILs = new HashMap();
  +     _patternGroups = new ArrayList[32];
        _rootPattern = null;
   
        // IMPORTANT: Save orignal & complete set of templates!!!!
  -     Vector oldTemplates = _templates;
  +     ArrayList oldTemplates = _templates;
   
        // Gather templates that are within the scope of this import
  -     _templates = new Vector();
  -     final Enumeration templates = oldTemplates.elements();
  -     while (templates.hasMoreElements()) {
  -         final Template template = (Template)templates.nextElement();
  +     _templates = new ArrayList();
  +     final Iterator templates = oldTemplates.iterator();
  +     while (templates.hasNext()) {
  +         final Template template = (Template)templates.next();
            final int prec = template.getImportPrecedence();
            if ((prec >= min) && (prec < max)) addTemplate(template);
        }
  @@ -1124,7 +1124,7 @@
   
        final InstructionList mainIL = new InstructionList();
        final MethodGenerator methodGen =
  -         new MethodGenerator(ACC_PUBLIC | ACC_FINAL, 
  +         new MethodGenerator(ACC_PUBLIC | ACC_FINAL,
                                org.apache.bcel.generic.Type.VOID,
                                argTypes, argNames, functionName()+'_'+max,
                                getClassName(), mainIL,
  @@ -1177,7 +1177,7 @@
        final boolean[] isAttribute = new boolean[types.length];
        final boolean[] isNamespace = new boolean[types.length];
        for (int i = 0; i < names.size(); i++) {
  -         final String name = (String)names.elementAt(i);
  +         final String name = (String)names.get(i);
            isAttribute[i+DOM.NTYPES] = isAttributeName(name);
            isNamespace[i+DOM.NTYPES] = isNamespaceName(name);
        }
  @@ -1223,8 +1223,8 @@
                elemPos  = elemTest.getPosition();
            }
   
  -         if (elemPrio == Double.NaN || elemPrio < nodePrio || 
  -             (elemPrio == nodePrio && elemPos < nodePos)) 
  +         if (elemPrio == Double.NaN || elemPrio < nodePrio ||
  +             (elemPrio == nodePrio && elemPos < nodePos))
            {
                ihElem = _childNodeTestSeq.compile(classGen, methodGen, ihLoop);
            }
  @@ -1240,7 +1240,7 @@
            }
   
            if (textPrio == Double.NaN || textPrio < nodePrio ||
  -             (textPrio == nodePrio && textPos < nodePos)) 
  +             (textPrio == nodePrio && textPos < nodePos))
            {
                ihText = _childNodeTestSeq.compile(classGen, methodGen, ihLoop);
                _testSeq[DOM.TEXT] = _childNodeTestSeq;
  @@ -1290,7 +1290,7 @@
        targets[DOM.ROOT] = _rootPattern != null
            ? getTemplateInstructionHandle(_rootPattern.getTemplate())
            : ihRecurse;
  -     
  +
        // Handle any pattern with match on text nodes - default: loop
        targets[DOM.TEXT] = _testSeq[DOM.TEXT] != null
            ? _testSeq[DOM.TEXT].compile(classGen, methodGen, ihText)
  @@ -1316,7 +1316,7 @@
        else {
            targets[DOM.PROCESSING_INSTRUCTION] = ihPI;
        }
  -     
  +
        // Match on comments - default: process next node
        InstructionHandle ihComment = ihLoop;
        if (_childNodeTestSeq != null) ihComment = ihElem;
  @@ -1380,7 +1380,7 @@
   
        peepHoleOptimization(methodGen);
        methodGen.stripAttributes(true);
  -     
  +
        methodGen.setMaxLocals();
        methodGen.setMaxStack();
        methodGen.removeNOPs();
  @@ -1434,7 +1434,7 @@
               }
           }
   
  -        // Replace sequences of ALOAD_1, ALOAD_1 with ALOAD_1, DUP 
  +        // Replace sequences of ALOAD_1, ALOAD_1 with ALOAD_1, DUP
        pattern = "`ALOAD_1'`ALOAD_1'`Instruction'";
           for(Iterator iter=find.search(pattern); iter.hasNext();){
               InstructionHandle[] match = (InstructionHandle[])iter.next();
  @@ -1466,7 +1466,7 @@
       }
   
       /**
  -     * Auxiliary method to determine if a qname is a namespace 
  +     * Auxiliary method to determine if a qname is a namespace
        * qualified "*".
        */
       private static boolean isNamespaceName(String qname) {
  
  
  
  1.7.2.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NameBase.java
  
  Index: NameBase.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NameBase.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.1.2.1
  diff -u -r1.7.2.1 -r1.7.2.1.2.1
  --- NameBase.java     14 Aug 2002 19:21:33 -0000      1.7.2.1
  +++ NameBase.java     10 Jan 2003 16:50:40 -0000      1.7.2.1.2.1
  @@ -63,7 +63,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -84,7 +84,7 @@
       /**
        * Handles calls with one parameter (either node or node-set).
        */
  -    public NameBase(QName fname, Vector arguments) {
  +    public NameBase(QName fname, ArrayList arguments) {
        super(fname, arguments);
        _param = argument(0);
       }
  
  
  
  1.3.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NameCall.java
  
  Index: NameCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NameCall.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.1.2.1
  diff -u -r1.3.8.1 -r1.3.8.1.2.1
  --- NameCall.java     14 Aug 2002 19:21:33 -0000      1.3.8.1
  +++ NameCall.java     10 Jan 2003 16:50:40 -0000      1.3.8.1.2.1
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   import org.apache.xalan.xsltc.compiler.util.Type;
  @@ -81,7 +81,7 @@
       /**
        * Handles calls with one parameter (either node or node-set).
        */
  -    public NameCall(QName fname, Vector arguments) {
  +    public NameCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.4.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NamespaceAlias.java
  
  Index: NamespaceAlias.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NamespaceAlias.java,v
  retrieving revision 1.4.8.1
  retrieving revision 1.4.8.1.2.1
  diff -u -r1.4.8.1 -r1.4.8.1.2.1
  --- NamespaceAlias.java       14 Aug 2002 19:21:33 -0000      1.4.8.1
  +++ NamespaceAlias.java       10 Jan 2003 16:50:40 -0000      1.4.8.1.2.1
  @@ -63,8 +63,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
  
  
  
  1.3.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NamespaceUriCall.java
  
  Index: NamespaceUriCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NamespaceUriCall.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.1.2.1
  diff -u -r1.3.8.1 -r1.3.8.1.2.1
  --- NamespaceUriCall.java     14 Aug 2002 19:21:33 -0000      1.3.8.1
  +++ NamespaceUriCall.java     10 Jan 2003 16:50:40 -0000      1.3.8.1.2.1
  @@ -62,7 +62,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -80,7 +80,7 @@
       /**
        * Handles calls with one parameter (either node or node-set).
        */
  -    public NamespaceUriCall(QName fname, Vector arguments) {
  +    public NamespaceUriCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.2.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NotCall.java
  
  Index: NotCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NotCall.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- NotCall.java      14 Aug 2002 19:21:33 -0000      1.2.8.1
  +++ NotCall.java      10 Jan 2003 16:50:40 -0000      1.2.8.1.2.1
  @@ -63,12 +63,12 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   
   final class NotCall extends FunctionCall {
  -    public NotCall(QName fname, Vector arguments) {
  +    public NotCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.9.2.1.2.2 +44 -44    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Number.java
  
  Index: Number.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Number.java,v
  retrieving revision 1.9.2.1.2.1
  retrieving revision 1.9.2.1.2.2
  diff -u -r1.9.2.1.2.1 -r1.9.2.1.2.2
  --- Number.java       2 Dec 2002 15:51:17 -0000       1.9.2.1.2.1
  +++ Number.java       10 Jan 2003 16:50:40 -0000      1.9.2.1.2.2
  @@ -78,13 +78,13 @@
       private static final int LEVEL_MULTIPLE = 1;
       private static final int LEVEL_ANY      = 2;
   
  -    static final private String[] ClassNames = { 
  +    static final private String[] ClassNames = {
        "org.apache.xalan.xsltc.dom.SingleNodeCounter",   // LEVEL_SINGLE
        "org.apache.xalan.xsltc.dom.MultipleNodeCounter", // LEVEL_MULTIPLE
        "org.apache.xalan.xsltc.dom.AnyNodeCounter"       // LEVEL_ANY
       };
   
  -    static final private String[] FieldNames = { 
  +    static final private String[] FieldNames = {
        "___single_node_counter",                  // LEVEL_SINGLE
        "___multiple_node_counter",                // LEVEL_MULTIPLE
        "___any_node_counter"                      // LEVEL_ANY
  @@ -124,7 +124,7 @@
       }
   
       /**
  -     * Returns the name of the auxiliary class or null if this predicate 
  +     * Returns the name of the auxiliary class or null if this predicate
        * is compiled inside the Translet.
        */
       public String getInnerClassName() {
  @@ -252,17 +252,17 @@
        int[] fieldIndexes = getXSLTC().getNumberFieldIndexes();
   
        if (fieldIndexes[_level] == -1) {
  -         Field defaultNode = new Field(ACC_PRIVATE, 
  +         Field defaultNode = new Field(ACC_PRIVATE,
                                          cpg.addUtf8(FieldNames[_level]),
                                          cpg.addUtf8(NODE_COUNTER_SIG),
  -                                       null, 
  +                                       null,
                                          cpg.getConstantPool());
   
            // Add a new private field to this class
            classGen.addField(defaultNode);
   
            // Get a reference to the newly added field
  -         fieldIndexes[_level] = cpg.addFieldref(classGen.getClassName(), 
  +         fieldIndexes[_level] = cpg.addFieldref(classGen.getClassName(),
                                                   FieldNames[_level],
                                                   NODE_COUNTER_SIG);
        }
  @@ -274,10 +274,10 @@
   
        // Create an instance of DefaultNodeCounter
        index = cpg.addMethodref(ClassNames[_level],
  -                              "getDefaultNodeCounter", 
  +                              "getDefaultNodeCounter",
                                 "(" + TRANSLET_INTF_SIG
                                 + DOM_INTF_SIG
  -                              + NODE_ITERATOR_SIG 
  +                              + NODE_ITERATOR_SIG
                                 + ")" + NODE_COUNTER_SIG);
        il.append(classGen.loadTranslet());
        il.append(methodGen.loadDOM());
  @@ -294,7 +294,7 @@
        // Backpatch conditionals
        ifBlock1.setTarget(il.append(classGen.loadTranslet()));
        il.append(new GETFIELD(fieldIndexes[_level]));
  -     
  +
        ifBlock2.setTarget(il.append(NOP));
       }
   
  @@ -309,7 +309,7 @@
        final ConstantPoolGen cpg = classGen.getConstantPool();
   
        cons = new MethodGenerator(ACC_PUBLIC,
  -                                org.apache.bcel.generic.Type.VOID, 
  +                                org.apache.bcel.generic.Type.VOID,
                                   new org.apache.bcel.generic.Type[] {
                                       Util.getJCRefType(TRANSLET_INTF_SIG),
                                       Util.getJCRefType(DOM_INTF_SIG),
  @@ -328,14 +328,14 @@
        il.append(new ALOAD(3));// iterator
   
        int index = cpg.addMethodref(ClassNames[_level],
  -                                  "<init>", 
  +                                  "<init>",
                                     "(" + TRANSLET_INTF_SIG
                                     + DOM_INTF_SIG
  -                                  + NODE_ITERATOR_SIG 
  +                                  + NODE_ITERATOR_SIG
                                     + ")V");
        il.append(new INVOKESPECIAL(index));
        il.append(RETURN);
  -     
  +
        cons.stripAttributes(true);
        cons.setMaxLocals();
        cons.setMaxStack();
  @@ -348,14 +348,14 @@
        */
       private void compileLocals(NodeCounterGenerator nodeCounterGen,
                               MatchGenerator matchGen,
  -                            InstructionList il) 
  +                            InstructionList il)
       {
        int field;
        LocalVariableGen local;
        ConstantPoolGen cpg = nodeCounterGen.getConstantPool();
   
        // Get NodeCounter._iterator and store locally
  -     local = matchGen.addLocalVariable("iterator", 
  +     local = matchGen.addLocalVariable("iterator",
                                          Util.getJCRefType(NODE_ITERATOR_SIG),
                                          null, null);
        field = cpg.addFieldref(NODE_COUNTER, "_iterator",
  @@ -364,9 +364,9 @@
        il.append(new GETFIELD(field));
        il.append(new ASTORE(local.getIndex()));
        matchGen.setIteratorIndex(local.getIndex());
  -     
  +
        // Get NodeCounter._translet and store locally
  -     local = matchGen.addLocalVariable("translet", 
  +     local = matchGen.addLocalVariable("translet",
                                  Util.getJCRefType(TRANSLET_SIG),
                                  null, null);
        field = cpg.addFieldref(NODE_COUNTER, "_translet",
  @@ -378,7 +378,7 @@
        nodeCounterGen.setTransletIndex(local.getIndex());
   
        // Get NodeCounter._document and store locally
  -     local = matchGen.addLocalVariable("document", 
  +     local = matchGen.addLocalVariable("document",
                                          Util.getJCRefType(DOM_INTF_SIG),
                                          null, null);
        field = cpg.addFieldref(_className, "_document", DOM_INTF_SIG);
  @@ -390,7 +390,7 @@
       }
   
       private void compilePatterns(ClassGenerator classGen,
  -                              MethodGenerator methodGen) 
  +                              MethodGenerator methodGen)
       {
        int current;
        int field;
  @@ -401,7 +401,7 @@
        _className = getXSLTC().getHelperClassName();
        nodeCounterGen = new NodeCounterGenerator(_className,
                                                  ClassNames[_level],
  -                                               toString(), 
  +                                               toString(),
                                                  ACC_PUBLIC | ACC_SUPER,
                                                  null,
                                                  classGen.getStylesheet());
  @@ -409,14 +409,14 @@
        ConstantPoolGen cpg = nodeCounterGen.getConstantPool();
   
        // Add a new instance variable for each var in closure
  -     final int closureLen = (_closureVars == null) ? 0 : 
  +     final int closureLen = (_closureVars == null) ? 0 :
            _closureVars.size();
   
        for (int i = 0; i < closureLen; i++) {
  -         VariableBase var = 
  +         VariableBase var =
                ((VariableRefBase) _closureVars.get(i)).getVariable();
   
  -         nodeCounterGen.addField(new Field(ACC_PUBLIC, 
  +         nodeCounterGen.addField(new Field(ACC_PUBLIC,
                                        cpg.addUtf8(var.getVariable()),
                                        
cpg.addUtf8(var.getType().toSignature()),
                                        null, cpg.getConstantPool()));
  @@ -432,7 +432,7 @@
            il = new InstructionList();
            matchGen =
                new MatchGenerator(ACC_PUBLIC | ACC_FINAL,
  -                                org.apache.bcel.generic.Type.BOOLEAN, 
  +                                org.apache.bcel.generic.Type.BOOLEAN,
                                   new org.apache.bcel.generic.Type[] {
                                       org.apache.bcel.generic.Type.INT,
                                   },
  @@ -448,7 +448,7 @@
            _from.translate(nodeCounterGen, matchGen);
            _from.synthesize(nodeCounterGen, matchGen);
            il.append(IRETURN);
  -                 
  +
            matchGen.stripAttributes(true);
            matchGen.setMaxLocals();
            matchGen.setMaxStack();
  @@ -462,7 +462,7 @@
        if (_count != null) {
            il = new InstructionList();
            matchGen = new MatchGenerator(ACC_PUBLIC | ACC_FINAL,
  -                                       org.apache.bcel.generic.Type.BOOLEAN, 
  +                                       org.apache.bcel.generic.Type.BOOLEAN,
                                          new org.apache.bcel.generic.Type[] {
                                              org.apache.bcel.generic.Type.INT,
                                          },
  @@ -472,30 +472,30 @@
                                          "matchesCount", _className, il, cpg);
   
            compileLocals(nodeCounterGen,matchGen,il);
  -         
  +
            // Translate Pattern
            il.append(matchGen.loadContextNode());
            _count.translate(nodeCounterGen, matchGen);
            _count.synthesize(nodeCounterGen, matchGen);
  -         
  +
            il.append(IRETURN);
  -                 
  +
            matchGen.stripAttributes(true);
            matchGen.setMaxLocals();
            matchGen.setMaxStack();
            matchGen.removeNOPs();
            nodeCounterGen.addMethod(matchGen.getMethod());
        }
  -     
  +
        getXSLTC().dumpClass(nodeCounterGen.getJavaClass());
   
        // Push an instance of the newly created class
        cpg = classGen.getConstantPool();
        il = methodGen.getInstructionList();
   
  -     final int index = cpg.addMethodref(_className, "<init>", 
  +     final int index = cpg.addMethodref(_className, "<init>",
                                           "(" + TRANSLET_INTF_SIG
  -                                        + DOM_INTF_SIG 
  +                                        + DOM_INTF_SIG
                                           + NODE_ITERATOR_SIG
                                           + ")V");
        il.append(new NEW(cpg.addClass(_className)));
  @@ -515,7 +515,7 @@
            il.append(DUP);
            il.append(var.loadInstruction());
            il.append(new PUTFIELD(
  -                 cpg.addFieldref(_className, var.getVariable(), 
  +                 cpg.addFieldref(_className, var.getVariable(),
                        varType.toSignature())));
        }
       }
  @@ -538,8 +538,8 @@
            il.append(new L2I());
   
            // Call setValue on the node counter
  -         index = cpg.addMethodref(NODE_COUNTER, 
  -                                  "setValue", 
  +         index = cpg.addMethodref(NODE_COUNTER,
  +                                  "setValue",
                                     "(I)" + NODE_COUNTER_SIG);
            il.append(new INVOKEVIRTUAL(index));
        }
  @@ -550,11 +550,11 @@
            compilePatterns(classGen, methodGen);
        }
   
  -     // Call setStartNode() 
  +     // Call setStartNode()
        if (!hasValue()) {
            il.append(methodGen.loadContextNode());
  -         index = cpg.addMethodref(NODE_COUNTER, 
  -                                  SET_START_NODE, 
  +         index = cpg.addMethodref(NODE_COUNTER,
  +                                  SET_START_NODE,
                                     "(I)" + NODE_COUNTER_SIG);
            il.append(new INVOKEVIRTUAL(index));
        }
  @@ -596,18 +596,18 @@
                il.append(new PUSH(cpg, "0"));
            }
   
  -         index = cpg.addMethodref(NODE_COUNTER, "getCounter", 
  -                                  "(" + STRING_SIG + STRING_SIG 
  -                                  + STRING_SIG + STRING_SIG 
  +         index = cpg.addMethodref(NODE_COUNTER, "getCounter",
  +                                  "(" + STRING_SIG + STRING_SIG
  +                                  + STRING_SIG + STRING_SIG
                                     + STRING_SIG + ")" + STRING_SIG);
            il.append(new INVOKEVIRTUAL(index));
        }
        else {
  -         index = cpg.addMethodref(NODE_COUNTER, "setDefaultFormatting", 
  +         index = cpg.addMethodref(NODE_COUNTER, "setDefaultFormatting",
                                     "()" + NODE_COUNTER_SIG);
            il.append(new INVOKEVIRTUAL(index));
   
  -         index = cpg.addMethodref(NODE_COUNTER, "getCounter", 
  +         index = cpg.addMethodref(NODE_COUNTER, "getCounter",
                                     "()" + STRING_SIG);
            il.append(new INVOKEVIRTUAL(index));
        }
  
  
  
  1.2.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NumberCall.java
  
  Index: NumberCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NumberCall.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- NumberCall.java   14 Aug 2002 19:21:33 -0000      1.2.8.1
  +++ NumberCall.java   10 Jan 2003 16:50:41 -0000      1.2.8.1.2.1
  @@ -63,14 +63,14 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   
   final class NumberCall extends FunctionCall {
   
  -    public NumberCall(QName fname, Vector arguments) {
  +    public NumberCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.16.2.1.2.2 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Output.java
  
  Index: Output.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Output.java,v
  retrieving revision 1.16.2.1.2.1
  retrieving revision 1.16.2.1.2.2
  diff -u -r1.16.2.1.2.1 -r1.16.2.1.2.2
  --- Output.java       2 Dec 2002 15:51:17 -0000       1.16.2.1.2.1
  +++ Output.java       10 Jan 2003 16:50:41 -0000      1.16.2.1.2.2
  @@ -64,9 +64,9 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Properties;
  -import java.util.Enumeration;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   import java.io.OutputStreamWriter;
   import javax.xml.transform.OutputKeys;
  
  
  
  1.19.8.1.2.2 +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Param.java
  
  Index: Param.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Param.java,v
  retrieving revision 1.19.8.1.2.1
  retrieving revision 1.19.8.1.2.2
  diff -u -r1.19.8.1.2.1 -r1.19.8.1.2.2
  --- Param.java        2 Dec 2002 15:51:17 -0000       1.19.8.1.2.1
  +++ Param.java        10 Jan 2003 16:50:41 -0000      1.19.8.1.2.2
  @@ -66,7 +66,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.xalan.xsltc.compiler.util.ReferenceType;
  
  
  
  1.51.2.1.2.2 +142 -142  
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Parser.java,v
  retrieving revision 1.51.2.1.2.1
  retrieving revision 1.51.2.1.2.2
  diff -u -r1.51.2.1.2.1 -r1.51.2.1.2.2
  --- Parser.java       2 Dec 2002 15:51:17 -0000       1.51.2.1.2.1
  +++ Parser.java       10 Jan 2003 16:50:41 -0000      1.51.2.1.2.2
  @@ -68,11 +68,11 @@
   
   import java.io.*;
   import java.net.URL;
  -import java.util.Vector;
  -import java.util.Hashtable;
  +import java.util.ArrayList;
  +import java.util.HashMap;
   import java.util.Properties;
   import java.util.Dictionary;
  -import java.util.Enumeration;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   import java.util.Stack;
   import java.net.MalformedURLException;
  @@ -96,17 +96,17 @@
   
       private XSLTC _xsltc;             // Reference to the compiler object.
       private XPathParser _xpathParser; // Reference to the XPath parser.
  -    private Vector _errors;           // Contains all compilation errors
  -    private Vector _warnings;         // Contains all compilation errors
  +    private ArrayList _errors;           // Contains all compilation errors
  +    private ArrayList _warnings;         // Contains all compilation errors
   
  -    private Hashtable   _instructionClasses; // Maps instructions to classes
  -    private Hashtable   _instructionAttrs;;  // reqd and opt attrs 
  -    private Hashtable   _qNames;
  -    private Hashtable   _namespaces;
  +    private HashMap   _instructionClasses; // Maps instructions to classes
  +    private HashMap   _instructionAttrs;;  // reqd and opt attrs
  +    private HashMap   _qNames;
  +    private HashMap   _namespaces;
       private QName       _useAttributeSets;
       private QName       _excludeResultPrefixes;
       private QName       _extensionElementPrefixes;
  -    private Hashtable   _variableScope;
  +    private HashMap   _variableScope;
       private Stylesheet  _currentStylesheet;
       private SymbolTable _symbolTable; // Maps QNames to syntax-tree nodes
       private Output      _output = null;
  @@ -125,24 +125,24 @@
       }
   
       public void init() {
  -     _qNames              = new Hashtable(512);
  -     _namespaces          = new Hashtable();
  -     _instructionClasses  = new Hashtable();
  -     _instructionAttrs    = new Hashtable();
  -     _variableScope       = new Hashtable();
  +     _qNames              = new HashMap(512);
  +     _namespaces          = new HashMap();
  +     _instructionClasses  = new HashMap();
  +     _instructionAttrs    = new HashMap();
  +     _variableScope       = new HashMap();
        _template            = null;
  -     _errors              = new Vector();
  -     _warnings            = new Vector();
  +     _errors              = new ArrayList();
  +     _warnings            = new ArrayList();
        _symbolTable         = new SymbolTable();
        _xpathParser         = new XPathParser(this);
        _currentStylesheet   = null;
        _currentImportPrecedence = 1;
  -     
  +
        initStdClasses();
        initInstructionAttrs();
        initExtClasses();
        initSymbolTable();
  -     
  +
        _useAttributeSets =
            getQName(XSLT_URI, XSL, "use-attribute-sets");
        _excludeResultPrefixes =
  @@ -236,7 +236,7 @@
       public int getCurrentImportPrecedence() {
        return _currentImportPrecedence;
       }
  -    
  +
       public int getNextImportPrecedence() {
        return ++_currentImportPrecedence;
       }
  @@ -248,7 +248,7 @@
       public Stylesheet getCurrentStylesheet() {
        return _currentStylesheet;
       }
  -    
  +
       public Stylesheet getTopLevelStylesheet() {
        return _xsltc.getStylesheet();
       }
  @@ -260,7 +260,7 @@
            final String prefix = stringRep.substring(0, colon);
            final String localname = stringRep.substring(colon + 1);
            String namespace = null;
  -         
  +
            // Get the namespace uri from the symbol table
            if (prefix.equals(XMLNS_PREFIX) == false) {
                namespace = _symbolTable.lookupNamespace(prefix);
  @@ -274,9 +274,9 @@
            return getQName(uri, null, stringRep);
        }
       }
  -    
  +
       public QName getQName(final String stringRep) {
  -     return getQName(stringRep, true, false);    
  +     return getQName(stringRep, true, false);
       }
   
       public QName getQNameIgnoreDefaultNs(final String stringRep) {
  @@ -288,7 +288,7 @@
       }
   
       private QName getQName(final String stringRep, boolean reportError,
  -     boolean ignoreDefaultNs) 
  +     boolean ignoreDefaultNs)
       {
        // parse and retrieve namespace
        final int colon = stringRep.lastIndexOf(':');
  @@ -296,7 +296,7 @@
            final String prefix = stringRep.substring(0, colon);
            final String localname = stringRep.substring(colon + 1);
            String namespace = null;
  -         
  +
            // Get the namespace uri from the symbol table
            if (prefix.equals(XMLNS_PREFIX) == false) {
                namespace = _symbolTable.lookupNamespace(prefix);
  @@ -313,7 +313,7 @@
            if (stringRep.equals(XMLNS_PREFIX)) {
                ignoreDefaultNs = true;
            }
  -         final String defURI = ignoreDefaultNs ? null 
  +         final String defURI = ignoreDefaultNs ? null
                                  : _symbolTable.lookupNamespace(EMPTYSTRING);
            return getQName(defURI, null, stringRep);
        }
  @@ -329,10 +329,10 @@
            return name;
        }
        else {
  -         Dictionary space = (Dictionary)_namespaces.get(namespace);
  +         HashMap space = (HashMap) _namespaces.get(namespace);
            if (space == null) {
                final QName name = new QName(namespace, prefix, localname);
  -             _namespaces.put(namespace, space = new Hashtable());
  +             _namespaces.put(namespace, space = new HashMap());
                space.put(localname, name);
                return name;
            }
  @@ -346,7 +346,7 @@
            }
        }
       }
  -    
  +
       public QName getQName(String scope, String name) {
        return getQName(scope + name);
       }
  @@ -366,13 +366,13 @@
       public QName getExcludeResultPrefixes() {
        return _excludeResultPrefixes;
       }
  -    
  -    /**      
  +
  +    /**
        * Create an instance of the <code>Stylesheet</code> class,
        * and then parse, typecheck and compile the instance.
        * Must be called after <code>parse()</code>.
        */
  -    public Stylesheet makeStylesheet(SyntaxTreeNode element) 
  +    public Stylesheet makeStylesheet(SyntaxTreeNode element)
        throws CompilerException {
        try {
            Stylesheet stylesheet;
  @@ -383,7 +383,7 @@
            else {
                stylesheet = new Stylesheet();
                stylesheet.setSimplified();
  -             stylesheet.addElement(element);
  +             stylesheet.add(element);
                stylesheet.setAttributes(element.getAttributes());
   
                // Map the default NS if not already defined
  @@ -399,7 +399,7 @@
            throw new CompilerException(err.toString());
        }
       }
  -    
  +
       /**
        * Instanciates a SAX2 parser and generate the AST from the input.
        */
  @@ -408,9 +408,9 @@
            if (stylesheet != null) {
                stylesheet.parseContents(this);
                final int precedence = stylesheet.getImportPrecedence();
  -             final Enumeration elements = stylesheet.elements();
  -             while (elements.hasMoreElements()) {
  -                 Object child = elements.nextElement();
  +             final Iterator elements = stylesheet.iterator();
  +             while (elements.hasNext()) {
  +                 Object child = elements.next();
                    if (child instanceof Text) {
                        final int l = _locator.getLineNumber();
                        ErrorMsg err =
  @@ -440,7 +440,7 @@
            reader.setContentHandler(this);
            reader.parse(input);
            // Find the start of the stylesheet within the tree
  -         return (SyntaxTreeNode)getStylesheet(_root);        
  +         return (SyntaxTreeNode)getStylesheet(_root);
        }
        catch (IOException e) {
            if (_xsltc.debug()) e.printStackTrace();
  @@ -522,9 +522,9 @@
   
       /**
        * Extracts the DOM for the stylesheet. In the case of an embedded
  -     * stylesheet, it extracts the DOM subtree corresponding to the 
  +     * stylesheet, it extracts the DOM subtree corresponding to the
        * embedded stylesheet that has an 'id' attribute whose value is the
  -     * same as the value declared in the <?xml-stylesheet...?> processing 
  +     * same as the value declared in the <?xml-stylesheet...?> processing
        * instruction (P.I.). In the xml-stylesheet P.I. the value is labeled
        * as the 'href' data of the P.I. The extracted DOM representing the
        * stylesheet is returned as an Element object.
  @@ -570,16 +570,16 @@
            String id = root.getAttribute("id");
            if (id.equals(href)) return root;
        }
  -     Vector children = root.getContents();
  +     ArrayList children = root.getContents();
        if (children != null) {
            final int count = children.size();
            for (int i = 0; i < count; i++) {
  -             SyntaxTreeNode child = (SyntaxTreeNode)children.elementAt(i);
  +             SyntaxTreeNode child = (SyntaxTreeNode)children.get(i);
                SyntaxTreeNode node = findStylesheet(child, href);
                if (node != null) return node;
            }
        }
  -     return null;    
  +     return null;
       }
   
       /**
  @@ -606,66 +606,66 @@
       }
   
       private void initInstructionAttrs() {
  -     initAttrTable("template", 
  +     initAttrTable("template",
            new String[] {"match", "name", "priority", "mode"});
  -     initAttrTable("stylesheet", 
  +     initAttrTable("stylesheet",
            new String[] {"id", "version", "extension-element-prefixes",
                "exclude-result-prefixes"});
        initAttrTable("transform",
            new String[] {"id", "version", "extension-element-prefixes",
                "exclude-result-prefixes"});
  -     initAttrTable("text", new String[] {"disable-output-escaping"}); 
  -     initAttrTable("if", new String[] {"test"}); 
  -     initAttrTable("choose", new String[] {}); 
  -     initAttrTable("when", new String[] {"test"}); 
  -     initAttrTable("otherwise", new String[] {}); 
  -     initAttrTable("for-each", new String[] {"select"}); 
  -     initAttrTable("message", new String[] {"terminate"}); 
  -     initAttrTable("number", 
  +     initAttrTable("text", new String[] {"disable-output-escaping"});
  +     initAttrTable("if", new String[] {"test"});
  +     initAttrTable("choose", new String[] {});
  +     initAttrTable("when", new String[] {"test"});
  +     initAttrTable("otherwise", new String[] {});
  +     initAttrTable("for-each", new String[] {"select"});
  +     initAttrTable("message", new String[] {"terminate"});
  +     initAttrTable("number",
            new String[] {"level", "count", "from", "value", "format", "lang",
                "letter-value", "grouping-separator", "grouping-size"});
  -             initAttrTable("comment", new String[] {}); 
  -     initAttrTable("copy", new String[] {"use-attribute-sets"}); 
  -     initAttrTable("copy-of", new String[] {"select"}); 
  -     initAttrTable("param", new String[] {"name", "select"}); 
  -     initAttrTable("with-param", new String[] {"name", "select"}); 
  -     initAttrTable("variable", new String[] {"name", "select"}); 
  -     initAttrTable("output", 
  -         new String[] {"method", "version", "encoding", 
  +             initAttrTable("comment", new String[] {});
  +     initAttrTable("copy", new String[] {"use-attribute-sets"});
  +     initAttrTable("copy-of", new String[] {"select"});
  +     initAttrTable("param", new String[] {"name", "select"});
  +     initAttrTable("with-param", new String[] {"name", "select"});
  +     initAttrTable("variable", new String[] {"name", "select"});
  +     initAttrTable("output",
  +         new String[] {"method", "version", "encoding",
                "omit-xml-declaration", "standalone", "doctype-public",
                "doctype-system", "cdata-section-elements", "indent",
  -             "media-type"}); 
  -     initAttrTable("sort", 
  +             "media-type"});
  +     initAttrTable("sort",
           new String[] {"select", "order", "case-order", "lang", "data-type"});
  -     initAttrTable("key", new String[] {"name", "match", "use"}); 
  -     initAttrTable("fallback", new String[] {}); 
  -     initAttrTable("attribute", new String[] {"name", "namespace"}); 
  -     initAttrTable("attribute-set", 
  -         new String[] {"name", "use-attribute-sets"}); 
  -     initAttrTable("value-of", 
  -         new String[] {"select", "disable-output-escaping"}); 
  -     initAttrTable("element", 
  -         new String[] {"name", "namespace", "use-attribute-sets"}); 
  -     initAttrTable("call-template", new String[] {"name"}); 
  -     initAttrTable("apply-templates", new String[] {"select", "mode"}); 
  -     initAttrTable("apply-imports", new String[] {}); 
  -     initAttrTable("decimal-format", 
  +     initAttrTable("key", new String[] {"name", "match", "use"});
  +     initAttrTable("fallback", new String[] {});
  +     initAttrTable("attribute", new String[] {"name", "namespace"});
  +     initAttrTable("attribute-set",
  +         new String[] {"name", "use-attribute-sets"});
  +     initAttrTable("value-of",
  +         new String[] {"select", "disable-output-escaping"});
  +     initAttrTable("element",
  +         new String[] {"name", "namespace", "use-attribute-sets"});
  +     initAttrTable("call-template", new String[] {"name"});
  +     initAttrTable("apply-templates", new String[] {"select", "mode"});
  +     initAttrTable("apply-imports", new String[] {});
  +     initAttrTable("decimal-format",
            new String[] {"name", "decimal-separator", "grouping-separator",
                "infinity", "minus-sign", "NaN", "percent", "per-mille",
  -             "zero-digit", "digit", "pattern-separator"}); 
  -     initAttrTable("import", new String[] {"href"}); 
  -     initAttrTable("include", new String[] {"href"}); 
  -     initAttrTable("strip-space", new String[] {"elements"}); 
  -     initAttrTable("preserve-space", new String[] {"elements"}); 
  -     initAttrTable("processing-instruction", new String[] {"name"}); 
  -     initAttrTable("namespace-alias", 
  -        new String[] {"stylesheet-prefix", "result-prefix"}); 
  +             "zero-digit", "digit", "pattern-separator"});
  +     initAttrTable("import", new String[] {"href"});
  +     initAttrTable("include", new String[] {"href"});
  +     initAttrTable("strip-space", new String[] {"elements"});
  +     initAttrTable("preserve-space", new String[] {"elements"});
  +     initAttrTable("processing-instruction", new String[] {"name"});
  +     initAttrTable("namespace-alias",
  +        new String[] {"stylesheet-prefix", "result-prefix"});
       }
   
   
   
       /**
  -     * Initialize the _instructionClasses Hashtable, which maps XSL element
  +     * Initialize the _instructionClasses HashMap, which maps XSL element
        * names to Java classes in this package.
        */
       private void initStdClasses() {
  @@ -705,7 +705,7 @@
        initStdClass("processing-instruction", "ProcessingInstruction");
        initStdClass("namespace-alias", "NamespaceAlias");
       }
  -    
  +
       private void initStdClass(String elementName, String className) {
        _instructionClasses.put(getQName(XSLT_URI, XSL, elementName),
                                COMPILER_PACKAGE + '.' + className);
  @@ -773,7 +773,7 @@
   
        MethodType D_SS =
            new MethodType(Type.NodeSet, Type.String, Type.String);
  -     MethodType D_SD = 
  +     MethodType D_SD =
            new MethodType(Type.NodeSet, Type.String, Type.NodeSet);
        MethodType B_BB =
            new MethodType(Type.Boolean, Type.Boolean, Type.Boolean);
  @@ -852,43 +852,43 @@
           _symbolTable.addPrimop("objectType", S_O);
   
        // Operators +, -, *, /, % defined on real types.
  -     _symbolTable.addPrimop("+", R_RR);      
  -     _symbolTable.addPrimop("-", R_RR);      
  -     _symbolTable.addPrimop("*", R_RR);      
  -     _symbolTable.addPrimop("/", R_RR);      
  -     _symbolTable.addPrimop("%", R_RR);      
  +     _symbolTable.addPrimop("+", R_RR);
  +     _symbolTable.addPrimop("-", R_RR);
  +     _symbolTable.addPrimop("*", R_RR);
  +     _symbolTable.addPrimop("/", R_RR);
  +     _symbolTable.addPrimop("%", R_RR);
   
        // Operators +, -, * defined on integer types.
        // Operators / and % are not  defined on integers (may cause exception)
  -     _symbolTable.addPrimop("+", I_II);      
  -     _symbolTable.addPrimop("-", I_II);      
  -     _symbolTable.addPrimop("*", I_II);      
  +     _symbolTable.addPrimop("+", I_II);
  +     _symbolTable.addPrimop("-", I_II);
  +     _symbolTable.addPrimop("*", I_II);
   
         // Operators <, <= >, >= defined on real types.
  -     _symbolTable.addPrimop("<",  B_RR);     
  -     _symbolTable.addPrimop("<=", B_RR);     
  -     _symbolTable.addPrimop(">",  B_RR);     
  -     _symbolTable.addPrimop(">=", B_RR);     
  +     _symbolTable.addPrimop("<",  B_RR);
  +     _symbolTable.addPrimop("<=", B_RR);
  +     _symbolTable.addPrimop(">",  B_RR);
  +     _symbolTable.addPrimop(">=", B_RR);
   
        // Operators <, <= >, >= defined on int types.
  -     _symbolTable.addPrimop("<",  B_II);     
  -     _symbolTable.addPrimop("<=", B_II);     
  -     _symbolTable.addPrimop(">",  B_II);     
  -     _symbolTable.addPrimop(">=", B_II);     
  +     _symbolTable.addPrimop("<",  B_II);
  +     _symbolTable.addPrimop("<=", B_II);
  +     _symbolTable.addPrimop(">",  B_II);
  +     _symbolTable.addPrimop(">=", B_II);
   
        // Operators <, <= >, >= defined on boolean types.
  -     _symbolTable.addPrimop("<",  B_BB);     
  -     _symbolTable.addPrimop("<=", B_BB);     
  -     _symbolTable.addPrimop(">",  B_BB);     
  -     _symbolTable.addPrimop(">=", B_BB);     
  +     _symbolTable.addPrimop("<",  B_BB);
  +     _symbolTable.addPrimop("<=", B_BB);
  +     _symbolTable.addPrimop(">",  B_BB);
  +     _symbolTable.addPrimop(">=", B_BB);
   
        // Operators 'and' and 'or'.
  -     _symbolTable.addPrimop("or", B_BB);     
  -     _symbolTable.addPrimop("and", B_BB);    
  +     _symbolTable.addPrimop("or", B_BB);
  +     _symbolTable.addPrimop("and", B_BB);
   
        // Unary minus.
  -     _symbolTable.addPrimop("u-", R_R);      
  -     _symbolTable.addPrimop("u-", I_I);      
  +     _symbolTable.addPrimop("u-", R_R);
  +     _symbolTable.addPrimop("u-", I_I);
       }
   
       public SymbolTable getSymbolTable() {
  @@ -923,7 +923,7 @@
   
       private boolean versionIsOne = true;
   
  -    public SyntaxTreeNode makeInstance(String uri, String prefix, 
  +    public SyntaxTreeNode makeInstance(String uri, String prefix,
        String local, Attributes attributes)
       {
        SyntaxTreeNode node = null;
  @@ -1000,11 +1000,11 @@
        * checks the list of attributes against a list of allowed attributes
        * for a particular element node.
        */
  -    private void checkForSuperfluousAttributes(SyntaxTreeNode node, 
  +    private void checkForSuperfluousAttributes(SyntaxTreeNode node,
        Attributes attrs)
       {
        QName qname = node.getQName();
  -     boolean isStylesheet = (node instanceof Stylesheet); 
  +     boolean isStylesheet = (node instanceof Stylesheet);
           String[] legal = (String[]) _instructionAttrs.get(qname);
        if (versionIsOne && legal != null) {
            int j;
  @@ -1024,16 +1024,16 @@
                for (j = 0; j < legal.length; j++) {
                    if (attrQName.equalsIgnoreCase(legal[j])) {
                        break;
  -                 }   
  +                 }
                }
                if (j == legal.length) {
  -                 final ErrorMsg err = 
  -                     new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, 
  +                 final ErrorMsg err =
  +                     new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR,
                                attrQName, node);
                    reportError(WARNING, err);
                }
            }
  -        }    
  +        }
       }
   
   
  @@ -1108,7 +1108,7 @@
   // System.out.println("e = " + text + " " + node);
                    return node;
                }
  -         } 
  +         }
            reportError(ERROR, new ErrorMsg(ErrorMsg.XPATH_PARSER_ERR,
                                            expression, parent));
        }
  @@ -1120,7 +1120,7 @@
   
        // Return a dummy pattern (which is an expression)
        SyntaxTreeNode.Dummy.setParser(this);
  -        return SyntaxTreeNode.Dummy; 
  +        return SyntaxTreeNode.Dummy;
       }
   
       /************************ ERROR HANDLING SECTION 
************************/
  @@ -1140,7 +1140,7 @@
        if (size > 0) {
            System.err.println(ErrorMsg.getCompileErrorMessage());
            for (int i = 0; i < size; i++) {
  -             System.err.println("  " + _errors.elementAt(i));
  +             System.err.println("  " + _errors.get(i));
            }
        }
       }
  @@ -1153,7 +1153,7 @@
        if (size > 0) {
            System.err.println(ErrorMsg.getCompileWarningMessage());
            for (int i = 0; i < size; i++) {
  -             System.err.println("  " + _warnings.elementAt(i));
  +             System.err.println("  " + _warnings.get(i));
            }
        }
       }
  @@ -1166,43 +1166,43 @@
        case Constants.INTERNAL:
            // Unexpected internal errors, such as null-ptr exceptions, etc.
            // Immediately terminates compilation, no translet produced
  -         _errors.addElement(error);
  +         _errors.add(error);
            break;
        case Constants.UNSUPPORTED:
            // XSLT elements that are not implemented and unsupported ext.
            // Immediately terminates compilation, no translet produced
  -         _errors.addElement(error);
  +         _errors.add(error);
            break;
        case Constants.FATAL:
            // Fatal error in the stylesheet input (parsing or content)
            // Immediately terminates compilation, no translet produced
  -         _errors.addElement(error);
  +         _errors.add(error);
            break;
        case Constants.ERROR:
            // Other error in the stylesheet input (parsing or content)
            // Does not terminate compilation, no translet produced
  -         _errors.addElement(error);
  +         _errors.add(error);
            break;
        case Constants.WARNING:
            // Other error in the stylesheet input (content errors only)
            // Does not terminate compilation, a translet is produced
  -         _warnings.addElement(error);
  +         _warnings.add(error);
            break;
        }
       }
   
  -    public Vector getErrors() {
  +    public ArrayList getErrors() {
        return _errors;
       }
   
  -    public Vector getWarnings() {
  +    public ArrayList getWarnings() {
        return _warnings;
       }
   
       /************************ SAX2 ContentHandler INTERFACE 
*****************/
   
       private Stack _parentStack = null;
  -    private Hashtable _prefixMapping = null;
  +    private HashMap _prefixMapping = null;
   
       /**
        * SAX2: Receive notification of the beginning of a document.
  @@ -1226,7 +1226,7 @@
        */
       public void startPrefixMapping(String prefix, String uri) {
        if (_prefixMapping == null) {
  -         _prefixMapping = new Hashtable();
  +         _prefixMapping = new HashMap();
        }
        _prefixMapping.put(prefix, uri);
       }
  @@ -1243,12 +1243,12 @@
        *       we clone the attributes in our own Attributes implementation
        */
       public void startElement(String uri, String localname,
  -                          String qname, Attributes attributes) 
  +                          String qname, Attributes attributes)
        throws SAXException {
        final int col = qname.lastIndexOf(':');
        final String prefix = (col == -1) ? null : qname.substring(0, col);
   
  -     SyntaxTreeNode element = makeInstance(uri, prefix, 
  +     SyntaxTreeNode element = makeInstance(uri, prefix,
                                        localname, attributes);
        if (element == null) {
            ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR,
  @@ -1259,8 +1259,8 @@
        // If this is the root element of the XML document we need to make sure
        // that it contains a definition of the XSL namespace URI
        if (_root == null) {
  -         if ((_prefixMapping == null) ||
  -             (_prefixMapping.containsValue(Constants.XSLT_URI) == false))
  +         if (_prefixMapping == null ||
  +             _prefixMapping.containsValue(Constants.XSLT_URI) == false)
                _rootNamespaceDef = false;
            else
                _rootNamespaceDef = true;
  @@ -1268,12 +1268,12 @@
        }
        else {
            SyntaxTreeNode parent = (SyntaxTreeNode)_parentStack.peek();
  -         parent.addElement(element);
  +         parent.add(element);
            element.setParent(parent);
        }
        element.setAttributes((Attributes)new AttributeList(attributes));
        element.setPrefixMapping(_prefixMapping);
  -     
  +
        if (element instanceof Stylesheet) {
            // Extension elements and excluded elements have to be
            // handled at this point in order to correctly generate
  @@ -1324,7 +1324,7 @@
        }
   
        // Add it as a regular text node otherwise
  -     parent.addElement(new Text(string));
  +     parent.add(new Text(string));
       }
   
       private String getTokenValue(String token) {
  @@ -1348,8 +1348,8 @@
   
            // Get the attributes from the processing instruction
            StringTokenizer tokens = new StringTokenizer(value);
  -         while (tokens.hasMoreElements()) {
  -             String token = (String)tokens.nextElement();
  +         while (tokens.hasMoreTokens()) {
  +             String token = (String)tokens.nextToken();
                if (token.startsWith("href"))
                    href = getTokenValue(token);
                else if (token.startsWith("media"))
  
  
  
  1.24.2.1.2.2 +23 -23    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Predicate.java
  
  Index: Predicate.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Predicate.java,v
  retrieving revision 1.24.2.1.2.1
  retrieving revision 1.24.2.1.2.2
  diff -u -r1.24.2.1.2.1 -r1.24.2.1.2.2
  --- Predicate.java    2 Dec 2002 15:51:17 -0000       1.24.2.1.2.1
  +++ Predicate.java    10 Jan 2003 16:50:41 -0000      1.24.2.1.2.2
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.ArrayList;
   
   import org.apache.bcel.classfile.JavaClass;
  @@ -138,7 +138,7 @@
       }
   
       /**
  -     * Returns the name of the auxiliary class or null if this predicate 
  +     * Returns the name of the auxiliary class or null if this predicate
        * is compiled inside the Translet.
        */
       public String getInnerClassName() {
  @@ -209,12 +209,12 @@
        else
            return "pred(" + _exp + ')';
       }
  -     
  +
       /**
  -     * Type check a predicate expression. If the type of the expression is 
  +     * Type check a predicate expression. If the type of the expression is
        * number convert it to boolean by adding a comparison with position().
        * Note that if the expression is a parameter, we cannot distinguish
  -     * at compile time if its type is number or not. Hence, expressions of 
  +     * at compile time if its type is number or not. Hence, expressions of
        * reference type are always converted to booleans.
        */
       public Type typeCheck(SymbolTable stable) throws TypeCheckError {
  @@ -311,10 +311,10 @@
   
        return _type = Type.Boolean;
       }
  -     
  +
       /**
        * Create a new "Filter" class implementing
  -     * <code>CurrentNodeListFilter</code>. Allocate registers for local 
  +     * <code>CurrentNodeListFilter</code>. Allocate registers for local
        * variables and local parameters passed in the closure to test().
        * Notice that local variables need to be "unboxed".
        */
  @@ -327,12 +327,12 @@
        _className = getXSLTC().getHelperClassName();
        filterGen = new FilterGenerator(_className,
                                        "java.lang.Object",
  -                                     toString(), 
  +                                     toString(),
                                        ACC_PUBLIC | ACC_SUPER,
                                        new String[] {
                                            CURRENT_NODE_LIST_FILTER
                                        },
  -                                     classGen.getStylesheet());      
  +                                     classGen.getStylesheet());
   
        final ConstantPoolGen cpg = filterGen.getConstantPool();
        final int length = (_closureVars == null) ? 0 : _closureVars.size();
  @@ -341,7 +341,7 @@
        for (int i = 0; i < length; i++) {
            VariableBase var = ((VariableRefBase) 
_closureVars.get(i)).getVariable();
   
  -         filterGen.addField(new Field(ACC_PUBLIC, 
  +         filterGen.addField(new Field(ACC_PUBLIC,
                                        cpg.addUtf8(var.getVariable()),
                                        
cpg.addUtf8(var.getType().toSignature()),
                                        null, cpg.getConstantPool()));
  @@ -349,7 +349,7 @@
   
        final InstructionList il = new InstructionList();
        testGen = new TestGenerator(ACC_PUBLIC | ACC_FINAL,
  -                                 org.apache.bcel.generic.Type.BOOLEAN, 
  +                                 org.apache.bcel.generic.Type.BOOLEAN,
                                    new org.apache.bcel.generic.Type[] {
                                        org.apache.bcel.generic.Type.INT,
                                        org.apache.bcel.generic.Type.INT,
  @@ -367,7 +367,7 @@
                                        "iterator"
                                    },
                                    "test", _className, il, cpg);
  -             
  +
        // Store the dom in a local variable
        local = testGen.addLocalVariable("document",
                                         Util.getJCRefType(DOM_INTF_SIG),
  @@ -384,14 +384,14 @@
   
        _exp.translate(filterGen, testGen);
        il.append(IRETURN);
  -     
  +
        testGen.stripAttributes(true);
        testGen.setMaxLocals();
        testGen.setMaxStack();
        testGen.removeNOPs();
        filterGen.addEmptyConstructor(ACC_PUBLIC);
        filterGen.addMethod(testGen.getMethod());
  -             
  +
        getXSLTC().dumpClass(filterGen.getJavaClass());
       }
   
  @@ -432,14 +432,14 @@
            Type tleft = left.getType();
            Type tright = right.getType();
   
  -         
  +
            if (left instanceof CastExpr) left = ((CastExpr)left).getExpr();
            if (right instanceof CastExpr) right = ((CastExpr)right).getExpr();
  -         
  +
            try {
                if ((tleft == Type.String) && (!(left instanceof Step)))
                    _value = exp.getLeft();
  -             if (left instanceof VariableRefBase) 
  +             if (left instanceof VariableRefBase)
                    _value = new CastExpr(left, Type.String);
                if (_value != null) return _value;
            }
  @@ -472,7 +472,7 @@
   
            if (left instanceof CastExpr) left = ((CastExpr)left).getExpr();
            if (left instanceof Step) _step = (Step)left;
  -         
  +
            if (right instanceof CastExpr) right = ((CastExpr)right).getExpr();
            if (right instanceof Step) _step = (Step)right;
        }
  @@ -508,14 +508,14 @@
        * filter object and a reference to the predicate's closure.
        */
       public void translateFilter(ClassGenerator classGen,
  -                             MethodGenerator methodGen) 
  +                             MethodGenerator methodGen)
       {
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();
   
        // Compile auxiliary class for filter
        compileFilter(classGen, methodGen);
  -     
  +
        // Create new instance of filter
        il.append(new NEW(cpg.addClass(_className)));
        il.append(DUP);
  @@ -543,7 +543,7 @@
            if (variableClosure != null) {
                il.append(ALOAD_0);
                il.append(new GETFIELD(
  -                 cpg.addFieldref(variableClosure.getInnerClassName(), 
  +                 cpg.addFieldref(variableClosure.getInnerClassName(),
                        var.getVariable(), varType.toSignature())));
            }
            else {
  @@ -553,7 +553,7 @@
   
            // Store variable in new closure
            il.append(new PUTFIELD(
  -                 cpg.addFieldref(_className, var.getVariable(), 
  +                 cpg.addFieldref(_className, var.getVariable(),
                        varType.toSignature())));
        }
       }
  
  
  
  1.2.8.1.2.1 +4 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ProcessingInstructionPattern.java
  
  Index: ProcessingInstructionPattern.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ProcessingInstructionPattern.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- ProcessingInstructionPattern.java 14 Aug 2002 19:21:33 -0000      1.2.8.1
  +++ ProcessingInstructionPattern.java 10 Jan 2003 16:50:41 -0000      
1.2.8.1.2.1
  @@ -62,7 +62,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -107,7 +107,7 @@
            // Type check all the predicates (e -> position() = e)
            final int n = _predicates.size();
            for (int i = 0; i < n; i++) {
  -             final Predicate pred = (Predicate)_predicates.elementAt(i);
  +             final Predicate pred = (Predicate)_predicates.get(i);
                pred.typeCheck(stable);
            }
        }
  @@ -158,7 +158,7 @@
        if (hasPredicates()) {
            final int n = _predicates.size();
            for (int i = 0; i < n; i++) {
  -             Predicate pred = (Predicate)_predicates.elementAt(i);
  +             Predicate pred = (Predicate)_predicates.get(i);
                Expression exp = pred.getExpr();
                exp.translateDesynthesized(classGen, methodGen);
                _trueList.append(exp._trueList);
  
  
  
  1.12.8.1.2.2 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/RelationalExpr.java
  
  Index: RelationalExpr.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/RelationalExpr.java,v
  retrieving revision 1.12.8.1.2.1
  retrieving revision 1.12.8.1.2.2
  diff -u -r1.12.8.1.2.1 -r1.12.8.1.2.2
  --- RelationalExpr.java       2 Dec 2002 15:51:17 -0000       1.12.8.1.2.1
  +++ RelationalExpr.java       10 Jan 2003 16:50:41 -0000      1.12.8.1.2.2
  @@ -200,11 +200,11 @@
                                                       tleft, tright)); 
   
        if (ptype != null) {
  -         Type arg1 = (Type) ptype.argsType().elementAt(0);
  +         Type arg1 = (Type) ptype.argsType().get(0);
            if (!arg1.identicalTo(tleft)) {
                _left = new CastExpr(_left, arg1);
            }
  -         Type arg2 = (Type) ptype.argsType().elementAt(1);
  +         Type arg2 = (Type) ptype.argsType().get(1);
            if (!arg2.identicalTo(tright)) {
                _right = new CastExpr(_right, arg1);                            
            }
  
  
  
  1.4.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/RoundCall.java
  
  Index: RoundCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/RoundCall.java,v
  retrieving revision 1.4.8.1
  retrieving revision 1.4.8.1.2.1
  diff -u -r1.4.8.1 -r1.4.8.1.2.1
  --- RoundCall.java    14 Aug 2002 19:21:33 -0000      1.4.8.1
  +++ RoundCall.java    10 Jan 2003 16:50:41 -0000      1.4.8.1.2.1
  @@ -63,13 +63,13 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   
   final class RoundCall extends FunctionCall {
   
  -    public RoundCall(QName fname, Vector arguments) {
  +    public RoundCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.15.2.1.2.2 +58 -58    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Sort.java
  
  Index: Sort.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Sort.java,v
  retrieving revision 1.15.2.1.2.1
  retrieving revision 1.15.2.1.2.2
  diff -u -r1.15.2.1.2.1 -r1.15.2.1.2.2
  --- Sort.java 2 Dec 2002 15:51:17 -0000       1.15.2.1.2.1
  +++ Sort.java 10 Jan 2003 16:50:41 -0000      1.15.2.1.2.2
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.ArrayList;
   import java.util.StringTokenizer;
   import java.util.NoSuchElementException;
  @@ -116,7 +116,7 @@
       }
   
       /**
  -     * Returns the name of the auxiliary class or null if this predicate 
  +     * Returns the name of the auxiliary class or null if this predicate
        * is compiled inside the Translet.
        */
       public String getInnerClassName() {
  @@ -196,7 +196,7 @@
            }
        }
       }
  -    
  +
       /**
        * Run type checks on the attributes; expression must return a string
        * which we will use as a sort key
  @@ -224,12 +224,12 @@
                                  MethodGenerator methodGen) {
        _dataType.translate(classGen, methodGen);
       }
  -    
  +
       public void translateSortOrder(ClassGenerator classGen,
                                   MethodGenerator methodGen) {
        _order.translate(classGen, methodGen);
       }
  -    
  +
       /**
        * This method compiles code for the select expression for this
        * xsl:sort element. The method is called from the static code-generating
  @@ -255,7 +255,7 @@
       public static void translateSortIterator(ClassGenerator classGen,
                                      MethodGenerator methodGen,
                                      Expression nodeSet,
  -                                   Vector sortObjects) 
  +                                   ArrayList sortObjects)
       {
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();
  @@ -265,7 +265,7 @@
                                          "("
                                          + NODE_ITERATOR_SIG
                                          + NODE_SORT_FACTORY_SIG
  -                                       + ")V");      
  +                                       + ")V");
   
        il.append(new NEW(cpg.addClass(SORT_ITERATOR)));
        il.append(DUP);
  @@ -283,7 +283,7 @@
        else {
            nodeSet.translate(classGen, methodGen);
        }
  -     
  +
        // Compile the code for the NodeSortRecord producing class and pass
        // that as the last argument to the SortingIterator constructor.
        compileSortRecordFactory(sortObjects, classGen, methodGen);
  @@ -295,29 +295,29 @@
        * Compiles code that instantiates a NodeSortRecordFactory object which
        * will produce NodeSortRecord objects of a specific type.
        */
  -    public static void compileSortRecordFactory(Vector sortObjects,
  -     ClassGenerator classGen, MethodGenerator methodGen) 
  +    public static void compileSortRecordFactory(ArrayList sortObjects,
  +     ClassGenerator classGen, MethodGenerator methodGen)
       {
  -     String sortRecordClass = 
  +     String sortRecordClass =
            compileSortRecord(sortObjects, classGen, methodGen);
   
        boolean needsSortRecordFactory = false;
        final int nsorts = sortObjects.size();
        for (int i = 0; i < nsorts; i++) {
  -         final Sort sort = (Sort) sortObjects.elementAt(i);
  +         final Sort sort = (Sort) sortObjects.get(i);
            needsSortRecordFactory |= sort._needsSortRecordFactory;
        }
   
        String sortRecordFactoryClass = NODE_SORT_FACTORY;
        if (needsSortRecordFactory) {
  -         sortRecordFactoryClass = 
  -             compileSortRecordFactory(sortObjects, classGen, methodGen, 
  +         sortRecordFactoryClass =
  +             compileSortRecordFactory(sortObjects, classGen, methodGen,
                    sortRecordClass);
        }
   
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();
  -     
  +
        il.append(new NEW(cpg.addClass(sortRecordFactoryClass)));
        il.append(DUP);
        il.append(methodGen.loadDOM());
  @@ -328,7 +328,7 @@
        il.append(new PUSH(cpg, nsorts));
        il.append(new ANEWARRAY(cpg.addClass(STRING)));
        for (int level = 0; level < nsorts; level++) {
  -         final Sort sort = (Sort)sortObjects.elementAt(level);
  +         final Sort sort = (Sort)sortObjects.get(level);
            il.append(DUP);
            il.append(new PUSH(cpg, level));
            sort.translateSortOrder(classGen, methodGen);
  @@ -338,7 +338,7 @@
        il.append(new PUSH(cpg, nsorts));
        il.append(new ANEWARRAY(cpg.addClass(STRING)));
        for (int level = 0; level < nsorts; level++) {
  -         final Sort sort = (Sort)sortObjects.elementAt(level);
  +         final Sort sort = (Sort)sortObjects.get(level);
            il.append(DUP);
            il.append(new PUSH(cpg, level));
            sort.translateSortType(classGen, methodGen);
  @@ -346,8 +346,8 @@
        }
   
        il.append(new INVOKESPECIAL(
  -         cpg.addMethodref(sortRecordFactoryClass, "<init>", 
  -             "(" + DOM_INTF_SIG 
  +         cpg.addMethodref(sortRecordFactoryClass, "<init>",
  +             "(" + DOM_INTF_SIG
                    + STRING_SIG
                    + TRANSLET_INTF_SIG
                    + "[" + STRING_SIG
  @@ -358,7 +358,7 @@
   
        for (int j = 0; j < nsorts; j++) {
            final Sort sort = (Sort) sortObjects.get(j);
  -         final int length = (sort._closureVars == null) ? 0 : 
  +         final int length = (sort._closureVars == null) ? 0 :
                sort._closureVars.size();
   
            for (int i = 0; i < length; i++) {
  @@ -373,18 +373,18 @@
                il.append(DUP);
                il.append(var.loadInstruction());
                il.append(new PUTFIELD(
  -                     cpg.addFieldref(sortRecordFactoryClass, 
var.getVariable(), 
  +                     cpg.addFieldref(sortRecordFactoryClass, 
var.getVariable(),
                            var.getType().toSignature())));
                dups.add(varRef);
            }
        }
       }
   
  -    public static String compileSortRecordFactory(Vector sortObjects,
  -     ClassGenerator classGen, MethodGenerator methodGen, 
  +    public static String compileSortRecordFactory(ArrayList sortObjects,
  +     ClassGenerator classGen, MethodGenerator methodGen,
        String sortRecordClass)
       {
  -     final XSLTC  xsltc = ((Sort)sortObjects.firstElement()).getXSLTC();
  +     final XSLTC  xsltc = ((Sort)sortObjects.get(0)).getXSLTC();
        final String className = xsltc.getHelperClassName();
   
        final NodeSortRecordFactGenerator sortRecordFactory =
  @@ -403,7 +403,7 @@
   
        for (int j = 0; j < nsorts; j++) {
            final Sort sort = (Sort) sortObjects.get(j);
  -         final int length = (sort._closureVars == null) ? 0 : 
  +         final int length = (sort._closureVars == null) ? 0 :
                sort._closureVars.size();
   
            for (int i = 0; i < length; i++) {
  @@ -413,7 +413,7 @@
                if (dups.contains(varRef)) continue;
   
                final VariableBase var = varRef.getVariable();
  -             sortRecordFactory.addField(new Field(ACC_PUBLIC, 
  +             sortRecordFactory.addField(new Field(ACC_PUBLIC,
                                           cpg.addUtf8(var.getVariable()),
                                           
cpg.addUtf8(var.getType().toSignature()),
                                           null, cpg.getConstantPool()));
  @@ -422,7 +422,7 @@
        }
   
        // Define a constructor for this class
  -     final org.apache.bcel.generic.Type[] argTypes = 
  +     final org.apache.bcel.generic.Type[] argTypes =
            new org.apache.bcel.generic.Type[5];
        argTypes[0] = Util.getJCRefType(DOM_INTF_SIG);
        argTypes[1] = Util.getJCRefType(STRING_SIG);
  @@ -440,8 +440,8 @@
        InstructionList il = new InstructionList();
        final MethodGenerator constructor =
            new MethodGenerator(ACC_PUBLIC,
  -                             org.apache.bcel.generic.Type.VOID, 
  -                             argTypes, argNames, "<init>", 
  +                             org.apache.bcel.generic.Type.VOID,
  +                             argTypes, argNames, "<init>",
                                className, il, cpg);
   
        // Push all parameters onto the stack and called super.<init>()
  @@ -452,20 +452,20 @@
        il.append(new ALOAD(4));
        il.append(new ALOAD(5));
        il.append(new INVOKESPECIAL(cpg.addMethodref(NODE_SORT_FACTORY,
  -         "<init>", 
  -         "(" + DOM_INTF_SIG 
  -             + STRING_SIG 
  -             + TRANSLET_INTF_SIG 
  +         "<init>",
  +         "(" + DOM_INTF_SIG
  +             + STRING_SIG
  +             + TRANSLET_INTF_SIG
                + "[" + STRING_SIG
                + "[" + STRING_SIG + ")V")));
        il.append(RETURN);
   
        // Override the definition of makeNodeSortRecord()
  -     il = new InstructionList(); 
  +     il = new InstructionList();
        final MethodGenerator makeNodeSortRecord =
            new MethodGenerator(ACC_PUBLIC,
  -             Util.getJCRefType(NODE_SORT_RECORD_SIG), 
  -             new org.apache.bcel.generic.Type[] { 
  +             Util.getJCRefType(NODE_SORT_RECORD_SIG),
  +             new org.apache.bcel.generic.Type[] {
                    org.apache.bcel.generic.Type.INT,
                    org.apache.bcel.generic.Type.INT },
                new String[] { "node", "last" }, "makeNodeSortRecord",
  @@ -485,7 +485,7 @@
            final VariableRef varRef = (VariableRef) dups.get(i);
            final VariableBase var = varRef.getVariable();
            final Type varType = var.getType();
  -         
  +
            il.append(DUP);
   
            // Get field from factory class
  @@ -516,10 +516,10 @@
       /**
        * Create a new auxillary class extending NodeSortRecord.
        */
  -    private static String compileSortRecord(Vector sortObjects,
  +    private static String compileSortRecord(ArrayList sortObjects,
                                            ClassGenerator classGen,
                                            MethodGenerator methodGen) {
  -     final XSLTC  xsltc = ((Sort)sortObjects.firstElement()).getXSLTC();
  +     final XSLTC  xsltc = ((Sort)sortObjects.get(0)).getXSLTC();
        final String className = xsltc.getHelperClassName();
   
        // This generates a new class for handling this specific sort
  @@ -530,8 +530,8 @@
                                        ACC_PUBLIC | ACC_SUPER | ACC_FINAL,
                                        new String[] {},
                                        classGen.getStylesheet());
  -     
  -     final ConstantPoolGen cpg = sortRecord.getConstantPool();       
  +
  +     final ConstantPoolGen cpg = sortRecord.getConstantPool();
   
        // Add a new instance variable for each var in closure
        final int nsorts = sortObjects.size();
  @@ -541,9 +541,9 @@
            final Sort sort = (Sort) sortObjects.get(j);
   
            // Set the name of the inner class in this sort object
  -         sort.setInnerClassName(className);  
  +         sort.setInnerClassName(className);
   
  -         final int length = (sort._closureVars == null) ? 0 : 
  +         final int length = (sort._closureVars == null) ? 0 :
                sort._closureVars.size();
            for (int i = 0; i < length; i++) {
                final VariableRef varRef = (VariableRef) 
sort._closureVars.get(i);
  @@ -552,7 +552,7 @@
                if (dups.contains(varRef)) continue;
   
                final VariableBase var = varRef.getVariable();
  -             sortRecord.addField(new Field(ACC_PUBLIC, 
  +             sortRecord.addField(new Field(ACC_PUBLIC,
                                    cpg.addUtf8(var.getVariable()),
                                    cpg.addUtf8(var.getType().toSignature()),
                                    null, cpg.getConstantPool()));
  @@ -570,7 +570,7 @@
   
        // Overload NodeSortRecord.getCollator() only if needed
        for (int i = 0; i < sortObjects.size(); i++) {
  -         if (((Sort)(sortObjects.elementAt(i)))._lang != null) {
  +         if (((Sort)(sortObjects.get(i)))._lang != null) {
                sortRecord.addMethod(compileGetCollator(sortObjects,
                                                        sortRecord,
                                                        cpg,
  @@ -578,7 +578,7 @@
                i = sortObjects.size();
            }
        }
  -     
  +
        xsltc.dumpClass(sortRecord.getJavaClass());
        return className;
       }
  @@ -588,7 +588,7 @@
        * is to initialize a couple of tables that contain information on sort
        * order and sort type. These static tables cannot be in the parent 
class.
        */
  -    private static Method compileClassInit(Vector sortObjects,
  +    private static Method compileClassInit(ArrayList sortObjects,
                                           NodeSortRecordGenerator sortRecord,
                                           ConstantPoolGen cpg,
                                           String className) {
  @@ -596,7 +596,7 @@
        final InstructionList il = new InstructionList();
        final CompareGenerator classInit =
            new CompareGenerator(ACC_PUBLIC | ACC_STATIC,
  -                              org.apache.bcel.generic.Type.VOID, 
  +                              org.apache.bcel.generic.Type.VOID,
                                 new org.apache.bcel.generic.Type[] { },
                                 new String[] { },
                                 "<clinit>", className, il, cpg);
  @@ -605,7 +605,7 @@
                                                 "<init>",
                                                 "(Ljava/lang/String;"+
                                                 "Ljava/lang/String;)V");
  -     
  +
        final int getCollator = cpg.addMethodref(COLLATOR_CLASS,
                                                 "getInstance",
                                                 "(Ljava/util/Locale;)"+
  @@ -625,7 +625,7 @@
        // Compile code that initializes the locale
        String language = null;
        String country = null;
  -     Sort sort = (Sort)sortObjects.elementAt(0);
  +     Sort sort = (Sort)sortObjects.get(0);
   
        for (int level = 0; level < levels; level++) {
            if (language == null && sort._lang != null)
  @@ -645,7 +645,7 @@
            il.append(new PUSH(cpg, language));
            il.append(new PUSH(cpg, (country != null ? country : EMPTYSTRING)));
            il.append(new INVOKESPECIAL(initLocale));
  -         
  +
            // Use that Locale object to get the required Collator object
            il.append(new INVOKESTATIC(getCollator));
            il.append(new PUTSTATIC(collator));
  @@ -669,16 +669,16 @@
       /**
        * Compiles a method that overloads NodeSortRecord.extractValueFromDOM()
        */
  -    private static Method compileExtract(Vector sortObjects,
  +    private static Method compileExtract(ArrayList sortObjects,
                                         NodeSortRecordGenerator sortRecord,
                                         ConstantPoolGen cpg,
                                         String className) {
        final InstructionList il = new InstructionList();
  -     
  +
        // String NodeSortRecord.extractValueFromDOM(dom,node,level);
        final CompareGenerator extractMethod =
            new CompareGenerator(ACC_PUBLIC | ACC_FINAL,
  -                              org.apache.bcel.generic.Type.STRING, 
  +                              org.apache.bcel.generic.Type.STRING,
                                 new org.apache.bcel.generic.Type[] {
                                     Util.getJCRefType(DOM_INTF_SIG),
                                     org.apache.bcel.generic.Type.INT,
  @@ -711,12 +711,12 @@
        // Append all the cases for the switch statment
        for (int level = 0; level < levels; level++) {
            match[level] = level;
  -         final Sort sort = (Sort)sortObjects.elementAt(level);
  +         final Sort sort = (Sort)sortObjects.get(level);
            target[level] = il.append(NOP);
            sort.translateSelect(sortRecord, extractMethod);
            il.append(ARETURN);
        }
  -     
  +
        // Compile def. target for switch statement if key has multiple levels
        if (levels > 1) {
            // Append the default target - it will _NEVER_ be reached
  @@ -738,7 +738,7 @@
        * Compiles a method that overloads NodeSortRecord.getCollator()
        * This method is only compiled if the "lang" attribute is used.
        */
  -    private static Method compileGetCollator(Vector sortObjects,
  +    private static Method compileGetCollator(ArrayList sortObjects,
                                             NodeSortRecordGenerator sortRecord,
                                             ConstantPoolGen cpg,
                                             String className) {
  
  
  
  1.4.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/StartsWithCall.java
  
  Index: StartsWithCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/StartsWithCall.java,v
  retrieving revision 1.4.8.1
  retrieving revision 1.4.8.1.2.1
  diff -u -r1.4.8.1 -r1.4.8.1.2.1
  --- StartsWithCall.java       14 Aug 2002 19:21:33 -0000      1.4.8.1
  +++ StartsWithCall.java       10 Jan 2003 16:50:41 -0000      1.4.8.1.2.1
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -78,7 +78,7 @@
       /**
        * Create a starts-with() call - two arguments, both strings
        */
  -    public StartsWithCall(QName fname, Vector arguments) {
  +    public StartsWithCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.37.2.1.2.2 +25 -24    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Step.java
  
  Index: Step.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Step.java,v
  retrieving revision 1.37.2.1.2.1
  retrieving revision 1.37.2.1.2.2
  diff -u -r1.37.2.1.2.1 -r1.37.2.1.2.2
  --- Step.java 2 Dec 2002 15:51:18 -0000       1.37.2.1.2.1
  +++ Step.java 10 Jan 2003 16:50:41 -0000      1.37.2.1.2.2
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -82,7 +82,7 @@
       /**
        * A vector of predicates (filters) defined on this step - may be null
        */
  -    private Vector _predicates;
  +    private ArrayList _predicates;
   
       /**
        * Some simple predicates can be handled by this class (and not by the
  @@ -96,7 +96,7 @@
        */
       private int _nodeType;
   
  -    public Step(int axis, int nodeType, Vector predicates) {
  +    public Step(int axis, int nodeType, ArrayList predicates) {
        _axis = axis;
        _nodeType = nodeType;
        _predicates = predicates;
  @@ -110,20 +110,20 @@
        if (_predicates != null) {
            final int n = _predicates.size();
            for (int i = 0; i < n; i++) {
  -             final Predicate exp = (Predicate)_predicates.elementAt(i);
  +             final Predicate exp = (Predicate)_predicates.get(i);
                exp.setParser(parser);
                exp.setParent(this);
            }
        }
       }
  -    
  +
       /**
        * Define the axis (defined in Axis class) for this step
        */
       public int getAxis() {
        return _axis;
       }
  -     
  +
       /**
        * Get the axis (defined in Axis class) for this step
        */
  @@ -141,14 +141,14 @@
       /**
        * Returns the vector containing all predicates for this step.
        */
  -    public Vector getPredicates() {
  +    public ArrayList getPredicates() {
        return _predicates;
       }
   
       /**
        * Returns the vector containing all predicates for this step.
        */
  -    public void addPredicates(Vector predicates) {
  +    public void addPredicates(ArrayList predicates) {
        if (_predicates == null) {
            _predicates = predicates;
        }
  @@ -169,7 +169,7 @@
                parent instanceof UnionPathExpr ||
                parent instanceof FilterParentPath);
       }
  -    
  +
       /**
        * Returns 'true' if this step has any predicates
        */
  @@ -206,7 +206,7 @@
   
       /**
        * Type check this step. The abbreviated steps '.' and '@attr' are
  -     * assigned type node if they have no predicates. All other steps 
  +     * assigned type node if they have no predicates. All other steps
        * have type node-set.
        */
       public Type typeCheck(SymbolTable stable) throws TypeCheckError {
  @@ -216,10 +216,10 @@
        _hadPredicates = hasPredicates();
   
        // Special case for '.'
  -     //   in the case where '.' has a context such as book/. 
  -     //   or .[false()] we can not optimize the nodeset to a single node. 
  +     //   in the case where '.' has a context such as book/.
  +     //   or .[false()] we can not optimize the nodeset to a single node.
        if (isAbbreviatedDot()) {
  -         _type =  (hasParentPattern() || hasPredicates() ) ? 
  +         _type =  (hasParentPattern() || hasPredicates() ) ?
                Type.NodeSet : Type.Node;
        }
        else {
  @@ -230,7 +230,7 @@
        if (_predicates != null) {
            final int n = _predicates.size();
            for (int i = 0; i < n; i++) {
  -             final Expression pred = (Expression)_predicates.elementAt(i);
  +             final Expression pred = (Expression)_predicates.get(i);
                pred.typeCheck(stable);
            }
        }
  @@ -257,7 +257,7 @@
            // If it is an attribute but not '@*', '@attr' or '@node()' and
            // has no parent
            if (_axis == Axis.ATTRIBUTE && _nodeType != NodeTest.ATTRIBUTE &&
  -             _nodeType != NodeTest.ANODE && !hasParentPattern()) 
  +             _nodeType != NodeTest.ANODE && !hasParentPattern())
            {
                int iter = cpg.addInterfaceMethodref(DOM_INTF,
                                                     "getTypedAxisIterator",
  @@ -311,15 +311,15 @@
                break;
            default:
                final XSLTC xsltc = getParser().getXSLTC();
  -             final Vector ni = xsltc.getNamesIndex();
  +             final ArrayList ni = xsltc.getNamesIndex();
                String name = null;
                int star = 0;
  -             
  +
                if (_nodeType >= DOM.NTYPES) {
  -                 name = (String)ni.elementAt(_nodeType-DOM.NTYPES);
  +                 name = (String)ni.get(_nodeType-DOM.NTYPES);
                    star = name.lastIndexOf('*');
                }
  -             
  +
                if (star > 1) {
                    final String namespace;
                    if (_axis == Axis.ATTRIBUTE)
  @@ -358,7 +358,7 @@
        * Translate a sequence of predicates. Each predicate is translated
        * by constructing an instance of <code>CurrentNodeListIterator</code>
        * which is initialized from another iterator (recursive call),
  -     * a filter and a closure (call to translate on the predicate) and 
"this". 
  +     * a filter and a closure (call to translate on the predicate) and 
"this".
        */
       public void translatePredicates(ClassGenerator classGen,
                                    MethodGenerator methodGen) {
  @@ -371,7 +371,8 @@
            translate(classGen, methodGen);
        }
        else {
  -         final Predicate predicate = (Predicate)_predicates.lastElement();
  +         final Predicate predicate =
  +                (Predicate)_predicates.get(_predicates.size() - 1);
            _predicates.remove(predicate);
   
            // Special case for predicates that can use the NodeValueIterator
  @@ -444,7 +445,7 @@
                il.append(DUP);
                translatePredicates(classGen, methodGen); // recursive call
                predicate.translateFilter(classGen, methodGen);
  -             
  +
                il.append(methodGen.loadCurrentNode());
                il.append(classGen.loadTranslet());
                if (classGen.isExternal()) {
  @@ -465,7 +466,7 @@
        if (_predicates != null) {
            final int n = _predicates.size();
            for (int i = 0; i < n; i++) {
  -             final Predicate pred = (Predicate)_predicates.elementAt(i);
  +             final Predicate pred = (Predicate)_predicates.get(i);
                buffer.append(", ").append(pred.toString());
            }
        }
  
  
  
  1.17.2.1.2.2 +11 -11    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/StepPattern.java
  
  Index: StepPattern.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/StepPattern.java,v
  retrieving revision 1.17.2.1.2.1
  retrieving revision 1.17.2.1.2.2
  diff -u -r1.17.2.1.2.1 -r1.17.2.1.2.2
  --- StepPattern.java  2 Dec 2002 15:51:18 -0000       1.17.2.1.2.1
  +++ StepPattern.java  10 Jan 2003 16:50:42 -0000      1.17.2.1.2.2
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.xalan.xsltc.DOM;
   import org.apache.xalan.xsltc.dom.Axis;
   import org.apache.xalan.xsltc.compiler.util.Type;
  @@ -81,13 +81,13 @@
   
       protected final int _axis;
       protected final int _nodeType;
  -    protected Vector _predicates;
  +    protected ArrayList _predicates;
   
       private Step    _step = null;
       private boolean _isEpsilon = false;
       private int     _contextCase;
   
  -    public StepPattern(int axis, int nodeType, Vector predicates) {
  +    public StepPattern(int axis, int nodeType, ArrayList predicates) {
        _axis = axis;
        _nodeType = nodeType;
        _predicates = predicates;
  @@ -98,7 +98,7 @@
        if (_predicates != null) {
            final int n = _predicates.size();
            for (int i = 0; i < n; i++) {
  -             final Predicate exp = (Predicate)_predicates.elementAt(i);
  +             final Predicate exp = (Predicate)_predicates.get(i);
                exp.setParser(parser);
                exp.setParent(this);
            }
  @@ -117,7 +117,7 @@
        return _isEpsilon && hasPredicates() == false;
       }
   
  -    public StepPattern setPredicates(Vector predicates) {
  +    public StepPattern setPredicates(ArrayList predicates) {
        _predicates = predicates;
        return(this);
       }
  @@ -167,7 +167,7 @@
        final int n = _predicates.size();
   
        for (int i = 0; i < n && noContext; i++) {
  -         final Predicate pred = (Predicate)_predicates.elementAt(i);
  +         final Predicate pred = (Predicate)_predicates.get(i);
            if (pred.getExpr().hasPositionCall()) {
                noContext = false;
            }
  @@ -191,7 +191,7 @@
            // Type check all the predicates (e -> position() = e)
            final int n = _predicates.size();
            for (int i = 0; i < n; i++) {
  -             final Predicate pred = (Predicate)_predicates.elementAt(i);
  +             final Predicate pred = (Predicate)_predicates.get(i);
                pred.typeCheck(stable);
            }
   
  @@ -207,7 +207,7 @@
            else if (_contextCase == GENERAL_CONTEXT) {
                final int len = _predicates.size();
                for (int i = 0; i < len; i++)
  -                 ((Predicate)_predicates.elementAt(i)).dontOptimize();
  +                 ((Predicate)_predicates.get(i)).dontOptimize();
                _step = new Step(_axis, _nodeType, _predicates);
                _step.setParser(getParser());
                _step.typeCheck(stable);
  @@ -282,7 +282,7 @@
        // Compile the expressions within the predicates
        final int n = _predicates.size();
        for (int i = 0; i < n; i++) {
  -         Predicate pred = (Predicate)_predicates.elementAt(i);
  +         Predicate pred = (Predicate)_predicates.get(i);
            Expression exp = pred.getExpr();
            exp.translateDesynthesized(classGen, methodGen);
            _trueList.append(exp._trueList);
  @@ -351,7 +351,7 @@
        il.append(methodGen.storeCurrentNode());
   
        // Translate the expression of the predicate 
  -     Predicate pred = (Predicate) _predicates.elementAt(0);
  +     Predicate pred = (Predicate) _predicates.get(0);
        Expression exp = pred.getExpr();
        exp.translateDesynthesized(classGen, methodGen);
   
  
  
  
  1.3.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/StringCall.java
  
  Index: StringCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/StringCall.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.1.2.1
  diff -u -r1.3.8.1 -r1.3.8.1.2.1
  --- StringCall.java   14 Aug 2002 19:21:33 -0000      1.3.8.1
  +++ StringCall.java   10 Jan 2003 16:50:42 -0000      1.3.8.1.2.1
  @@ -63,13 +63,13 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   
   final class StringCall extends FunctionCall {
  -    public StringCall(QName fname, Vector arguments) {
  +    public StringCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.2.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/StringLengthCall.java
  
  Index: StringLengthCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/StringLengthCall.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- StringLengthCall.java     14 Aug 2002 19:21:33 -0000      1.2.8.1
  +++ StringLengthCall.java     10 Jan 2003 16:50:42 -0000      1.2.8.1.2.1
  @@ -63,13 +63,13 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.util.*;
   
   final class StringLengthCall extends FunctionCall {
  -    public StringLengthCall(QName fname, Vector arguments) {
  +    public StringLengthCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
       }
   
  
  
  
  1.43.2.1.2.2 +98 -98    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Stylesheet.java
  
  Index: Stylesheet.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Stylesheet.java,v
  retrieving revision 1.43.2.1.2.1
  retrieving revision 1.43.2.1.2.2
  diff -u -r1.43.2.1.2.1 -r1.43.2.1.2.2
  --- Stylesheet.java   2 Dec 2002 15:51:18 -0000       1.43.2.1.2.1
  +++ Stylesheet.java   10 Jan 2003 16:50:42 -0000      1.43.2.1.2.2
  @@ -64,10 +64,10 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Hashtable;
  +import java.util.ArrayList;
  +import java.util.HashMap;
   import java.util.Properties;
  -import java.util.Enumeration;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   import java.util.Iterator;
   import java.net.URL;
  @@ -96,22 +96,22 @@
       private QName        _name;
       private String       _systemId;
       private Stylesheet   _parentStylesheet;
  -     
  +
       // Contains global variables and parameters defined in the stylesheet
  -    private Vector _globals = new Vector();
  +    private ArrayList _globals = new ArrayList();
   
       // Used to cache the result returned by <code>hasLocalParams()</code>.
       private Boolean _hasLocalParams = null;
   
       //  The name of the class being generated.
       private String _className;
  -    
  +
       // Contains all templates defined in this stylesheet
  -    private final Vector _templates = new Vector();
  +    private final ArrayList _templates = new ArrayList();
   
       private int _nextModeSerial = 1;
  -    private final Hashtable _modes = new Hashtable();
  -    private final Hashtable _extensions = new Hashtable();
  +    private final HashMap _modes = new HashMap();
  +    private final HashMap _extensions = new HashMap();
   
       public  Stylesheet _importedFrom = null;
       public  Stylesheet _includedFrom = null;
  @@ -121,7 +121,7 @@
       private boolean _callsNodeset = false;
   
       // All named key elements (needed by Key/IdPattern)
  -    private Hashtable _keys = new Hashtable();
  +    private HashMap _keys = new HashMap();
   
       private boolean _numberFormattingUsed = false;
   
  @@ -154,7 +154,7 @@
       public void setSimplified() {
        _simplified = true;
       }
  -    
  +
       public void setOutputProperty(String key, String value) {
        if (_outputProperties == null) {
            _outputProperties = new Properties();
  @@ -170,7 +170,7 @@
        return _outputProperties;
       }
   
  -    public void setMultiDocument(boolean flag) {     
  +    public void setMultiDocument(boolean flag) {
        _multiDocument = flag;
       }
   
  @@ -196,9 +196,9 @@
        _importPrecedence = precedence;
   
        // Set import precedence for all included stylesheets
  -     final Enumeration elements = elements();
  -     while (elements.hasMoreElements()) {
  -         SyntaxTreeNode child = (SyntaxTreeNode)elements.nextElement();
  +     final Iterator elements = iterator();
  +     while (elements.hasNext()) {
  +         SyntaxTreeNode child = (SyntaxTreeNode)elements.next();
            if (child instanceof Include) {
                Stylesheet included = ((Include)child).getIncludedStylesheet();
                if (included != null) included.setImportPrecedence(precedence);
  @@ -219,7 +219,7 @@
                _includedFrom.setImportPrecedence(precedence);
        }
       }
  -    
  +
       public int getImportPrecedence() {
        return _importPrecedence;
       }
  @@ -230,21 +230,21 @@
            return true;
        }
        // Then check with any stylesheets that included/imported this one
  -     if (_parentStylesheet != null) 
  +     if (_parentStylesheet != null)
            return _parentStylesheet.checkForLoop(systemId);
        // Otherwise OK
        return false;
       }
  -    
  +
       public void setParser(Parser parser) {
        super.setParser(parser);
        _name = makeStylesheetName("__stylesheet_");
       }
  -    
  +
       public void setParentStylesheet(Stylesheet parent) {
        _parentStylesheet = parent;
       }
  -    
  +
       public Stylesheet getParentStylesheet() {
        return _parentStylesheet;
       }
  @@ -260,7 +260,7 @@
       public void setSystemId(String systemId) {
        _systemId = systemId;
       }
  -    
  +
       public String getSystemId() {
        return _systemId;
       }
  @@ -268,7 +268,7 @@
       public void setSourceLoader(SourceLoader loader) {
        _loader = loader;
       }
  -    
  +
       public SourceLoader getSourceLoader() {
        return _loader;
       }
  @@ -293,7 +293,7 @@
        if (_hasLocalParams == null) {
            final int n = _templates.size();
            for (int i = 0; i < n; i++) {
  -             final Template template = (Template)_templates.elementAt(i);
  +             final Template template = (Template)_templates.get(i);
                if (template.hasParams()) {
                    _hasLocalParams = new Boolean(true);
                    return true;
  @@ -341,8 +341,8 @@
        final SymbolTable stable = parser.getSymbolTable();
        final String excludePrefixes = getAttribute("exclude-result-prefixes");
        final String extensionPrefixes = 
getAttribute("extension-element-prefixes");
  -     
  -     // Exclude XSLT uri 
  +
  +     // Exclude XSLT uri
        stable.excludeURI(Constants.XSLT_URI);
        stable.excludeNamespaces(excludePrefixes);
        stable.excludeNamespaces(extensionPrefixes);
  @@ -399,13 +399,13 @@
        * Parse all direct children of the <xsl:stylesheet/> element.
        */
       public final void parseOwnChildren(Parser parser) {
  -     final Vector contents = getContents();
  +     final ArrayList contents = getContents();
        final int count = contents.size();
   
        // We have to scan the stylesheet element's top-level elements for
        // variables and/or parameters before we parse the other elements
        for (int i = 0; i < count; i++) {
  -         SyntaxTreeNode child = (SyntaxTreeNode)contents.elementAt(i);
  +         SyntaxTreeNode child = (SyntaxTreeNode)contents.get(i);
            if ((child instanceof VariableBase) ||
                (child instanceof NamespaceAlias)) {
                parser.getSymbolTable().setCurrentNode(child);
  @@ -415,8 +415,8 @@
   
        // Now go through all the other top-level elements...
        for (int i = 0; i < count; i++) {
  -         SyntaxTreeNode child = (SyntaxTreeNode)contents.elementAt(i);
  -         if (!(child instanceof VariableBase) && 
  +         SyntaxTreeNode child = (SyntaxTreeNode)contents.get(i);
  +         if (!(child instanceof VariableBase) &&
                !(child instanceof NamespaceAlias)) {
                parser.getSymbolTable().setCurrentNode(child);
                child.parseContents(parser);
  @@ -436,18 +436,18 @@
        if (_defaultMode == null)
            _defaultMode = new Mode(null, this, Constants.EMPTYSTRING);
        _defaultMode.processPatterns(_keys);
  -     final Enumeration modes = _modes.elements();
  -     while (modes.hasMoreElements()) {
  -         final Mode mode = (Mode)modes.nextElement();
  +     final Iterator modes = _modes.values().iterator();
  +     while (modes.hasNext()) {
  +         final Mode mode = (Mode)modes.next();
            mode.processPatterns(_keys);
        }
       }
  -     
  +
       private void compileModes(ClassGenerator classGen) {
        _defaultMode.compileApplyTemplates(classGen);
  -     final Enumeration modes = _modes.elements();
  -     while (modes.hasMoreElements()) {
  -         final Mode mode = (Mode)modes.nextElement();
  +     final Iterator modes = _modes.values().iterator();
  +     while (modes.hasNext()) {
  +         final Mode mode = (Mode)modes.next();
            mode.compileApplyTemplates(classGen);
        }
       }
  @@ -475,14 +475,14 @@
       public Type typeCheck(SymbolTable stable) throws TypeCheckError {
        final int count = _globals.size();
        for (int i = 0; i < count; i++) {
  -         final VariableBase var = (VariableBase)_globals.elementAt(i);
  +         final VariableBase var = (VariableBase)_globals.get(i);
            var.typeCheck(stable);
        }
        return typeCheckContents(stable);
       }
   
       /**
  -     * Translate the stylesheet into JVM bytecodes. 
  +     * Translate the stylesheet into JVM bytecodes.
        */
       public void translate(ClassGenerator classGen, MethodGenerator 
methodGen) {
        translate();
  @@ -497,7 +497,7 @@
       }
   
       /**
  -     * Translate the stylesheet into JVM bytecodes. 
  +     * Translate the stylesheet into JVM bytecodes.
        */
       public void translate() {
        Output lastOutputElement = null;
  @@ -510,7 +510,7 @@
                               Constants.EMPTYSTRING,
                               ACC_PUBLIC | ACC_SUPER,
                               null, this);
  -     
  +
        addDOMField(classGen);
   
        // Compile transform() to initialize parameters, globals & output
  @@ -518,14 +518,14 @@
        compileTransform(classGen);
   
        // Translate all non-template elements and filter out all templates
  -     final Enumeration elements = elements();
  -     while (elements.hasMoreElements()) {
  -         Object element = elements.nextElement();
  +     final Iterator elements = iterator();
  +     while (elements.hasNext()) {
  +         Object element = elements.next();
            // xsl:template
            if (element instanceof Template) {
                // Separate templates by modes
                final Template template = (Template)element;
  -             _templates.addElement(template);
  +             _templates.add(template);
                getMode(template.getModeName()).addTemplate(template);
            }
            // xsl:attribute-set
  @@ -533,7 +533,7 @@
                ((AttributeSet)element).translate(classGen, null);
            }
            else if (element instanceof Output) {
  -             // save the element for later to pass to compileConstructor 
  +             // save the element for later to pass to compileConstructor
                Output output = (Output)element;
                if (output.enabled()) lastOutputElement = output;
            }
  @@ -563,8 +563,8 @@
   
        final MethodGenerator constructor =
            new MethodGenerator(ACC_PUBLIC,
  -                             org.apache.bcel.generic.Type.VOID, 
  -                             null, null, "<init>", 
  +                             org.apache.bcel.generic.Type.VOID,
  +                             null, null, "<init>",
                                _className, il, cpg);
   
        // Call the constructor in the AbstractTranslet superclass
  @@ -573,13 +573,13 @@
                                                     "<init>", "()V")));
   
        // Put the names array into the translet - used for dom/translet mapping
  -     final Vector names = getXSLTC().getNamesIndex();
  +     final ArrayList names = getXSLTC().getNamesIndex();
        il.append(classGen.loadTranslet());
        il.append(new PUSH(cpg, names.size()));
  -     il.append(new ANEWARRAY(cpg.addClass(STRING)));         
  +     il.append(new ANEWARRAY(cpg.addClass(STRING)));
   
        for (int i = 0; i < names.size(); i++) {
  -         final String name = (String)names.elementAt(i);
  +         final String name = (String)names.get(i);
            il.append(DUP);
            il.append(new PUSH(cpg, i));
            il.append(new PUSH(cpg, name));
  @@ -590,13 +590,13 @@
                                               NAMES_INDEX_SIG)));
   
        // Put the namespace names array into the translet
  -     final Vector namespaces = getXSLTC().getNamespaceIndex();
  +     final ArrayList namespaces = getXSLTC().getNamespaceIndex();
        il.append(classGen.loadTranslet());
        il.append(new PUSH(cpg, namespaces.size()));
  -     il.append(new ANEWARRAY(cpg.addClass(STRING)));         
  +     il.append(new ANEWARRAY(cpg.addClass(STRING)));
   
        for (int i = 0; i < namespaces.size(); i++) {
  -         final String ns = (String)namespaces.elementAt(i);
  +         final String ns = (String)namespaces.get(i);
            il.append(DUP);
            il.append(new PUSH(cpg, i));
            il.append(new PUSH(cpg, ns));
  @@ -626,12 +626,12 @@
       }
   
       /**
  -     * Compile a topLevel() method into the output class. This method is 
  +     * Compile a topLevel() method into the output class. This method is
        * called from transform() to handle all non-template top-level 
elemtents.
        * Returns the signature of the topLevel() method.
        */
       private String compileTopLevel(ClassGenerator classGen,
  -                                Enumeration elements) {
  +                                Iterator elements) {
   
        final ConstantPoolGen cpg = classGen.getConstantPool();
   
  @@ -657,7 +657,7 @@
        toplevel.addException("org.apache.xalan.xsltc.TransletException");
   
        // Define and initialize 'current' variable with the root node
  -     final LocalVariableGen current = 
  +     final LocalVariableGen current =
            toplevel.addLocalVariable("current",
                                    org.apache.bcel.generic.Type.INT,
                                    il.getEnd(), null);
  @@ -673,14 +673,14 @@
        _globals = resolveReferences(_globals);
        final int count = _globals.size();
        for (int i = 0; i < count; i++) {
  -         final VariableBase var = (VariableBase)_globals.elementAt(i);
  +         final VariableBase var = (VariableBase)_globals.get(i);
            var.translate(classGen,toplevel);
        }
   
        // Compile code for other top-level elements
  -     Vector whitespaceRules = new Vector();
  -     while (elements.hasMoreElements()) {
  -         final Object element = elements.nextElement();
  +     ArrayList whitespaceRules = new ArrayList();
  +     while (elements.hasNext()) {
  +         final Object element = elements.next();
            // xsl:decimal-format
            if (element instanceof DecimalFormatting) {
                ((DecimalFormatting)element).translate(classGen,toplevel);
  @@ -711,50 +711,50 @@
        toplevel.removeNOPs();
   
        classGen.addMethod(toplevel.getMethod());
  -     
  +
        return("("+DOM_INTF_SIG+NODE_ITERATOR_SIG+TRANSLET_OUTPUT_SIG+")V");
       }
   
       /**
  -     * This method returns a vector with variables in the order in 
  -     * which they are to be compiled. The order is determined by the 
  -     * dependencies between them and the order in which they were defined 
  +     * This method returns a vector with variables in the order in
  +     * which they are to be compiled. The order is determined by the
  +     * dependencies between them and the order in which they were defined
        * in the stylesheet. The first step is to close the input vector under
        * the dependence relation (this is usually needed when variables are
        * defined inside other variables in a RTF).
        */
  -    private Vector resolveReferences(Vector input) {
  +    private ArrayList resolveReferences(ArrayList input) {
   
        // Make sure that the vector 'input' is closed
        for (int i = 0; i < input.size(); i++) {
  -         final VariableBase var = (VariableBase) input.elementAt(i);
  -         final Vector dep  = var.getDependencies();
  +         final VariableBase var = (VariableBase) input.get(i);
  +         final ArrayList dep  = var.getDependencies();
            final int depSize = (dep != null) ? dep.size() : 0;
   
            for (int j = 0; j < depSize; j++) {
  -             final VariableBase depVar = (VariableBase) dep.elementAt(j);
  +             final VariableBase depVar = (VariableBase) dep.get(j);
                if (!input.contains(depVar)) {
  -                 input.addElement(depVar);
  +                 input.add(depVar);
                }
            }
        }
   
        /* DEBUG CODE - INGORE
        for (int i = 0; i < input.size(); i++) {
  -         final VariableBase var = (VariableBase) input.elementAt(i);
  +         final VariableBase var = (VariableBase) input.get(i);
            System.out.println("var = " + var);
        }
        System.out.println("=================================");
        */
   
  -     Vector result = new Vector();
  +     ArrayList result = new ArrayList();
        while (input.size() > 0) {
            boolean changed = false;
            for (int i = 0; i < input.size(); ) {
  -             final VariableBase var = (VariableBase)input.elementAt(i);
  -             final Vector dep = var.getDependencies();
  +             final VariableBase var = (VariableBase)input.get(i);
  +             final ArrayList dep = var.getDependencies();
                if (dep == null || result.containsAll(dep)) {
  -                 result.addElement(var);
  +                 result.add(var);
                    input.remove(i);
                    changed = true;
                }
  @@ -775,7 +775,7 @@
        /* DEBUG CODE - INGORE
        System.out.println("=================================");
        for (int i = 0; i < result.size(); i++) {
  -         final VariableBase var = (VariableBase) result.elementAt(i);
  +         final VariableBase var = (VariableBase) result.get(i);
            System.out.println("var = " + var);
        }
        */
  @@ -784,7 +784,7 @@
       }
   
       /**
  -     * Compile a buildKeys() method into the output class. This method is 
  +     * Compile a buildKeys() method into the output class. This method is
        * called from transform() to handle build all indexes needed by key().
        */
       private String compileBuildKeys(ClassGenerator classGen) {
  @@ -820,21 +820,21 @@
        il.append(classGen.loadTranslet());
        il.append(new GETFIELD(domField));  // The DOM reference
        il.append(new ASTORE(1));
  -     
  -     final Enumeration elements = elements();
  +
  +     final Iterator elements = iterator();
        // Compile code for other top-level elements
  -     while (elements.hasMoreElements()) {
  +     while (elements.hasNext()) {
            // xsl:key
  -         final Object element = elements.nextElement();
  +         final Object element = elements.next();
            if (element instanceof Key) {
                final Key key = (Key)element;
                key.translate(classGen, buildKeys);
                _keys.put(key.getName(),key);
            }
        }
  -     
  +
        il.append(RETURN);
  -     
  +
        // Compute max locals + stack and add method to class
        buildKeys.stripAttributes(true);
        buildKeys.setMaxLocals();
  @@ -842,23 +842,23 @@
        buildKeys.removeNOPs();
   
        classGen.addMethod(buildKeys.getMethod());
  -     
  +
        return("("+DOM_INTF_SIG+NODE_ITERATOR_SIG+TRANSLET_OUTPUT_SIG+"I)V");
       }
   
       /**
  -     * Compile transform() into the output class. This method is used to 
  +     * Compile transform() into the output class. This method is used to
        * initialize global variables and global parameters. The current node
        * is set to be the document's root node.
        */
       private void compileTransform(ClassGenerator classGen) {
        final ConstantPoolGen cpg = classGen.getConstantPool();
   
  -     /* 
  +     /*
         * Define the the method transform with the following signature:
         * void transform(DOM, NodeIterator, HandlerBase)
         */
  -     final org.apache.bcel.generic.Type[] argTypes = 
  +     final org.apache.bcel.generic.Type[] argTypes =
            new org.apache.bcel.generic.Type[3];
        argTypes[0] = Util.getJCRefType(DOM_INTF_SIG);
        argTypes[1] = Util.getJCRefType(NODE_ITERATOR_SIG);
  @@ -881,7 +881,7 @@
        transf.addException("org.apache.xalan.xsltc.TransletException");
   
        // Define and initialize current with the root node
  -     final LocalVariableGen current = 
  +     final LocalVariableGen current =
            transf.addLocalVariable("current",
                                    org.apache.bcel.generic.Type.INT,
                                    il.getEnd(), null);
  @@ -896,12 +896,12 @@
        // push translet for PUTFIELD
        il.append(classGen.loadTranslet());
        // prepare appropriate DOM implementation
  -     
  +
        if (isMultiDocument()) {
            il.append(new NEW(cpg.addClass(MULTI_DOM_CLASS)));
            il.append(DUP);
        }
  -     
  +
        il.append(classGen.loadTranslet());
        il.append(transf.loadDOM());
        il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS,
  @@ -917,7 +917,7 @@
            il.append(new INVOKESPECIAL(init));
            // MultiDOM is on the stack
        }
  -     
  +
        //store to _dom variable
        il.append(new PUTFIELD(domField));
   
  @@ -946,8 +946,8 @@
        il.append(new INVOKEVIRTUAL(keyIdx));
   
        // Look for top-level elements that need handling
  -     final Enumeration toplevel = elements();
  -     if ((_globals.size() > 0) || (toplevel.hasMoreElements())) {
  +     final Iterator toplevel = iterator();
  +     if ((_globals.size() > 0) || (toplevel.hasNext())) {
            // Compile method for handling top-level elements
            final String topLevelSig = compileTopLevel(classGen, toplevel);
            // Get a reference to that method
  @@ -962,7 +962,7 @@
            il.append(transf.loadHandler());    // The output handler
            il.append(new INVOKEVIRTUAL(topLevelIdx));
        }
  -     
  +
        // start document
        il.append(transf.loadHandler());
        il.append(transf.startDocument());
  @@ -1002,7 +1002,7 @@
            InstructionHandle[] match = (InstructionHandle[])iter.next();
            try {
                il.delete(match[0], match[1]);
  -         } 
  +         }
            catch (TargetLostException e) {
                // TODO: move target down into the list
               }
  @@ -1010,12 +1010,12 @@
       }
   
       public int addParam(Param param) {
  -     _globals.addElement(param);
  +     _globals.add(param);
        return _globals.size() - 1;
       }
   
       public int addVariable(Variable global) {
  -     _globals.addElement(global);
  +     _globals.add(global);
        return _globals.size() - 1;
       }
   
  @@ -1034,7 +1034,7 @@
        return _className;
       }
   
  -    public Vector getTemplates() {
  +    public ArrayList getTemplates() {
        return _templates;
       }
   }
  
  
  
  1.8.2.1.2.1 +24 -24    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/SymbolTable.java
  
  Index: SymbolTable.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/SymbolTable.java,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.1.2.1
  diff -u -r1.8.2.1 -r1.8.2.1.2.1
  --- SymbolTable.java  14 Aug 2002 19:21:33 -0000      1.8.2.1
  +++ SymbolTable.java  10 Jan 2003 16:50:42 -0000      1.8.2.1.2.1
  @@ -64,9 +64,9 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Hashtable;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.HashMap;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   
   import org.apache.xalan.xsltc.compiler.util.*;
  @@ -74,16 +74,16 @@
   final class SymbolTable {
   
       // These hashtables are used for all stylesheets
  -    private final Hashtable _stylesheets = new Hashtable();
  -    private final Hashtable _primops     = new Hashtable();
  +    private final HashMap _stylesheets = new HashMap();
  +    private final HashMap _primops     = new HashMap();
   
       // These hashtables are used for some stylesheets
  -    private Hashtable _variables = null;
  -    private Hashtable _templates = null;
  -    private Hashtable _attributeSets = null;
  -    private Hashtable _aliases = null;
  -    private Hashtable _excludedURI = null;
  -    private Hashtable _decimalFormats = null;
  +    private HashMap _variables = null;
  +    private HashMap _templates = null;
  +    private HashMap _attributeSets = null;
  +    private HashMap _aliases = null;
  +    private HashMap _excludedURI = null;
  +    private HashMap _decimalFormats = null;
   
       public DecimalFormatting getDecimalFormatting(QName name) {
        if (_decimalFormats == null) return null;
  @@ -91,7 +91,7 @@
       }
   
       public void addDecimalFormatting(QName name, DecimalFormatting symbols) {
  -     if (_decimalFormats == null) _decimalFormats = new Hashtable();
  +     if (_decimalFormats == null) _decimalFormats = new HashMap();
        _decimalFormats.put(name, symbols);
       }
   
  @@ -105,7 +105,7 @@
   
       public Template addTemplate(Template template) {
        final QName name = template.getName();
  -     if (_templates == null) _templates = new Hashtable();
  +     if (_templates == null) _templates = new HashMap();
        return (Template)_templates.put(name, template);
       }
        
  @@ -115,13 +115,13 @@
       }
   
       public Variable addVariable(Variable variable) {
  -     if (_variables == null) _variables = new Hashtable();
  +     if (_variables == null) _variables = new HashMap();
        final String name = variable.getName().getStringRep();
        return (Variable)_variables.put(name, variable);
       }
        
       public Param addParam(Param parameter) {
  -     if (_variables == null) _variables = new Hashtable();
  +     if (_variables == null) _variables = new HashMap();
        final String name = parameter.getName().getStringRep();
        return (Param)_variables.put(name, parameter);
       }
  @@ -147,7 +147,7 @@
       }
   
       public AttributeSet addAttributeSet(AttributeSet atts) {
  -     if (_attributeSets == null) _attributeSets = new Hashtable();
  +     if (_attributeSets == null) _attributeSets = new HashMap();
        return (AttributeSet)_attributeSets.put(atts.getName(), atts);
       }
   
  @@ -162,19 +162,19 @@
        * is prepended.
        */
       public void addPrimop(String name, MethodType mtype) {
  -     Vector methods = (Vector)_primops.get(name);
  +     ArrayList methods = (ArrayList)_primops.get(name);
        if (methods == null) {
  -         _primops.put(name, methods = new Vector());
  +         _primops.put(name, methods = new ArrayList());
        }
  -     methods.addElement(mtype);
  +     methods.add(mtype);
       }
        
       /**
        * Lookup a primitive operator or function in the symbol table by
        * prepending the prefix <tt>PrimopPrefix</tt>.
        */
  -    public Vector lookupPrimop(String name) {
  -     return (Vector)_primops.get(name);
  +    public ArrayList lookupPrimop(String name) {
  +     return (ArrayList)_primops.get(name);
       }
   
       /**
  @@ -205,7 +205,7 @@
        * Adds an alias for a namespace prefix
        */ 
       public void addPrefixAlias(String prefix, String alias) {
  -     if (_aliases == null) _aliases = new Hashtable();
  +     if (_aliases == null) _aliases = new HashMap();
        _aliases.put(prefix,alias);
       }
   
  @@ -226,7 +226,7 @@
        if (uri == null) return;
   
        // Create new hashtable of exlcuded URIs if none exists
  -     if (_excludedURI == null) _excludedURI = new Hashtable();
  +     if (_excludedURI == null) _excludedURI = new HashMap();
   
        // Register the namespace URI
        Integer refcnt = (Integer)_excludedURI.get(uri);
  
  
  
  1.20.2.1.2.2 +117 -71   
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/SyntaxTreeNode.java
  
  Index: SyntaxTreeNode.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/SyntaxTreeNode.java,v
  retrieving revision 1.20.2.1.2.1
  retrieving revision 1.20.2.1.2.2
  diff -u -r1.20.2.1.2.1 -r1.20.2.1.2.2
  --- SyntaxTreeNode.java       2 Dec 2002 15:51:18 -0000       1.20.2.1.2.1
  +++ SyntaxTreeNode.java       10 Jan 2003 16:50:42 -0000      1.20.2.1.2.2
  @@ -56,21 +56,17 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - * @author Jacek Ambroziak
    * @author Santiago Pericas-Geertsen
  - * @author G. Todd Miller
  - * @author Morten Jorensen
  - * @author Erwin Bolwidt <[EMAIL PROTECTED]>
  - * @author John Howard <[EMAIL PROTECTED]>
    *
    */
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  -import java.util.Hashtable;
   import java.net.URL;
  +import java.util.ArrayList;
  +import java.util.Iterator;
  +import java.util.HashMap;
  +import java.util.Iterator;
   
   import javax.xml.parsers.*;
   
  @@ -84,28 +80,61 @@
   
   public abstract class SyntaxTreeNode implements Constants {
   
  -    // Reference to the AST parser
  +    // -- The following should be moved to CompilerContext ---------------
  +
  +    /**
  +     * Reference to the parser object
  +     */
       private Parser _parser;
   
  -    // AST navigation pointers
  -    protected SyntaxTreeNode _parent;          // Parent node
  -    private Stylesheet       _stylesheet;      // Stylesheet ancestor node
  -    private Template         _template;        // Template ancestor node
  -    private final Vector _contents = new Vector(2); // Child nodes
  -
  -    // Element description data
  -    protected QName _qname;                    // The element QName
  -    private int _line;                         // Source file line number
  -    protected Attributes _attributes = null;   // Attributes of this element
  -    private   Hashtable _prefixMapping = null; // Namespace declarations
  +    /**
  +     * A reference to the containing stylesheet (an ancestor).
  +     */
  +    private Stylesheet  _stylesheet;
   
  -    // Sentinel - used to denote unrecognised syntaxt tree nodes.
  -    protected static final SyntaxTreeNode Dummy = new 
AbsolutePathPattern(null);
  +    /**
  +     * A reference to the containing template (an ancestor)
  +     */
  +    private Template _template;
   
  -    // These two are used for indenting nodes in the AST (debug output)
  -    protected static final int IndentIncrement = 4;
  -    private static final char[] _spaces = 
  -     "                                                       ".toCharArray();
  +    // -------------------------------------------------------------------
  +
  +    /**
  +     * A reference to this node's parent or null it outermost.
  +     */
  +    protected SyntaxTreeNode _parent;
  +
  +    /**
  +     * List of children of this node.
  +     */
  +    private final ArrayList _contents = new ArrayList(2);
  +
  +    /**
  +     * The element's qualified name.
  +     */
  +    protected QName _qname;
  +
  +    /**
  +     * The list of attributes defined in this element.
  +     */
  +    protected Attributes _attributes = null;
  +
  +    /**
  +     * Namespace declarations of this element (as a mapping).
  +     */
  +    private HashMap _prefixMapping = null;
  +
  +    /**
  +     * Source line where this element occurs in the input file.
  +     */
  +    private int _line;
  +
  +    /**
  +     * A "sentinel" that is used to denote unrecognised syntaxt
  +     * tree nodes.
  +     */
  +    protected static final SyntaxTreeNode Dummy
  +            = new AbsolutePathPattern(null);   // TODO: use a different class
   
       /**
        * Creates a new SyntaxTreeNode with a 'null' QName and no source file
  @@ -137,6 +166,14 @@
       }
   
       /**
  +     * Returns a reference to the static context using this node as
  +     * current.
  +     */
  +    public StaticContextImpl getStaticContext() {
  +        return StaticContextImpl.getInstance(this);
  +    }
  +
  +    /**
        * Set the source file line number for this element
        * @param line The source file line number.
        */
  @@ -197,7 +234,7 @@
            return EMPTYSTRING;
        }
        final String value = _attributes.getValue(qname);
  -     return (value == null || value.equals(EMPTYSTRING)) ? 
  +     return (value == null || value.equals(EMPTYSTRING)) ?
            EMPTYSTRING : value;
       }
   
  @@ -218,22 +255,22 @@
        * Sets the prefix mapping for the namespaces that were declared in this
        * element. This does not include all prefix mappings in scope, so one
        * may have to check ancestor elements to get all mappings that are in
  -     * in scope. The prefixes must be passed in as a Hashtable that maps
  +     * in scope. The prefixes must be passed in as a HashMap that maps
        * namespace prefixes (String objects) to namespace URIs (also String).
  -     * @param mapping The Hashtable containing the mappings.
  +     * @param mapping The HashMap containing the mappings.
        */
  -    protected void setPrefixMapping(Hashtable mapping) {
  +    protected void setPrefixMapping(HashMap mapping) {
        _prefixMapping = mapping;
       }
   
       /**
  -     * Returns a Hashtable containing the prefix mappings that were declared
  +     * Returns a HashMap containing the prefix mappings that were declared
        * for this element. This does not include all prefix mappings in scope,
        * so one may have to check ancestor elements to get all mappings that 
are
  -     * in in scope. 
  +     * in in scope.
        * @return Prefix mappings (for this element only).
        */
  -    protected Hashtable getPrefixMapping() {
  +    protected HashMap getPrefixMapping() {
        return _prefixMapping;
       }
   
  @@ -244,7 +281,7 @@
        */
       protected void addPrefixMapping(String prefix, String uri) {
        if (_prefixMapping == null)
  -         _prefixMapping = new Hashtable();
  +         _prefixMapping = new HashMap();
        _prefixMapping.put(prefix, uri);
       }
   
  @@ -289,10 +326,10 @@
   
        // First look up the prefix/uri mapping in our own hashtable...
        if ((_prefixMapping != null) &&
  -         (_prefixMapping.contains(uri))) {
  -         Enumeration prefixes = _prefixMapping.keys();
  -         while (prefixes.hasMoreElements()) {
  -             prefix = (String)prefixes.nextElement();
  +         (_prefixMapping.containsValue(uri))) {
  +         Iterator prefixes = _prefixMapping.keySet().iterator();
  +         while (prefixes.hasNext()) {
  +             prefix = (String)prefixes.next();
                String mapsTo = (String)_prefixMapping.get(prefix);
                if (mapsTo.equals(uri)) return(prefix);
            }
  @@ -427,20 +464,20 @@
        */
       protected final void parseChildren(Parser parser) {
   
  -     Vector locals = null;   // only create when needed
  -     
  +     ArrayList locals = null;        // only create when needed
  +
        final int count = _contents.size();
        for (int i=0; i<count; i++) {
  -         SyntaxTreeNode child = (SyntaxTreeNode)_contents.elementAt(i);
  +         SyntaxTreeNode child = (SyntaxTreeNode)_contents.get(i);
            parser.getSymbolTable().setCurrentNode(child);
            child.parseContents(parser);
            // if variable or parameter, add it to scope
            final QName varOrParamName = updateScope(parser, child);
            if (varOrParamName != null) {
                if (locals == null) {
  -                 locals = new Vector(2);
  +                 locals = new ArrayList(2);
                }
  -             locals.addElement(varOrParamName);
  +             locals.add(varOrParamName);
            }
        }
   
  @@ -450,11 +487,11 @@
        if (locals != null) {
            final int nLocals = locals.size();
            for (int i = 0; i < nLocals; i++) {
  -             parser.removeVariable((QName)locals.elementAt(i));
  +             parser.removeVariable((QName)locals.get(i));
            }
        }
       }
  -   
  +
       /**
        * Add a node to the current scope and return name of a variable or
        * parameter if the node represents a variable or a parameter.
  @@ -489,7 +526,7 @@
       protected Type typeCheckContents(SymbolTable stable) throws 
TypeCheckError {
        final int n = elementCount();
        for (int i = 0; i < n; i++) {
  -         SyntaxTreeNode item = (SyntaxTreeNode)_contents.elementAt(i);
  +         SyntaxTreeNode item = (SyntaxTreeNode)_contents.get(i);
            item.typeCheck(stable);
        }
        return Type.Void;
  @@ -513,7 +550,7 @@
        // Call translate() on all child nodes
        final int n = elementCount();
        for (int i = 0; i < n; i++) {
  -         final SyntaxTreeNode item = (SyntaxTreeNode)_contents.elementAt(i);
  +         final SyntaxTreeNode item = (SyntaxTreeNode)_contents.get(i);
            item.translate(classGen, methodGen);
        }
   
  @@ -523,8 +560,8 @@
        // references falling out-of-scope inside the for-each element.
        // (the cause of which being 'lazy' register allocation for references)
        for (int i = 0; i < n; i++) {
  -         if( _contents.elementAt(i) instanceof VariableBase) {
  -             final VariableBase var = (VariableBase)_contents.elementAt(i);
  +         if( _contents.get(i) instanceof VariableBase) {
  +             final VariableBase var = (VariableBase)_contents.get(i);
                var.unmapRegister(methodGen);
            }
        }
  @@ -536,7 +573,7 @@
        * @param methodGen BCEL Java method generator
        */
       protected void compileResultTree(ClassGenerator classGen,
  -                                  MethodGenerator methodGen) 
  +                                  MethodGenerator methodGen)
       {
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();
  @@ -601,7 +638,7 @@
                il.append(ALOAD_0);
                il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
                                           NAMES_INDEX,
  -                                        NAMES_INDEX_SIG))); 
  +                                        NAMES_INDEX_SIG)));
                il.append(ALOAD_0);
                il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
                                           NAMESPACE_INDEX,
  @@ -629,9 +666,9 @@
       }
   
       /**
  -     * Returns true if this expression/instruction depends on the context. 
By 
  -     * default, every expression/instruction depends on the context unless 
it 
  -     * overrides this method. Currently used to determine if result trees 
are 
  +     * Returns true if this expression/instruction depends on the context. By
  +     * default, every expression/instruction depends on the context unless it
  +     * overrides this method. Currently used to determine if result trees are
        * compiled using procedures or little DOMs (result tree fragments).
        * @return 'true' if this node depends on the context.
        */
  @@ -647,7 +684,7 @@
       protected boolean dependentContents() {
        final int n = elementCount();
        for (int i = 0; i < n; i++) {
  -         final SyntaxTreeNode item = (SyntaxTreeNode)_contents.elementAt(i);
  +         final SyntaxTreeNode item = (SyntaxTreeNode)_contents.get(i);
            if (item.contextDependent()) {
                return true;
            }
  @@ -659,8 +696,8 @@
        * Adds a child node to this syntax tree node.
        * @param element is the new child node.
        */
  -    protected final void addElement(SyntaxTreeNode element) {
  -     _contents.addElement(element);
  +    protected final void add(SyntaxTreeNode element) {
  +     _contents.add(element);
        element.setParent(this);
       }
   
  @@ -670,7 +707,7 @@
        * @param element is the new child node.
        */
       protected final void setFirstElement(SyntaxTreeNode element) {
  -     _contents.insertElementAt(element,0);
  +     _contents.set(0, element);
        element.setParent(this);
       }
   
  @@ -684,10 +721,10 @@
       }
   
       /**
  -     * Returns a Vector containing all the child nodes of this node.
  -     * @return A Vector containing all the child nodes of this node.
  +     * Returns a ArrayList containing all the child nodes of this node.
  +     * @return A ArrayList containing all the child nodes of this node.
        */
  -    protected final Vector getContents() {
  +    protected final ArrayList getContents() {
        return _contents;
       }
   
  @@ -708,11 +745,11 @@
       }
   
       /**
  -     * Returns an Enumeration of all child nodes of this node.
  -     * @return An Enumeration of all child nodes of this node.
  +     * Returns an Iterator of all child nodes of this node.
  +     * @return An Iterator of all child nodes of this node.
        */
  -    protected final Enumeration elements() {
  -     return _contents.elements();
  +    protected final Iterator iterator() {
  +     return _contents.iterator();
       }
   
       /**
  @@ -720,8 +757,8 @@
        * @param pos The child node's position.
        * @return The child node.
        */
  -    protected final Object elementAt(int pos) {
  -     return _contents.elementAt(pos);
  +    protected final Object get(int pos) {
  +     return _contents.get(pos);
       }
   
       /**
  @@ -729,8 +766,9 @@
        * @return The child node.
        */
       protected final SyntaxTreeNode lastChild() {
  -     if (_contents.size() == 0) return null;
  -     return (SyntaxTreeNode)_contents.lastElement();
  +        final int n = _contents.size();
  +     if (n == 0) return null;
  +     return (SyntaxTreeNode)_contents.get(n);
       }
   
       /**
  @@ -751,7 +789,7 @@
       protected void displayContents(int indent) {
        final int n = elementCount();
        for (int i = 0; i < n; i++) {
  -         SyntaxTreeNode item = (SyntaxTreeNode)_contents.elementAt(i);
  +         SyntaxTreeNode item = (SyntaxTreeNode)_contents.get(i);
            item.display(indent);
        }
       }
  @@ -791,5 +829,13 @@
        final ErrorMsg error = new ErrorMsg(errorCode, message, element);
           parser.reportError(Constants.WARNING, error);
       }
  +
  +    // -- Pretty printing ------------------------------------------------
  +
  +    // These two are used for indenting nodes in the AST (debug output)
  +    protected static final int IndentIncrement = 4;
  +    private static final char[] _spaces =
  +        "                                                       
".toCharArray();
  +
   
   }
  
  
  
  1.17.2.1.2.2 +14 -14    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Template.java
  
  Index: Template.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Template.java,v
  retrieving revision 1.17.2.1.2.1
  retrieving revision 1.17.2.1.2.2
  diff -u -r1.17.2.1.2.1 -r1.17.2.1.2.2
  --- Template.java     2 Dec 2002 15:51:18 -0000       1.17.2.1.2.1
  +++ Template.java     10 Jan 2003 16:50:42 -0000      1.17.2.1.2.2
  @@ -65,9 +65,9 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  -import java.util.Hashtable;
  +import java.util.ArrayList;
  +import java.util.Iterator;
  +import java.util.HashMap;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   
  @@ -216,11 +216,11 @@
        if (name.length() > 0) {
            _name = parser.getQNameIgnoreDefaultNs(name);
        }
  -     
  +
        if (mode.length() > 0) {
            _mode = parser.getQNameIgnoreDefaultNs(mode);
        }
  -     
  +
        if (match.length() > 0) {
            _pattern = parser.parsePattern(this, "match", null);
        }
  @@ -274,11 +274,11 @@
        _priority = Double.NaN;
        _pattern = parser.parsePattern(this, "/");
   
  -     final Vector contents = _stylesheet.getContents();
  -     final SyntaxTreeNode root = (SyntaxTreeNode)contents.elementAt(0);
  +     final ArrayList contents = _stylesheet.getContents();
  +     final SyntaxTreeNode root = (SyntaxTreeNode)contents.get(0);
   
        if (root instanceof LiteralElement) {
  -         addElement(root);
  +         add(root);
            root.setParent(this);
            contents.set(0, this);
            parser.setTemplate(this);
  @@ -300,7 +300,7 @@
        final InstructionList il = methodGen.getInstructionList();
   
        if (_disabled) return;
  -     // bug fix #4433133, add a call to named template from applyTemplates 
  +     // bug fix #4433133, add a call to named template from applyTemplates
        String className = classGen.getClassName();
   
        if (_compiled && isNamed()){
  @@ -308,8 +308,8 @@
            il.append(classGen.loadTranslet());
            il.append(methodGen.loadDOM());
            il.append(methodGen.loadIterator());
  -         il.append(methodGen.loadHandler()); 
  -         il.append(methodGen.loadCurrentNode()); 
  +         il.append(methodGen.loadHandler());
  +         il.append(methodGen.loadCurrentNode());
            il.append(new INVOKEVIRTUAL(cpg.addMethodref(className,
                                                         methodName,
                                                         "("
  @@ -321,8 +321,8 @@
        }
   
        if (_compiled) return;
  -     _compiled = true; 
  -     
  +     _compiled = true;
  +
        final InstructionHandle start = il.getEnd();
        translateContents(classGen, methodGen);
        final InstructionHandle end = il.getEnd();
  
  
  
  1.8.2.1.2.2 +36 -36    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/TestSeq.java
  
  Index: TestSeq.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/TestSeq.java,v
  retrieving revision 1.8.2.1.2.1
  retrieving revision 1.8.2.1.2.2
  diff -u -r1.8.2.1.2.1 -r1.8.2.1.2.2
  --- TestSeq.java      2 Dec 2002 15:51:18 -0000       1.8.2.1.2.1
  +++ TestSeq.java      10 Jan 2003 16:50:42 -0000      1.8.2.1.2.2
  @@ -65,10 +65,10 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Hashtable;
  +import java.util.ArrayList;
  +import java.util.HashMap;
   import java.util.Dictionary;
  -import java.util.Enumeration;
  +import java.util.Iterator;
   import java.util.Iterator;
   
   import org.apache.bcel.generic.*;
  @@ -83,8 +83,8 @@
    *      (element sequence only) or matching "@*" (attribute
    *      sequence only).
    *
  - * A test sequence may have a default template, which will be 
  - * instantiated if none of the other patterns match. 
  + * A test sequence may have a default template, which will be
  + * instantiated if none of the other patterns match.
    */
   final class TestSeq {
   
  @@ -94,10 +94,10 @@
       private int _kernelType;
   
       /**
  -     * Vector of all patterns in the test sequence. May include
  +     * ArrayList of all patterns in the test sequence. May include
        * patterns with "*", "@*" or "node()" kernel.
        */
  -    private Vector _patterns = null;
  +    private ArrayList _patterns = null;
   
       /**
        * A reference to the Mode object.
  @@ -122,11 +122,11 @@
       /**
        * Creates a new test sequence given a set of patterns and a mode.
        */
  -    public TestSeq(Vector patterns, Mode mode) {
  +    public TestSeq(ArrayList patterns, Mode mode) {
        this(patterns, -2, mode);
       }
   
  -    public TestSeq(Vector patterns, int kernelType, Mode mode) {
  +    public TestSeq(ArrayList patterns, int kernelType, Mode mode) {
        _patterns = patterns;
        _kernelType = kernelType;
        _mode = mode;
  @@ -143,7 +143,7 @@
   
        for (int i = 0; i < count; i++) {
            final LocationPathPattern pattern =
  -             (LocationPathPattern) _patterns.elementAt(i);
  +             (LocationPathPattern) _patterns.get(i);
   
            if (i == 0) {
                result.append("Testseq for kernel " + _kernelType)
  @@ -169,18 +169,18 @@
        * of the default pattern.
        */
       public double getPriority() {
  -     final Template template = (_patterns.size() == 0) ? _default 
  -         : ((Pattern) _patterns.elementAt(0)).getTemplate();
  +     final Template template = (_patterns.size() == 0) ? _default
  +         : ((Pattern) _patterns.get(0)).getTemplate();
        return template.getPriority();
       }
   
       /**
  -     * Returns the position of the highest priority pattern in 
  +     * Returns the position of the highest priority pattern in
        * this test sequence.
        */
       public int getPosition() {
  -     final Template template = (_patterns.size() == 0) ? _default 
  -         : ((Pattern) _patterns.elementAt(0)).getTemplate();
  +     final Template template = (_patterns.size() == 0) ? _default
  +         : ((Pattern) _patterns.get(0)).getTemplate();
        return template.getPosition();
       }
   
  @@ -190,48 +190,48 @@
        * finds a patterns that is fully reduced.
        */
       public void reduce() {
  -     final Vector newPatterns = new Vector();
  +     final ArrayList newPatterns = new ArrayList();
   
        final int count = _patterns.size();
        for (int i = 0; i < count; i++) {
            final LocationPathPattern pattern =
  -             (LocationPathPattern)_patterns.elementAt(i);
  -             
  +             (LocationPathPattern)_patterns.get(i);
  +
            // Reduce this pattern
            pattern.reduceKernelPattern();
  -                     
  +
            // Is this pattern fully reduced?
            if (pattern.isWildcard()) {
                _default = pattern.getTemplate();
  -             break;          // Ignore following patterns 
  +             break;          // Ignore following patterns
            }
            else {
  -             newPatterns.addElement(pattern);
  +             newPatterns.add(pattern);
            }
        }
        _patterns = newPatterns;
       }
   
       /**
  -     * Returns, by reference, the templates that are included in 
  -     * this test sequence. Note that a single template can occur 
  +     * Returns, by reference, the templates that are included in
  +     * this test sequence. Note that a single template can occur
        * in several test sequences if its pattern is a union.
        */
  -    public void findTemplates(Dictionary templates) {
  +    public void findTemplates(HashMap templates) {
        if (_default != null) {
            templates.put(_default, this);
        }
        for (int i = 0; i < _patterns.size(); i++) {
            final LocationPathPattern pattern =
  -             (LocationPathPattern)_patterns.elementAt(i);
  +             (LocationPathPattern)_patterns.get(i);
            templates.put(pattern.getTemplate(), this);
        }
       }
   
       /**
  -     * Get the instruction handle to a template's code. This is 
  -     * used when a single template occurs in several test 
  -     * sequences; that is, if its pattern is a union of patterns 
  +     * Get the instruction handle to a template's code. This is
  +     * used when a single template occurs in several test
  +     * sequences; that is, if its pattern is a union of patterns
        * (e.g. match="A/B | A/C").
        */
       private InstructionHandle getTemplateHandle(Template template) {
  @@ -242,18 +242,18 @@
        * Returns pattern n in this test sequence
        */
       private LocationPathPattern getPattern(int n) {
  -     return (LocationPathPattern)_patterns.elementAt(n);
  +     return (LocationPathPattern)_patterns.get(n);
       }
   
       /**
  -     * Compile the code for this test sequence. Compile patterns 
  -     * from highest to lowest priority. Note that since patterns 
  -     * can be share by multiple test sequences, instruction lists 
  +     * Compile the code for this test sequence. Compile patterns
  +     * from highest to lowest priority. Note that since patterns
  +     * can be share by multiple test sequences, instruction lists
        * must be copied before backpatching.
        */
       public InstructionHandle compile(ClassGenerator classGen,
                                     MethodGenerator methodGen,
  -                                  InstructionHandle continuation) 
  +                                  InstructionHandle continuation)
       {
        // Returned cached value if already compiled
        if (_start != null) {
  @@ -269,7 +269,7 @@
        // Init handle to jump when all patterns failed
        InstructionHandle fail = (_default == null) ? continuation
            : getTemplateHandle(_default);
  -     
  +
        // Compile all patterns in reverse order
        for (int n = count - 1; n >= 0; n--) {
            final LocationPathPattern pattern = getPattern(n);
  @@ -309,7 +309,7 @@
            }
            if (falseList != null) {
                falseList.backPatch(fail);
  -         } 
  +         }
   
            // Next pattern's 'fail' target is this pattern's first instruction
            fail = il.getStart();
  
  
  
  1.12.2.1.2.1 +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Text.java
  
  Index: Text.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Text.java,v
  retrieving revision 1.12.2.1
  retrieving revision 1.12.2.1.2.1
  diff -u -r1.12.2.1 -r1.12.2.1.2.1
  --- Text.java 14 Aug 2002 19:21:34 -0000      1.12.2.1
  +++ Text.java 10 Jan 2003 16:50:42 -0000      1.12.2.1.2.1
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  
  
  
  1.4.8.1.2.1 +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/TopLevelElement.java
  
  Index: TopLevelElement.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/TopLevelElement.java,v
  retrieving revision 1.4.8.1
  retrieving revision 1.4.8.1.2.1
  diff -u -r1.4.8.1 -r1.4.8.1.2.1
  --- TopLevelElement.java      14 Aug 2002 19:21:34 -0000      1.4.8.1
  +++ TopLevelElement.java      10 Jan 2003 16:50:42 -0000      1.4.8.1.2.1
  @@ -60,7 +60,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Enumeration;
  +import java.util.Iterator;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.xalan.xsltc.compiler.util.TypeCheckError;
  
  
  
  1.4.8.1.2.1 +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnaryOpExpr.java
  
  Index: UnaryOpExpr.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnaryOpExpr.java,v
  retrieving revision 1.4.8.1
  retrieving revision 1.4.8.1.2.1
  diff -u -r1.4.8.1 -r1.4.8.1.2.1
  --- UnaryOpExpr.java  14 Aug 2002 19:21:34 -0000      1.4.8.1
  +++ UnaryOpExpr.java  10 Jan 2003 16:50:42 -0000      1.4.8.1.2.1
  @@ -94,7 +94,7 @@
                                                             tleft)); 
        
        if (ptype != null) {
  -         final Type arg1 = (Type) ptype.argsType().elementAt(0);
  +         final Type arg1 = (Type) ptype.argsType().get(0);
            if (!arg1.identicalTo(tleft)) {
                _left = new CastExpr(_left, arg1);
            }
  
  
  
  1.6.8.1.2.1 +6 -6      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnionPathExpr.java
  
  Index: UnionPathExpr.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnionPathExpr.java,v
  retrieving revision 1.6.8.1
  retrieving revision 1.6.8.1.2.1
  diff -u -r1.6.8.1 -r1.6.8.1.2.1
  --- UnionPathExpr.java        14 Aug 2002 19:21:34 -0000      1.6.8.1
  +++ UnionPathExpr.java        10 Jan 2003 16:50:42 -0000      1.6.8.1.2.1
  @@ -63,7 +63,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.DOM;
   import org.apache.xalan.xsltc.dom.Axis;
  @@ -90,7 +90,7 @@
       public void setParser(Parser parser) {
        super.setParser(parser);
        // find all expressions in this Union
  -     final Vector components = new Vector();
  +     final ArrayList components = new ArrayList();
        flatten(components);
        final int size = components.size();
        _components = (Expression[])components.toArray(new Expression[size]);
  @@ -128,14 +128,14 @@
        return "union(" + _pathExpr + ", " + _rest + ')';
       }
        
  -    private void flatten(Vector components) {
  -     components.addElement(_pathExpr);
  +    private void flatten(ArrayList components) {
  +     components.add(_pathExpr);
        if (_rest != null) {
            if (_rest instanceof UnionPathExpr) {
                ((UnionPathExpr)_rest).flatten(components);
            }
            else {
  -             components.addElement(_rest);
  +             components.add(_rest);
            }
        }
       }
  
  
  
  1.2.8.1.2.1 +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnparsedEntityUriCall.java
  
  Index: UnparsedEntityUriCall.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnparsedEntityUriCall.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- UnparsedEntityUriCall.java        14 Aug 2002 19:21:34 -0000      1.2.8.1
  +++ UnparsedEntityUriCall.java        10 Jan 2003 16:50:42 -0000      
1.2.8.1.2.1
  @@ -64,7 +64,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -73,7 +73,7 @@
   final class UnparsedEntityUriCall extends FunctionCall {
       private Expression _entity;
   
  -    public UnparsedEntityUriCall(QName fname, Vector arguments) {
  +    public UnparsedEntityUriCall(QName fname, ArrayList arguments) {
        super(fname, arguments);
        _entity = argument();
       }
  
  
  
  1.3.8.1.2.1 +6 -6      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnsupportedElement.java
  
  Index: UnsupportedElement.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UnsupportedElement.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.1.2.1
  diff -u -r1.3.8.1 -r1.3.8.1.2.1
  --- UnsupportedElement.java   14 Aug 2002 19:21:34 -0000      1.3.8.1
  +++ UnsupportedElement.java   10 Jan 2003 16:50:42 -0000      1.3.8.1.2.1
  @@ -62,9 +62,9 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Hashtable;
  -import java.util.Enumeration;
  -import java.util.Vector;
  +import java.util.HashMap;
  +import java.util.Iterator;
  +import java.util.ArrayList;
   
   import javax.xml.parsers.*;
   
  @@ -124,11 +124,11 @@
        if (root instanceof Fallback) return((Fallback)root);
   
        // Then traverse all child elements
  -     Vector children = root.getContents();
  +     ArrayList children = root.getContents();
        if (children != null) {
            final int count = children.size();
            for (int i = 0; i < count; i++) {
  -             SyntaxTreeNode child = (SyntaxTreeNode)children.elementAt(i);
  +             SyntaxTreeNode child = (SyntaxTreeNode)children.get(i);
                SyntaxTreeNode node = findFallback(child);
                if (node != null) return node;
            }
  
  
  
  1.8.2.1.2.1 +5 -5      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UseAttributeSets.java
  
  Index: UseAttributeSets.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/UseAttributeSets.java,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.1.2.1
  diff -u -r1.8.2.1 -r1.8.2.1.2.1
  --- UseAttributeSets.java     14 Aug 2002 19:21:34 -0000      1.8.2.1
  +++ UseAttributeSets.java     10 Jan 2003 16:50:42 -0000      1.8.2.1.2.1
  @@ -64,9 +64,9 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import java.util.Iterator;
  -import java.util.Enumeration;
   import java.util.StringTokenizer;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
  @@ -80,7 +80,7 @@
        "";
   
       // Contains the names of all references attribute sets
  -    private final Vector _sets = new Vector(2);
  +    private final ArrayList _sets = new ArrayList(2);
   
       /**
        * Constructur - define initial attribute sets to use
  @@ -125,7 +125,7 @@
        // Go through each attribute set and generate a method call
        for (int i=0; i<_sets.size(); i++) {
            // Get the attribute set name
  -         final QName name = (QName)_sets.elementAt(i);
  +         final QName name = (QName)_sets.get(i);
            // Get the AttributeSet reference from the symbol table
            final AttributeSet attrs = symbolTable.lookupAttributeSet(name);
            // Compile the call to the set's method if the set exists
  
  
  
  1.22.8.1.2.2 +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Variable.java
  
  Index: Variable.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Variable.java,v
  retrieving revision 1.22.8.1.2.1
  retrieving revision 1.22.8.1.2.2
  diff -u -r1.22.8.1.2.1 -r1.22.8.1.2.2
  --- Variable.java     2 Dec 2002 15:51:18 -0000       1.22.8.1.2.1
  +++ Variable.java     10 Jan 2003 16:50:42 -0000      1.22.8.1.2.2
  @@ -66,7 +66,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.Instruction;
  
  
  
  1.16.2.1.2.1 +11 -11    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/VariableBase.java
  
  Index: VariableBase.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/VariableBase.java,v
  retrieving revision 1.16.2.1
  retrieving revision 1.16.2.1.2.1
  diff -u -r1.16.2.1 -r1.16.2.1.2.1
  --- VariableBase.java 14 Aug 2002 19:21:34 -0000      1.16.2.1
  +++ VariableBase.java 10 Jan 2003 16:50:43 -0000      1.16.2.1.2.1
  @@ -66,7 +66,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.Instruction;
  @@ -87,10 +87,10 @@
       protected String      select;           // Textual repr. of variable 
expr.
   
       // References to this variable (when local)
  -    protected Vector      _refs = new Vector(2); 
  +    protected ArrayList      _refs = new ArrayList(2);
   
       // Dependencies to other variables/parameters (for globals only)
  -    protected Vector      _dependencies = null;
  +    protected ArrayList      _dependencies = null;
   
       // Used to make sure parameter field is not added twice
       protected boolean    _ignore = false;
  @@ -110,7 +110,7 @@
        * expression contains a reference to this variable.
        */
       public void addReference(VariableRefBase vref) {
  -     _refs.addElement(vref);
  +     _refs.add(vref);
       }
   
       /**
  @@ -126,17 +126,17 @@
        */
       public void addDependency(VariableBase other) {
        if (_dependencies == null) {
  -         _dependencies = new Vector();
  +         _dependencies = new ArrayList();
        }
        if (!_dependencies.contains(other)) {
  -         _dependencies.addElement(other);
  +         _dependencies.add(other);
        }
       }
   
       /**
        *
        */
  -    public Vector getDependencies() {
  +    public ArrayList getDependencies() {
        return _dependencies;
       }
   
  @@ -171,7 +171,7 @@
        */
       public Instruction loadInstruction() {
        final Instruction instr = _loadInstruction;
  -     if (_loadInstruction == null) 
  +     if (_loadInstruction == null)
            _loadInstruction = _type.LOAD(_local.getIndex());
        return _loadInstruction;
       }
  @@ -196,7 +196,7 @@
       public void display(int indent) {
        indent(indent);
        System.out.println("Variable " + _name);
  -     if (_select != null) { 
  +     if (_select != null) {
            indent(indent + IndentIncrement);
            System.out.println("select " + _select.toString());
        }
  @@ -259,7 +259,7 @@
        if ((other != null) && (other.getParent() == getParent())) {
            reportError(this, parser, ErrorMsg.VARIABLE_REDEF_ERR, name);
        }
  -     
  +
        select = getAttribute("select");
        if (select.length() > 0) {
            _select = getParser().parseExpression(this, "select", null);
  
  
  
  1.7.8.1.2.1 +42 -42    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Whitespace.java
  
  Index: Whitespace.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Whitespace.java,v
  retrieving revision 1.7.8.1
  retrieving revision 1.7.8.1.2.1
  diff -u -r1.7.8.1 -r1.7.8.1.2.1
  --- Whitespace.java   14 Aug 2002 19:21:34 -0000      1.7.8.1
  +++ Whitespace.java   10 Jan 2003 16:50:43 -0000      1.7.8.1.2.1
  @@ -62,7 +62,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.StringTokenizer;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
  @@ -83,7 +83,7 @@
       public static final int PRESERVE_SPACE = 2;
   
       // The 3 different categories of strip/preserve rules (order important)
  -    public static final int RULE_NONE      = 0; 
  +    public static final int RULE_NONE      = 0;
       public static final int RULE_ELEMENT   = 1; // priority 0
       public static final int RULE_NAMESPACE = 2; // priority -1/4
       public static final int RULE_ALL       = 3; // priority -1/2
  @@ -101,7 +101,7 @@
        private String _element;   // Should be replaced by node type (int)
        private int    _type;
        private int    _priority;
  -     
  +
        /**
         * Strip/preserve rule constructor
         */
  @@ -161,7 +161,7 @@
        */
       public void parseContents(Parser parser) {
        // Determine if this is an xsl:strip- or preserve-space element
  -     _action = _qname.getLocalPart().endsWith("strip-space") 
  +     _action = _qname.getLocalPart().endsWith("strip-space")
            ? STRIP_SPACE : PRESERVE_SPACE;
   
        // Determine the import precedence
  @@ -178,7 +178,7 @@
        StringTokenizer list = new StringTokenizer(_elementList);
        StringBuffer elements = new StringBuffer(Constants.EMPTYSTRING);
   
  -     while (list.hasMoreElements()) {
  +     while (list.hasMoreTokens()) {
            String token = list.nextToken();
            String prefix;
            String namespace;
  @@ -198,7 +198,7 @@
            else
                elements.append(token);
   
  -         if (list.hasMoreElements())
  +         if (list.hasMoreTokens())
                elements.append(" ");
        }
        _elementList = elements.toString();
  @@ -209,33 +209,33 @@
        * De-tokenize the elements listed in the 'elements' attribute and
        * instanciate a set of strip/preserve rules.
        */
  -    public Vector getRules() {
  -     final Vector rules = new Vector();
  +    public ArrayList getRules() {
  +     final ArrayList rules = new ArrayList();
        // Go through each element and instanciate strip/preserve-object
        final StringTokenizer list = new StringTokenizer(_elementList);
  -     while (list.hasMoreElements()) {
  +     while (list.hasMoreTokens()) {
            rules.add(new WhitespaceRule(_action,
                                         list.nextToken(),
                                         _importPrecedence));
        }
        return rules;
       }
  -    
  -    
  +
  +
       /**
        * Scans through the rules vector and looks for a rule of higher
        * priority that contradicts the current rule.
        */
  -    private static WhitespaceRule findContradictingRule(Vector rules,
  +    private static WhitespaceRule findContradictingRule(ArrayList rules,
                                                        WhitespaceRule rule) {
        for (int i = 0; i < rules.size(); i++) {
            // Get the next rule in the prioritized list
  -         WhitespaceRule currentRule = (WhitespaceRule)rules.elementAt(i);
  +         WhitespaceRule currentRule = (WhitespaceRule)rules.get(i);
            // We only consider rules with higher priority
            if (currentRule == rule) {
                return null;
            }
  -         
  +
            /*
             * See if there is a contradicting rule with higher priority.
             * If the rules has the same action then this rule is redundant,
  @@ -244,7 +244,7 @@
            switch (currentRule.getStrength()) {
            case RULE_ALL:
                return currentRule;
  -             
  +
            case RULE_ELEMENT:
                if (!rule.getElement().equals(currentRule.getElement())) {
                    break;
  @@ -265,7 +265,7 @@
        * Orders a set or rules by priority, removes redundant rules and rules
        * that are shadowed by stronger, contradicting rules.
        */
  -    private static int prioritizeRules(Vector rules) {
  +    private static int prioritizeRules(ArrayList rules) {
        WhitespaceRule currentRule;
        int defaultAction = PRESERVE_SPACE;
   
  @@ -277,21 +277,21 @@
        // elements and signal that all whitespaces should be preserved
        boolean strip = false;
        for (int i = 0; i < rules.size(); i++) {
  -         currentRule = (WhitespaceRule)rules.elementAt(i);
  +         currentRule = (WhitespaceRule)rules.get(i);
            if (currentRule.getAction() == STRIP_SPACE) {
                strip = true;
            }
        }
        // Return with default action: PRESERVE_SPACE
        if (!strip) {
  -         rules.removeAllElements();
  +         rules.clear();
            return PRESERVE_SPACE;
        }
   
        // Remove all rules that are contradicted by rules with higher priority
        for (int idx = 0; idx < rules.size(); ) {
  -         currentRule = (WhitespaceRule)rules.elementAt(idx);
  -     
  +         currentRule = (WhitespaceRule)rules.get(idx);
  +
            // Remove this single rule if it has no purpose
            if (findContradictingRule(rules,currentRule) != null) {
                rules.remove(idx);
  @@ -301,7 +301,7 @@
                if (currentRule.getStrength() == RULE_ALL) {
                    defaultAction = currentRule.getAction();
                    for (int i = idx; i < rules.size(); i++) {
  -                     rules.removeElementAt(i);
  +                     rules.remove(i);
                    }
                }
                // Skip to next rule (there might not be any)...
  @@ -317,20 +317,20 @@
        // Now work backwards and strip away all rules that have the same
        // action as the default rule (no reason the check them at the end).
        do {
  -         currentRule = (WhitespaceRule)rules.lastElement();
  +         currentRule = (WhitespaceRule) rules.get(rules.size() - 1);
            if (currentRule.getAction() == defaultAction) {
  -             rules.removeElementAt(rules.size() - 1);
  +             rules.remove(rules.size() - 1);
            }
            else {
                break;
            }
        } while (rules.size() > 0);
  -     
  +
        // Signal that whitespace detection predicate must be used.
        return defaultAction;
       }
   
  -    public static void compileStripSpace(BranchHandle strip[], 
  +    public static void compileStripSpace(BranchHandle strip[],
                                         int sCount,
                                         InstructionList il) {
        final InstructionHandle target = il.append(ICONST_1);
  @@ -340,7 +340,7 @@
        }
       }
   
  -    public static void compilePreserveSpace(BranchHandle preserve[], 
  +    public static void compilePreserveSpace(BranchHandle preserve[],
                                            int pCount,
                                            InstructionList il) {
        final InstructionHandle target = il.append(ICONST_0);
  @@ -365,7 +365,7 @@
       /**
        * Compiles the predicate method
        */
  -    private static void compilePredicate(Vector rules,
  +    private static void compilePredicate(ArrayList rules,
                                         int defaultAction,
                                         ClassGenerator classGen) {
        final ConstantPoolGen cpg = classGen.getConstantPool();
  @@ -375,7 +375,7 @@
        // private boolean Translet.stripSpace(int type) - cannot be static
        final MethodGenerator stripSpace =
            new MethodGenerator(ACC_PUBLIC | ACC_FINAL ,
  -                     org.apache.bcel.generic.Type.BOOLEAN, 
  +                     org.apache.bcel.generic.Type.BOOLEAN,
                        new org.apache.bcel.generic.Type[] {
                            Util.getJCRefType(DOM_INTF_SIG),
                            org.apache.bcel.generic.Type.INT,
  @@ -398,7 +398,7 @@
        // Traverse all strip/preserve rules
        for (int i = 0; i<rules.size(); i++) {
            // Get the next rule in the prioritised list
  -         WhitespaceRule rule = (WhitespaceRule)rules.elementAt(i);
  +         WhitespaceRule rule = (WhitespaceRule)rules.get(i);
   
            // Returns the namespace for a node in the DOM
            final int gns = cpg.addInterfaceMethodref(DOM_INTF,
  @@ -478,7 +478,7 @@
        // private boolean Translet.stripSpace(int type) - cannot be static
        final MethodGenerator stripSpace =
            new MethodGenerator(ACC_PUBLIC | ACC_FINAL ,
  -                     org.apache.bcel.generic.Type.BOOLEAN, 
  +                     org.apache.bcel.generic.Type.BOOLEAN,
                        new org.apache.bcel.generic.Type[] {
                            Util.getJCRefType(DOM_INTF_SIG),
                            org.apache.bcel.generic.Type.INT,
  @@ -512,7 +512,7 @@
        *    - STRIP_SPACE    (always strip whitespace text-nodes)
        *    - PRESERVE_SPACE (always preserve whitespace text-nodes)
        */
  -    public static int translateRules(Vector rules,
  +    public static int translateRules(ArrayList rules,
                                     ClassGenerator classGen) {
        // Get the core rules in prioritized order
        final int defaultAction = prioritizeRules(rules);
  @@ -530,36 +530,36 @@
       /**
        * Sorts a range of rules with regard to PRIORITY only
        */
  -    private static void quicksort(Vector rules, int p, int r) {
  +    private static void quicksort(ArrayList rules, int p, int r) {
        while (p < r) {
            final int q = partition(rules, p, r);
            quicksort(rules, p, q);
            p = q + 1;
        }
       }
  -    
  +
       /**
        * Used with quicksort method above
        */
  -    private static int partition(Vector rules, int p, int r) {
  -     final WhitespaceRule x = (WhitespaceRule)rules.elementAt((p+r) >>> 1);
  +    private static int partition(ArrayList rules, int p, int r) {
  +     final WhitespaceRule x = (WhitespaceRule)rules.get((p+r) >>> 1);
        int i = p - 1, j = r + 1;
        while (true) {
  -         while (x.compareTo((WhitespaceRule)rules.elementAt(--j)) < 0) {
  +         while (x.compareTo((WhitespaceRule)rules.get(--j)) < 0) {
            }
  -         while (x.compareTo((WhitespaceRule)rules.elementAt(++i)) > 0) {
  +         while (x.compareTo((WhitespaceRule)rules.get(++i)) > 0) {
            }
            if (i < j) {
  -             final WhitespaceRule tmp = (WhitespaceRule)rules.elementAt(i);
  -             rules.setElementAt(rules.elementAt(j), i);
  -             rules.setElementAt(tmp, j);
  +             final WhitespaceRule tmp = (WhitespaceRule)rules.get(i);
  +             rules.set(i, rules.get(j));
  +             rules.set(j, tmp);
            }
            else {
                return j;
            }
        }
       }
  -    
  +
       /**
        * Type-check contents/attributes - nothing to do...
        */
  
  
  
  1.42.2.1.2.2 +78 -78    
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.42.2.1.2.1
  retrieving revision 1.42.2.1.2.2
  diff -u -r1.42.2.1.2.1 -r1.42.2.1.2.2
  --- XSLTC.java        2 Dec 2002 15:51:19 -0000       1.42.2.1.2.1
  +++ XSLTC.java        10 Jan 2003 16:50:43 -0000      1.42.2.1.2.2
  @@ -68,12 +68,12 @@
   
   import java.io.*;
   import java.util.Set;
  -import java.util.Vector;
  -import java.util.Hashtable;
  +import java.util.ArrayList;
  +import java.util.HashMap;
   import java.util.Properties;
   import java.util.HashSet;
   import java.util.Iterator;
  -import java.util.Enumeration;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   import java.util.Date;
   import java.util.Map;
  @@ -100,7 +100,7 @@
   
       // A reference to an external SourceLoader (for use with include/import)
       private SourceLoader _loader = null;
  -    
  +
       // A reference to the stylesheet being compiled.
       private Stylesheet _stylesheet = null;
   
  @@ -111,19 +111,19 @@
       private int _stepPatternSerial  = 1;
       private int _helperClassSerial  = 0;
       private int _attributeSetSerial = 0;
  -    
  +
       private int[] _numberFieldIndexes;
  -    
  +
       // Name index tables
       private int       _nextGType;  // Next available element type
  -    private Vector    _namesIndex; // Index of all registered QNames
  -    private Hashtable _elements;   // Hashtable of all registered elements
  -    private Hashtable _attributes; // Hashtable of all registered attributes
  +    private ArrayList    _namesIndex; // Index of all registered QNames
  +    private HashMap _elements;   // HashMap of all registered elements
  +    private HashMap _attributes; // HashMap of all registered attributes
   
       // Namespace index tables
       private int       _nextNSType; // Next available namespace type
  -    private Vector    _namespaceIndex; // Index of all registered namespaces
  -    private Hashtable _namespaces; // Hashtable of all registered namespaces
  +    private ArrayList    _namespaceIndex; // Index of all registered 
namespaces
  +    private HashMap _namespaces; // HashMap of all registered namespaces
   
       // These define the various methods for outputting the translet
       public static final int FILE_OUTPUT        = 0;
  @@ -132,7 +132,7 @@
       public static final int CLASSLOADER_OUTPUT = 3;
       public static final int BYTEARRAY_AND_FILE_OUTPUT = 4;
       public static final int BYTEARRAY_AND_JAR_OUTPUT  = 5;
  -    
  +
   
       // Compiler options (passed from command line or XSLTC client)
       private boolean _debug = false;      // -x
  @@ -142,8 +142,8 @@
       private File    _destDir = null;     // -d <directory-name>
       private int     _outputType = FILE_OUTPUT; // by default
   
  -    private Vector  _classes;
  -    private Vector  _bcelClasses;
  +    private ArrayList  _classes;
  +    private ArrayList  _bcelClasses;
       private boolean _callsNodeset = false;
       private boolean _multiDocument = false;
   
  @@ -189,21 +189,21 @@
       public void init() {
        reset();
        _reader = null;
  -     _classes = new Vector();
  -     _bcelClasses = new Vector();
  +     _classes = new ArrayList();
  +     _bcelClasses = new ArrayList();
       }
  -    
  +
       /**
        * Initializes the compiler to produce a new translet
        */
       private void reset() {
        _nextGType      = DOM.NTYPES;
  -     _elements       = new Hashtable();
  -     _attributes     = new Hashtable();
  -     _namespaces     = new Hashtable();
  +     _elements       = new HashMap();
  +     _attributes     = new HashMap();
  +     _namespaces     = new HashMap();
        _namespaces.put("",new Integer(_nextNSType));
  -     _namesIndex     = new Vector(128);
  -     _namespaceIndex = new Vector(32);
  +     _namesIndex     = new ArrayList(128);
  +     _namespaceIndex = new ArrayList(32);
        _parser.init();
        //_variableSerial     = 1;
        _modeSerial         = 1;
  @@ -223,7 +223,7 @@
        * Defines an external SourceLoader to provide the compiler with 
documents
        * referenced in xsl:include/import
        * @param loader The SourceLoader to use for include/import
  -     */    
  +     */
       public void setSourceLoader(SourceLoader loader) {
        _loader = loader;
       }
  @@ -250,7 +250,7 @@
       public void setPIParameters(String media, String title, String charset) {
        _parser.setPIParameters(media, title, charset);
       }
  -    
  +
       /**
        * Compiles an XSL stylesheet pointed to by a URL
        * @param url An URL containing the input XSL stylesheet
  @@ -308,11 +308,11 @@
        */
       public boolean compile(InputSource input, String name) {
        try {
  -         // Reset globals in case we're called by compile(Vector v);
  +         // Reset globals in case we're called by compile(ArrayList v);
            reset();
   
            // The systemId may not be set, so we'll have to check the URL
  -         String systemId = null; 
  +         String systemId = null;
            if (input != null) {
                systemId = input.getSystemId();
            }
  @@ -375,21 +375,21 @@
       }
   
       /**
  -     * Compiles a set of stylesheets pointed to by a Vector of URLs
  -     * @param stylesheets A Vector containing URLs pointing to the 
stylesheets
  +     * Compiles a set of stylesheets pointed to by a ArrayList of URLs
  +     * @param stylesheets A ArrayList containing URLs pointing to the 
stylesheets
        * @return 'true' if the compilation was successful
        */
  -    public boolean compile(Vector stylesheets) {
  +    public boolean compile(ArrayList stylesheets) {
        // Get the number of stylesheets (ie. URLs) in the vector
        final int count = stylesheets.size();
  -     
  +
        // Return straight away if the vector is empty
        if (count == 0) return true;
   
        // Special handling needed if the URL count is one, becuase the
        // _className global must not be reset if it was set explicitly
        if (count == 1) {
  -         final Object url = stylesheets.firstElement();
  +         final Object url = stylesheets.get(0);
            if (url instanceof URL)
                return compile((URL)url);
            else
  @@ -397,10 +397,10 @@
        }
        else {
            // Traverse all elements in the vector and compile
  -         final Enumeration urls = stylesheets.elements();
  -         while (urls.hasMoreElements()) {
  -             _className = null; // reset, so that new name will be computed 
  -             final Object url = urls.nextElement();
  +         final Iterator urls = stylesheets.iterator();
  +         while (urls.hasNext()) {
  +             _className = null; // reset, so that new name will be computed
  +             final Object url = urls.next();
                if (url instanceof URL) {
                    if (!compile((URL)url)) return false;
                }
  @@ -417,7 +417,7 @@
        final int count = _classes.size();
        final byte[][] result = new byte[count][1];
        for (int i = 0; i < count; i++)
  -         result[i] = (byte[])_classes.elementAt(i);
  +         result[i] = (byte[])_classes.get(i);
        return result;
       }
   
  @@ -436,7 +436,7 @@
        else
            return null;
       }
  -    
  +
       /**
        * Compiles a stylesheet pointed to by a URL. The result is put in a
        * set of byte arrays. One byte array for each generated class.
  @@ -446,7 +446,7 @@
        */
       public byte[][] compile(String name, InputSource input) {
           return compile(name, input, BYTEARRAY_OUTPUT);
  -    }    
  +    }
   
       /**
        * Set the XMLReader to use for parsing the next input stylesheet
  @@ -457,18 +457,18 @@
       }
   
       /**
  -     * Get a Vector containing all compile error messages
  -     * @return A Vector containing all compile error messages
  +     * Get a ArrayList containing all compile error messages
  +     * @return A ArrayList containing all compile error messages
        */
  -    public Vector getErrors() {
  +    public ArrayList getErrors() {
        return _parser.getErrors();
       }
   
       /**
  -     * Get a Vector containing all compile warning messages
  -     * @return A Vector containing all compile error messages
  +     * Get a ArrayList containing all compile warning messages
  +     * @return A ArrayList containing all compile error messages
        */
  -    public Vector getWarnings() {
  +    public ArrayList getWarnings() {
        return _parser.getWarnings();
       }
   
  @@ -514,12 +514,12 @@
       /**
        * Set the class name for the generated translet. This class name is
        * overridden if multiple stylesheets are compiled in one go using the
  -     * compile(Vector urls) method.
  +     * compile(ArrayList urls) method.
        * @param className The name to assign to the translet class
        */
       public void setClassName(String className) {
        final String base  = Util.baseName(className);
  -     final String noext = Util.noExtName(base); 
  +     final String noext = Util.noExtName(base);
        String name  = Util.toJavaName(noext);
   
        if (_packageName == null)
  @@ -527,7 +527,7 @@
        else
            _className = _packageName + '.' + name;
       }
  -    
  +
       /**
        * Get the class name for the generated translet.
        */
  @@ -542,7 +542,7 @@
       private String classFileName(final String className) {
        return className.replace('.', File.separatorChar) + ".class";
       }
  -    
  +
       /**
        * Generate an output File object to send the translet to
        */
  @@ -607,7 +607,7 @@
       public Stylesheet getStylesheet() {
        return _stylesheet;
       }
  -   
  +
       /**
        * Registers an attribute and gives it a type so that it can be mapped to
        * DOM attribute types at run-time.
  @@ -620,9 +620,9 @@
            final String uri = name.getNamespace();
            final String local = "@"+name.getLocalPart();
            if ((uri != null) && (!uri.equals("")))
  -             _namesIndex.addElement(uri+":"+local);
  +             _namesIndex.add(uri+":"+local);
            else
  -             _namesIndex.addElement(local);
  +             _namesIndex.add(local);
            if (name.getLocalPart().equals("*")) {
                registerNamespace(name.getNamespace());
            }
  @@ -639,7 +639,7 @@
        Integer code = (Integer)_elements.get(name.toString());
        if (code == null) {
            _elements.put(name.toString(), code = new Integer(_nextGType++));
  -         _namesIndex.addElement(name.toString());
  +         _namesIndex.add(name.toString());
        }
        if (name.getLocalPart().equals("*")) {
            registerNamespace(name.getNamespace());
  @@ -655,7 +655,7 @@
        final SymbolTable stable = _parser.getSymbolTable();
        final String uri = stable.lookupNamespace(name.toString());
        final int code = registerNamespace(uri);
  -     return code; 
  +     return code;
       }
   
       /**
  @@ -667,11 +667,11 @@
        if (code == null) {
            code = new Integer(_nextNSType++);
            _namespaces.put(namespaceURI,code);
  -         _namespaceIndex.addElement(namespaceURI);
  +         _namespaceIndex.add(namespaceURI);
        }
        return code.intValue();
       }
  -    
  +
       public int nextModeSerial() {
        return _modeSerial++;
       }
  @@ -691,19 +691,19 @@
       public int nextHelperClassSerial() {
        return _helperClassSerial++;
       }
  -    
  +
       public int nextAttributeSetSerial() {
        return _attributeSetSerial++;
       }
   
  -    public Vector getNamesIndex() {
  +    public ArrayList getNamesIndex() {
        return _namesIndex;
       }
   
  -    public Vector getNamespaceIndex() {
  +    public ArrayList getNamespaceIndex() {
        return _namespaceIndex;
       }
  -    
  +
       /**
        * Returns a unique name for every helper class needed to
        * execute a translet.
  @@ -711,11 +711,11 @@
       public String getHelperClassName() {
        return getClassName() + '$' + _helperClassSerial++;
       }
  -   
  +
       public void dumpClass(JavaClass clazz) {
  -     
  -     if (_outputType == FILE_OUTPUT || 
  -         _outputType == BYTEARRAY_AND_FILE_OUTPUT) 
  +
  +     if (_outputType == FILE_OUTPUT ||
  +         _outputType == BYTEARRAY_AND_FILE_OUTPUT)
        {
            File outFile = getOutputFile(clazz.getClassName());
            String parentDir = outFile.getParent();
  @@ -725,7 +725,7 @@
                    parentFile.mkdirs();
            }
        }
  -     
  +
        try {
            switch (_outputType) {
            case FILE_OUTPUT:
  @@ -735,7 +735,7 @@
                            getOutputFile(clazz.getClassName()))));
                break;
            case JAR_OUTPUT:
  -             _bcelClasses.addElement(clazz);  
  +             _bcelClasses.add(clazz);
                break;
            case BYTEARRAY_OUTPUT:
            case BYTEARRAY_AND_FILE_OUTPUT:
  @@ -743,14 +743,14 @@
            case CLASSLOADER_OUTPUT:
                ByteArrayOutputStream out = new ByteArrayOutputStream(2048);
                clazz.dump(out);
  -             _classes.addElement(out.toByteArray());
  -             
  +             _classes.add(out.toByteArray());
  +
                if (_outputType == BYTEARRAY_AND_FILE_OUTPUT)
                  clazz.dump(new BufferedOutputStream(
                        new 
FileOutputStream(getOutputFile(clazz.getClassName()))));
                else if (_outputType == BYTEARRAY_AND_JAR_OUTPUT)
  -               _bcelClasses.addElement(clazz);
  -               
  +               _bcelClasses.add(clazz);
  +
                break;
            }
        }
  @@ -765,7 +765,7 @@
       private String entryName(File f) throws IOException {
        return f.getName().replace(File.separatorChar, '/');
       }
  -    
  +
       /**
        * Generate output JAR-file and packages
        */
  @@ -777,12 +777,12 @@
   
        final Map map = manifest.getEntries();
        // create manifest
  -     Enumeration classes = _bcelClasses.elements();
  +     Iterator classes = _bcelClasses.iterator();
        final String now = (new Date()).toString();
  -     final java.util.jar.Attributes.Name dateAttr = 
  +     final java.util.jar.Attributes.Name dateAttr =
            new java.util.jar.Attributes.Name("Date");
  -     while (classes.hasMoreElements()) {
  -         final JavaClass clazz = (JavaClass)classes.nextElement();
  +     while (classes.hasNext()) {
  +         final JavaClass clazz = (JavaClass)classes.next();
            final String className = clazz.getClassName().replace('.','/');
            final java.util.jar.Attributes attr = new 
java.util.jar.Attributes();
            attr.put(dateAttr, now);
  @@ -792,9 +792,9 @@
        final File jarFile = new File(_destDir, _jarFileName);
        final JarOutputStream jos =
            new JarOutputStream(new FileOutputStream(jarFile), manifest);
  -     classes = _bcelClasses.elements();
  -     while (classes.hasMoreElements()) {
  -         final JavaClass clazz = (JavaClass)classes.nextElement();
  +     classes = _bcelClasses.iterator();
  +     while (classes.hasNext()) {
  +         final JavaClass clazz = (JavaClass)classes.next();
            final String className = clazz.getClassName().replace('.','/');
            jos.putNextEntry(new JarEntry(className+".class"));
            final ByteArrayOutputStream out = new ByteArrayOutputStream(2048);
  
  
  
  1.18.2.1.2.1 +6 -6      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XslAttribute.java
  
  Index: XslAttribute.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XslAttribute.java,v
  retrieving revision 1.18.2.1
  retrieving revision 1.18.2.1.2.1
  diff -u -r1.18.2.1 -r1.18.2.1.2.1
  --- XslAttribute.java 14 Aug 2002 19:21:34 -0000      1.18.2.1
  +++ XslAttribute.java 10 Jan 2003 16:50:43 -0000      1.18.2.1.2.1
  @@ -65,7 +65,7 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.bcel.generic.*;
  @@ -113,9 +113,9 @@
   
        // Ignore attribute if preceeded by some other type of element
        final SyntaxTreeNode parent = getParent();
  -     final Vector siblings = parent.getContents();
  +     final ArrayList siblings = parent.getContents();
        for (int i = 0; i < parent.elementCount(); i++) {
  -         SyntaxTreeNode item = (SyntaxTreeNode)siblings.elementAt(i);
  +         SyntaxTreeNode item = (SyntaxTreeNode)siblings.get(i);
            if (item == this) break;
   
            // These three objects result in one or more attribute output
  @@ -229,8 +229,8 @@
        _name.translate(classGen, methodGen);// 2nd arg
   
        // Push attribute value - shortcut for literal strings
  -     if ((elementCount() == 1) && (elementAt(0) instanceof Text)) {
  -         il.append(new PUSH(cpg, ((Text)elementAt(0)).getText()));
  +     if ((elementCount() == 1) && (get(0) instanceof Text)) {
  +         il.append(new PUSH(cpg, ((Text)get(0)).getText()));
        }
        else {
            il.append(classGen.loadTranslet());
  
  
  
  1.17.2.1.2.2 +4 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XslElement.java
  
  Index: XslElement.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XslElement.java,v
  retrieving revision 1.17.2.1.2.1
  retrieving revision 1.17.2.1.2.2
  diff -u -r1.17.2.1.2.1 -r1.17.2.1.2.2
  --- XslElement.java   2 Dec 2002 15:51:19 -0000       1.17.2.1.2.1
  +++ XslElement.java   10 Jan 2003 16:50:43 -0000      1.17.2.1.2.2
  @@ -64,8 +64,8 @@
   
   package org.apache.xalan.xsltc.compiler;
   
  -import java.util.Vector;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   import java.util.StringTokenizer;
   
   import org.apache.xalan.xsltc.compiler.util.Type;
  @@ -321,7 +321,7 @@
        final int n = elementCount();
        for (int i = 0; i < n; i++) {
            final SyntaxTreeNode item =
  -             (SyntaxTreeNode)getContents().elementAt(i);
  +             (SyntaxTreeNode)getContents().get(i);
            if (_ignore && item instanceof XslAttribute) continue;
            item.translate(classGen, methodGen);
        }
  
  
  
  1.39.2.1.2.2 +13 -13    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup
  
  Index: xpath.cup
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup,v
  retrieving revision 1.39.2.1.2.1
  retrieving revision 1.39.2.1.2.2
  diff -u -r1.39.2.1.2.1 -r1.39.2.1.2.2
  --- xpath.cup 2 Dec 2002 15:51:19 -0000       1.39.2.1.2.1
  +++ xpath.cup 10 Jan 2003 16:50:43 -0000      1.39.2.1.2.2
  @@ -66,7 +66,7 @@
   package org.apache.xalan.xsltc.compiler;
   
   import java.util.Stack;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.io.StringReader;
   import java_cup.runtime.*;
   
  @@ -79,7 +79,7 @@
       /**
        * Used by function calls with no args.
        */
  -    static public final Vector EmptyArgs = new Vector(0);
  +    static public final ArrayList EmptyArgs = new ArrayList(0);
   
       /**
        * Reference to non-existing variable.
  @@ -279,7 +279,7 @@
   non terminal StepPattern StepPattern;
   non terminal Object NodeTestPattern, NameTestPattern;
   
  -non terminal Vector Predicates, NonemptyArgumentList;
  +non terminal ArrayList Predicates, NonemptyArgumentList;
   non terminal QName QName, FunctionName, VariableName;
   non terminal Integer AxisName, AxisSpecifier;
   non terminal Integer ChildOrAttributeAxisSpecifier;
  @@ -428,13 +428,13 @@
   
   Predicates ::= Predicate:p
               {: 
  -             Vector temp = new Vector();
  -             temp.addElement(p);
  +             ArrayList temp = new ArrayList();
  +             temp.add(p);
                RESULT = temp;     
               :}
   
               | Predicate:p Predicates:pp
  -            {: pp.insertElementAt(p, 0); RESULT = pp; :}; 
  +            {: pp.add(0, p); RESULT = pp; :}; 
   
   Predicate ::=  LBRACK Expr:e RBRACK
            {:
  @@ -585,7 +585,7 @@
           final Step right  = (Step)step;
              final int  axis   = right.getAxis();
              final int  type   = right.getNodeType();
  -           final Vector predicates = right.getPredicates();
  +           final ArrayList predicates = right.getPredicates();
   
              if ((axis == Axis.CHILD) && (type != NodeTest.ATTRIBUTE)) {
                  // Compress './/child:E' into 'descendant::E' - if possible
  @@ -953,13 +953,13 @@
   
   NonemptyArgumentList ::= Argument:arg
           {: 
  -            Vector temp = new Vector();
  -            temp.addElement(arg);
  +            ArrayList temp = new ArrayList();
  +            temp.add(arg);
               RESULT = temp;
           :}
   
           | Argument:arg COMMA NonemptyArgumentList:argl
  -        {: argl.insertElementAt(arg, 0); RESULT = argl; :};
  +        {: argl.add(0, arg); RESULT = argl; :};
   
   FunctionName ::= QName:fname
           {: 
  @@ -992,8 +992,8 @@
              Expression exp = new EqualityExpr(Operators.EQ,
                                                new NameCall(name),
                                                new LiteralExpr(l));
  -           Vector predicates = new Vector();
  -           predicates.addElement(new Predicate(exp));
  +           ArrayList predicates = new ArrayList();
  +           predicates.add(new Predicate(exp));
              RESULT = new Step(Axis.CHILD, NodeTest.PI, predicates);
           :}
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3.8.1.2.1 +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/AttributeSetMethodGenerator.java
  
  Index: AttributeSetMethodGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/AttributeSetMethodGenerator.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.1.2.1
  diff -u -r1.3.8.1 -r1.3.8.1.2.1
  --- AttributeSetMethodGenerator.java  14 Aug 2002 19:21:40 -0000      1.3.8.1
  +++ AttributeSetMethodGenerator.java  10 Jan 2003 16:50:49 -0000      
1.3.8.1.2.1
  @@ -63,7 +63,7 @@
   
   package org.apache.xalan.xsltc.compiler.util;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.bcel.generic.Type;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.Parser;
  
  
  
  1.12.2.1.2.2 +8 -8      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages.java
  
  Index: ErrorMessages.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages.java,v
  retrieving revision 1.12.2.1.2.1
  retrieving revision 1.12.2.1.2.2
  diff -u -r1.12.2.1.2.1 -r1.12.2.1.2.2
  --- ErrorMessages.java        2 Dec 2002 15:51:22 -0000       1.12.2.1.2.1
  +++ ErrorMessages.java        10 Jan 2003 16:50:49 -0000      1.12.2.1.2.2
  @@ -128,7 +128,7 @@
    */
   
       // These message should be read from a locale-specific resource bundle
  -    private static final String errorMessages[] = { 
  +    private static final String errorMessages[] = {
        //MULTIPLE_STYLESHEET_ERR
        "More than one stylesheet defined in the same file.",
   
  @@ -870,7 +870,7 @@
         */
        //ERROR_MSG
        "ERROR:  ''{0}''",
  -     
  +
        /*
         * Note to translators:  The substitution text is the name of a class.
         */
  @@ -897,10 +897,10 @@
   
       static {
        _keys = new Vector();
  -     _keys.addElement(ErrorMsg.ERROR_MESSAGES_KEY);
  -     _keys.addElement(ErrorMsg.COMPILER_ERROR_KEY);
  -     _keys.addElement(ErrorMsg.COMPILER_WARNING_KEY);
  -     _keys.addElement(ErrorMsg.RUNTIME_ERROR_KEY);
  +     _keys.add(ErrorMsg.ERROR_MESSAGES_KEY);
  +     _keys.add(ErrorMsg.COMPILER_ERROR_KEY);
  +     _keys.add(ErrorMsg.COMPILER_WARNING_KEY);
  +     _keys.add(ErrorMsg.RUNTIME_ERROR_KEY);
       }
   
       public Enumeration getKeys() {
  @@ -914,7 +914,7 @@
        else if (key.equals(ErrorMsg.COMPILER_ERROR_KEY))
            return "Compiler error(s): ";
        else if (key.equals(ErrorMsg.COMPILER_WARNING_KEY))
  -         return "Compiler warning(s): ";         
  +         return "Compiler warning(s): ";
        else if (key.equals(ErrorMsg.RUNTIME_ERROR_KEY))
            return "Translet error(s): ";
        return(null);
  
  
  
  1.6.2.1.2.1 +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_no.java
  
  Index: ErrorMessages_no.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_no.java,v
  retrieving revision 1.6.2.1
  retrieving revision 1.6.2.1.2.1
  diff -u -r1.6.2.1 -r1.6.2.1.2.1
  --- ErrorMessages_no.java     14 Aug 2002 19:21:40 -0000      1.6.2.1
  +++ ErrorMessages_no.java     10 Jan 2003 16:50:49 -0000      1.6.2.1.2.1
  @@ -62,7 +62,7 @@
   
   package org.apache.xalan.xsltc.compiler.util;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Enumeration;
   import java.util.ResourceBundle;
   
  
  
  
  1.3.8.1.2.1 +20 -20    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/MethodType.java
  
  Index: MethodType.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/MethodType.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.1.2.1
  diff -u -r1.3.8.1 -r1.3.8.1.2.1
  --- MethodType.java   14 Aug 2002 19:21:40 -0000      1.3.8.1
  +++ MethodType.java   10 Jan 2003 16:50:49 -0000      1.3.8.1.2.1
  @@ -63,11 +63,11 @@
   
   package org.apache.xalan.xsltc.compiler.util;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   public final class MethodType extends Type {
       private final Type _resultType;  
  -    private final Vector _argsType;
  +    private final ArrayList _argsType;
        
       public MethodType(Type resultType) {
        _argsType = null;
  @@ -76,8 +76,8 @@
   
       public MethodType(Type resultType, Type arg1) {
        if (arg1 != Type.Void) {
  -         _argsType = new Vector();
  -         _argsType.addElement(arg1);
  +         _argsType = new ArrayList();
  +         _argsType.add(arg1);
        }
        else {
            _argsType = null;
  @@ -86,21 +86,21 @@
       }
   
       public MethodType(Type resultType, Type arg1, Type arg2) {
  -     _argsType = new Vector(2);
  -     _argsType.addElement(arg1);
  -     _argsType.addElement(arg2);
  +     _argsType = new ArrayList(2);
  +     _argsType.add(arg1);
  +     _argsType.add(arg2);
        _resultType = resultType;
       }
   
       public MethodType(Type resultType, Type arg1, Type arg2, Type arg3) {
  -     _argsType = new Vector(3);
  -     _argsType.addElement(arg1);
  -     _argsType.addElement(arg2);
  -     _argsType.addElement(arg3);
  +     _argsType = new ArrayList(3);
  +     _argsType.add(arg1);
  +     _argsType.add(arg2);
  +     _argsType.add(arg3);
        _resultType = resultType;
       }
   
  -    public MethodType(Type resultType, Vector argsType) {
  +    public MethodType(Type resultType, ArrayList argsType) {
        _resultType = resultType;
        _argsType = argsType.size() > 0 ? argsType : null;
       }
  @@ -110,7 +110,7 @@
        if (_argsType != null) {
            final int count = _argsType.size();
            for (int i=0; i<count; i++) {
  -             result.append(_argsType.elementAt(i));
  +             result.append(_argsType.get(i));
                if (i != (count-1)) result.append(',');
            }
        }
  @@ -135,7 +135,7 @@
        if (_argsType != null) {
            final int n = _argsType.size();
            for (int i = 0; i < n; i++) {
  -             buffer.append(((Type)_argsType.elementAt(i)).toSignature());
  +             buffer.append(((Type)_argsType.get(i)).toSignature());
            }
        }
        return buffer
  @@ -157,8 +157,8 @@
                final int len = argsCount();
                result = len == temp.argsCount();
                for (int i = 0; i < len && result; i++) {
  -                 final Type arg1 = (Type)_argsType.elementAt(i);
  -                 final Type arg2 = (Type)temp._argsType.elementAt(i);
  +                 final Type arg1 = (Type)_argsType.get(i);
  +                 final Type arg2 = (Type)temp._argsType.get(i);
                    result = arg1.identicalTo(arg2);
                }
            }
  @@ -175,8 +175,8 @@
                if (len == mtype._argsType.size()) {
                    result = 0;
                    for (int i = 0; i < len; i++) {
  -                     Type arg1 = (Type) _argsType.elementAt(i);
  -                     Type arg2 = (Type) mtype._argsType.elementAt(i);
  +                     Type arg1 = (Type) _argsType.get(i);
  +                     Type arg2 = (Type) mtype._argsType.get(i);
                        final int temp = arg1.distanceTo(arg2);
                        if (temp == Integer.MAX_VALUE) {
                            result = temp;  // return MAX_VALUE
  @@ -199,7 +199,7 @@
        return _resultType;
       }
                
  -    public Vector argsType() {
  +    public ArrayList argsType() {
        return _argsType;
       }
   
  
  
  
  1.3.2.1.2.2 +6 -6      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/MultiHashtable.java
  
  Index: MultiHashtable.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/MultiHashtable.java,v
  retrieving revision 1.3.2.1.2.1
  retrieving revision 1.3.2.1.2.2
  diff -u -r1.3.2.1.2.1 -r1.3.2.1.2.2
  --- MultiHashtable.java       2 Dec 2002 15:51:22 -0000       1.3.2.1.2.1
  +++ MultiHashtable.java       10 Jan 2003 16:50:49 -0000      1.3.2.1.2.2
  @@ -63,25 +63,25 @@
   
   package org.apache.xalan.xsltc.compiler.util;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Hashtable;
   
   public final class MultiHashtable extends Hashtable {
       public Object put(Object key, Object value) {
  -     Vector vector = (Vector)get(key);
  +     ArrayList vector = (ArrayList)get(key);
        if (vector == null)
  -         super.put(key, vector = new Vector());
  +         super.put(key, vector = new ArrayList());
        vector.add(value);
        return vector;
       }
        
       public Object maps(Object from, Object to) {
        if (from == null) return null;
  -     final Vector vector = (Vector) get(from);
  +     final ArrayList vector = (ArrayList) get(from);
        if (vector != null) {
            final int n = vector.size();
            for (int i = 0; i < n; i++) {
  -                final Object item = vector.elementAt(i);
  +                final Object item = vector.get(i);
                if (item.equals(to)) {
                    return item;
                }
  
  
  
  1.2.8.1.2.1 +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/NamedMethodGenerator.java
  
  Index: NamedMethodGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/NamedMethodGenerator.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- NamedMethodGenerator.java 14 Aug 2002 19:21:40 -0000      1.2.8.1
  +++ NamedMethodGenerator.java 10 Jan 2003 16:50:49 -0000      1.2.8.1.2.1
  @@ -63,7 +63,7 @@
   
   package org.apache.xalan.xsltc.compiler.util;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.bcel.generic.Type;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.Parser;
  
  
  
  1.2.8.1.2.1 +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/RtMethodGenerator.java
  
  Index: RtMethodGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/RtMethodGenerator.java,v
  retrieving revision 1.2.8.1
  retrieving revision 1.2.8.1.2.1
  diff -u -r1.2.8.1 -r1.2.8.1.2.1
  --- RtMethodGenerator.java    14 Aug 2002 19:21:40 -0000      1.2.8.1
  +++ RtMethodGenerator.java    10 Jan 2003 16:50:49 -0000      1.2.8.1.2.1
  @@ -63,7 +63,7 @@
   
   package org.apache.xalan.xsltc.compiler.util;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   import org.apache.bcel.generic.Type;
   import org.apache.bcel.generic.*;
   import org.apache.xalan.xsltc.compiler.Parser;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.45.2.1.2.2 +130 -130  
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.45.2.1.2.1
  retrieving revision 1.45.2.1.2.2
  diff -u -r1.45.2.1.2.1 -r1.45.2.1.2.2
  --- TransformerFactoryImpl.java       2 Dec 2002 15:51:28 -0000       
1.45.2.1.2.1
  +++ TransformerFactoryImpl.java       10 Jan 2003 16:50:50 -0000      
1.45.2.1.2.2
  @@ -56,7 +56,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - * @author G. Todd Miller 
  + * @author G. Todd Miller
    * @author Morten Jorgensen
    * @author Santiago Pericas-Geertsen
    *
  @@ -74,7 +74,7 @@
   import java.io.FilenameFilter;
   import java.net.URL;
   import java.net.MalformedURLException;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Hashtable;
   import java.util.Properties;
   import java.util.Enumeration;
  @@ -102,20 +102,20 @@
    * Implementation of a JAXP1.1 TransformerFactory for Translets.
    */
   public class TransformerFactoryImpl
  -    extends SAXTransformerFactory implements SourceLoader, ErrorListener 
  +    extends SAXTransformerFactory implements SourceLoader, ErrorListener
   {
       /**
        * This error listener is used only for this factory and is not passed to
        * the Templates or Transformer objects that we create.
        */
  -    private ErrorListener _errorListener = this; 
  +    private ErrorListener _errorListener = this;
   
       /**
        * This URIResolver is passed to all created Templates and Transformers
        */
       private URIResolver _uriResolver = null;
   
  -    /** 
  +    /**
        * As Gregor Samsa awoke one morning from uneasy dreams he found himself
        * transformed in his bed into a gigantic insect. He was lying on his 
hard,
        * as it were armour plated, back, and if he lifted his head a little he
  @@ -126,22 +126,22 @@
        * "What has happened to me?", he thought. It was no dream....
        */
       protected static String DEFAULT_TRANSLET_NAME = "GregorSamsa";
  -    
  +
       /**
        * The class name of the translet
        */
       private String _transletName = DEFAULT_TRANSLET_NAME;
  -    
  +
       /**
        * The destination directory for the translet
        */
       private String _destinationDirectory = null;
  -    
  +
       /**
        * The package name prefix for all generated translet classes
        */
       private String _packageName = null;
  -    
  +
       /**
        * The jar file name which the translet classes are packaged into
        */
  @@ -166,7 +166,7 @@
        public String _media = null;
        public String _title = null;
        public String _charset = null;
  -     
  +
        public PIParamWrapper(String media, String title, String charset) {
            _media = media;
            _title = title;
  @@ -183,15 +183,15 @@
        * Set to <code>true</code> when templates are inlined.
        */
       private boolean _enableInlining = false;
  -    
  +
       /**
  -     * Set to <code>true</code> when we want to generate 
  +     * Set to <code>true</code> when we want to generate
        * translet classes from the stylesheet.
        */
       private boolean _generateTranslet = false;
  -    
  +
       /**
  -     * If this is set to <code>true</code>, we attempt to use translet 
classes for 
  +     * If this is set to <code>true</code>, we attempt to use translet 
classes for
        * transformation if possible without compiling the stylesheet. The 
translet class
        * is only used if its timestamp is newer than the timestamp of the 
stylesheet.
        */
  @@ -223,8 +223,8 @@
        * @param listener The error listener to use with the TransformerFactory
        * @throws IllegalArgumentException
        */
  -    public void setErrorListener(ErrorListener listener) 
  -     throws IllegalArgumentException 
  +    public void setErrorListener(ErrorListener listener)
  +     throws IllegalArgumentException
       {
        if (listener == null) {
            ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR,
  @@ -240,7 +240,7 @@
        *
        * @return The error listener used with the TransformerFactory
        */
  -    public ErrorListener getErrorListener() { 
  +    public ErrorListener getErrorListener() {
        return _errorListener;
       }
   
  @@ -252,9 +252,9 @@
        * @return An object representing the attribute value
        * @throws IllegalArgumentException
        */
  -    public Object getAttribute(String name) 
  -     throws IllegalArgumentException 
  -    { 
  +    public Object getAttribute(String name)
  +     throws IllegalArgumentException
  +    {
        // Return value for attribute 'translet-name'
        if (name.equals("translet-name")) {
            return _transletName;
  @@ -279,13 +279,13 @@
        * @param value An object representing the attribute value
        * @throws IllegalArgumentException
        */
  -    public void setAttribute(String name, Object value) 
  -     throws IllegalArgumentException 
  -    { 
  +    public void setAttribute(String name, Object value)
  +     throws IllegalArgumentException
  +    {
        // Set the default translet name (ie. class name), which will be used
        // for translets that cannot be given a name from their system-id.
        if (name.equals("translet-name") && value instanceof String) {
  -         _transletName = (String) value;           
  +         _transletName = (String) value;
            return;
        }
        else if (name.equals("destination-directory") && value instanceof 
String) {
  @@ -357,7 +357,7 @@
        }
   
        // Throw an exception for all other attributes
  -     final ErrorMsg err 
  +     final ErrorMsg err
            = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name);
        throw new IllegalArgumentException(err.toString());
       }
  @@ -371,7 +371,7 @@
        * @param name The feature name
        * @return 'true' if feature is supported, 'false' if not
        */
  -    public boolean getFeature(String name) { 
  +    public boolean getFeature(String name) {
        // All supported features should be listed here
        String[] features = {
            DOMSource.FEATURE,
  @@ -399,10 +399,10 @@
        *
        * @return The URLResolver used for this TransformerFactory and all
        * Templates and Transformer objects created using this factory
  -     */    
  +     */
       public URIResolver getURIResolver() {
        return _uriResolver;
  -    } 
  +    }
   
       /**
        * javax.xml.transform.sax.TransformerFactory implementation.
  @@ -413,7 +413,7 @@
        *
        * @param resolver The URLResolver used for this TransformerFactory and 
all
        * Templates and Transformer objects created using this factory
  -     */    
  +     */
       public void setURIResolver(URIResolver resolver) {
        _uriResolver = resolver;
       }
  @@ -435,7 +435,7 @@
        */
       public Source getAssociatedStylesheet(Source source, String media,
                                          String title, String charset)
  -     throws TransformerConfigurationException 
  +     throws TransformerConfigurationException
       {
        // First create a hashtable that maps Source refs. to parameters
        if (_piParams == null) {
  @@ -453,11 +453,11 @@
        *
        * @return A Transformer object that simply copies the source to the 
result.
        * @throws TransformerConfigurationException
  -     */    
  +     */
       public Transformer newTransformer()
  -     throws TransformerConfigurationException 
  -    { 
  -     TransformerImpl result = new TransformerImpl(new Properties(), 
  +     throws TransformerConfigurationException
  +    {
  +     TransformerImpl result = new TransformerImpl(new Properties(),
            _indentNumber, this);
        if (_uriResolver != null) {
            result.setURIResolver(_uriResolver);
  @@ -476,7 +476,7 @@
        * @throws TransformerConfigurationException
        */
       public Transformer newTransformer(Source source) throws
  -     TransformerConfigurationException 
  +     TransformerConfigurationException
       {
        final Templates templates = newTemplates(source);
        final Transformer transformer = templates.newTransformer();
  @@ -489,8 +489,8 @@
       /**
        * Pass warning messages from the compiler to the error listener
        */
  -    private void passWarningsToListener(Vector messages) 
  -     throws TransformerException 
  +    private void passWarningsToListener(ArrayList messages)
  +     throws TransformerException
       {
        if (_errorListener == null || messages == null) {
            return;
  @@ -498,7 +498,7 @@
        // Pass messages to listener, one by one
        final int count = messages.size();
        for (int pos = 0; pos < count; pos++) {
  -         String message = messages.elementAt(pos).toString();
  +         String message = messages.get(pos).toString();
            _errorListener.error(
                new TransformerConfigurationException(message));
        }
  @@ -507,7 +507,7 @@
       /**
        * Pass error messages from the compiler to the error listener
        */
  -    private void passErrorsToListener(Vector messages) {
  +    private void passErrorsToListener(ArrayList messages) {
        try {
            if (_errorListener == null || messages == null) {
                return;
  @@ -515,7 +515,7 @@
            // Pass messages to listener, one by one
            final int count = messages.size();
            for (int pos = 0; pos < count; pos++) {
  -             String message = messages.elementAt(pos).toString();
  +             String message = messages.get(pos).toString();
                _errorListener.error(new TransformerException(message));
            }
        }
  @@ -534,19 +534,19 @@
        * @throws TransformerConfigurationException
        */
       public Templates newTemplates(Source source)
  -     throws TransformerConfigurationException 
  +     throws TransformerConfigurationException
       {
        // If _autoTranslet is true, we will try to load the bytecodes
        // from the translet classes without compiling the stylesheet.
        if (_autoTranslet)  {
            byte[][] bytecodes = null;
            String transletClassName = getTransletClassName(source);
  -         
  +
            if (_jarFileName != null)
                bytecodes = getBytecodesFromJar(source, transletClassName);
            else
  -             bytecodes = getBytecodesFromClasses(source, transletClassName); 
    
  -       
  +             bytecodes = getBytecodesFromClasses(source, transletClassName);
  +
            if (bytecodes != null) {
                if (_debug) {
                    if (_jarFileName != null)
  @@ -560,11 +560,11 @@
                // Reset the per-session attributes to their default values
                // after each newTemplates() call.
                resetTransientAttributes();
  -         
  -             return new TemplatesImpl(bytecodes, transletClassName, null, 
_indentNumber, this);          
  +
  +             return new TemplatesImpl(bytecodes, transletClassName, null, 
_indentNumber, this);
            }
        }
  -     
  +
        // Create and initialize a stylesheet compiler
        final XSLTC xsltc = new XSLTC();
        if (_debug) xsltc.setDebug(true);
  @@ -593,7 +593,7 @@
            // Set the translet name
            if (!_transletName.equals(DEFAULT_TRANSLET_NAME))
                xsltc.setClassName(_transletName);
  -       
  +
            if (_destinationDirectory != null)
                xsltc.setDestDirectory(_destinationDirectory);
            else {
  @@ -601,15 +601,15 @@
                if (xslName != null) {
                    File xslFile = new File(xslName);
                    String xslDir = xslFile.getParent();
  -         
  +
                    if (xslDir != null)
                        xsltc.setDestDirectory(xslDir);
                }
            }
  -       
  +
            if (_packageName != null)
                xsltc.setPackageName(_packageName);
  -     
  +
            if (_jarFileName != null) {
                xsltc.setJarFileName(_jarFileName);
                outputType = XSLTC.BYTEARRAY_AND_JAR_OUTPUT;
  @@ -662,7 +662,7 @@
            throw new TransformerConfigurationException(err.toString());
        }
   
  -     return new TemplatesImpl(bytecodes, transletName, 
  +     return new TemplatesImpl(bytecodes, transletName,
            xsltc.getOutputProperties(), _indentNumber, this);
       }
   
  @@ -674,10 +674,10 @@
        * @return A TemplatesHandler object that can handle SAX events
        * @throws TransformerConfigurationException
        */
  -    public TemplatesHandler newTemplatesHandler() 
  -     throws TransformerConfigurationException 
  -    { 
  -     final TemplatesHandlerImpl handler = 
  +    public TemplatesHandler newTemplatesHandler()
  +     throws TransformerConfigurationException
  +    {
  +     final TemplatesHandlerImpl handler =
            new TemplatesHandlerImpl(_indentNumber, this);
        handler.init();
        if (_uriResolver != null) {
  @@ -694,8 +694,8 @@
        * @return A TransformerHandler object that can handle SAX events
        * @throws TransformerConfigurationException
        */
  -    public TransformerHandler newTransformerHandler() 
  -     throws TransformerConfigurationException 
  +    public TransformerHandler newTransformerHandler()
  +     throws TransformerConfigurationException
       {
        final Transformer transformer = newTransformer();
        if (_uriResolver != null) {
  @@ -714,9 +714,9 @@
        * @return A TransformerHandler object that can handle SAX events
        * @throws TransformerConfigurationException
        */
  -    public TransformerHandler newTransformerHandler(Source src) 
  -     throws TransformerConfigurationException 
  -    { 
  +    public TransformerHandler newTransformerHandler(Source src)
  +     throws TransformerConfigurationException
  +    {
        final Transformer transformer = newTransformer(src);
        if (_uriResolver != null) {
            transformer.setURIResolver(_uriResolver);
  @@ -733,9 +733,9 @@
        * @param templates Represents a pre-processed stylesheet
        * @return A TransformerHandler object that can handle SAX events
        * @throws TransformerConfigurationException
  -     */    
  -    public TransformerHandler newTransformerHandler(Templates templates) 
  -     throws TransformerConfigurationException  
  +     */
  +    public TransformerHandler newTransformerHandler(Templates templates)
  +     throws TransformerConfigurationException
       {
        final Transformer transformer = templates.newTransformer();
        final TransformerImpl internal = (TransformerImpl)transformer;
  @@ -751,11 +751,11 @@
        * @return An XMLFilter object, or null if this feature is not supported.
        * @throws TransformerConfigurationException
        */
  -    public XMLFilter newXMLFilter(Source src) 
  -     throws TransformerConfigurationException 
  +    public XMLFilter newXMLFilter(Source src)
  +     throws TransformerConfigurationException
       {
        Templates templates = newTemplates(src);
  -     if (templates == null) return null; 
  +     if (templates == null) return null;
        return newXMLFilter(templates);
       }
   
  @@ -768,8 +768,8 @@
        * @return An XMLFilter object, or null if this feature is not supported.
        * @throws TransformerConfigurationException
        */
  -    public XMLFilter newXMLFilter(Templates templates) 
  -     throws TransformerConfigurationException 
  +    public XMLFilter newXMLFilter(Templates templates)
  +     throws TransformerConfigurationException
       {
        try {
                    return new 
org.apache.xalan.xsltc.trax.TrAXFilter(templates);
  @@ -789,18 +789,18 @@
       }
   
       /**
  -     * Receive notification of a recoverable error. 
  +     * Receive notification of a recoverable error.
        * 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.
        *
  -     * @param exception The warning information encapsulated in a 
transformer 
  +     * @param exception The warning information encapsulated in a transformer
        * exception.
        * @throws TransformerException if the application chooses to discontinue
        * the transformation (always does in our case).
        */
       public void error(TransformerException e)
  -     throws TransformerException 
  +     throws TransformerException
       {
        Throwable wrapped = e.getException();
           if (wrapped != null) {
  @@ -811,11 +811,11 @@
               System.err.println(new ErrorMsg(ErrorMsg.ERROR_MSG,
                                               e.getMessageAndLocation()));
        }
  -     throw e;        
  +     throw e;
       }
   
       /**
  -     * Receive notification of a non-recoverable error. 
  +     * Receive notification of a non-recoverable error.
        * The application must assume that the transformation cannot continue
        * after the Transformer has invoked this method, and should continue
        * (if at all) only to collect addition error messages. In fact,
  @@ -828,7 +828,7 @@
        * the transformation (always does in our case).
        */
       public void fatalError(TransformerException e)
  -     throws TransformerException 
  +     throws TransformerException
       {
        Throwable wrapped = e.getException();
           if (wrapped != null) {
  @@ -856,7 +856,7 @@
        * the transformation (never does in our case).
        */
       public void warning(TransformerException e)
  -     throws TransformerException 
  +     throws TransformerException
       {
        Throwable wrapped = e.getException();
        if (wrapped != null) {
  @@ -894,8 +894,8 @@
       }
   
       /**
  -     * This method is synchronized to allow instances of this class to 
  -     * be shared among threads. A tranformer object will call this 
  +     * This method is synchronized to allow instances of this class to
  +     * be shared among threads. A tranformer object will call this
        * method to get an XMLReader. A different instance of an XMLReader
        * is returned/cached for each thread.
        */
  @@ -912,7 +912,7 @@
        }
        return result;
       }
  -    
  +
       /**
        * Reset the per-session attributes to their default values
        */
  @@ -920,9 +920,9 @@
        _transletName = DEFAULT_TRANSLET_NAME;
        _destinationDirectory = null;
        _packageName = null;
  -     _jarFileName = null;    
  +     _jarFileName = null;
       }
  -        
  +
       /**
        * Load the translet classes from local .class files and return
        * the bytecode array.
  @@ -935,12 +935,12 @@
       {
        if (fullClassName == null)
            return null;
  -       
  +
        String xslFileName = getStylesheetFileName(source);
        File xslFile = null;
        if (xslFileName != null)
            xslFile = new File(xslFileName);
  -     
  +
        // Find the base name of the translet
        final String transletName;
        int lastDotIndex = fullClassName.lastIndexOf('.');
  @@ -948,7 +948,7 @@
            transletName = fullClassName.substring(lastDotIndex+1);
        else
            transletName = fullClassName;
  -             
  +
        // Construct the path name for the translet class file
        String transletPath = fullClassName.replace('.', '/');
        if (_destinationDirectory != null) {
  @@ -960,14 +960,14 @@
            else
                transletPath = transletPath + ".class";
        }
  -                     
  +
        // Return null if the translet class file does not exist.
        File transletFile = new File(transletPath);
        if (!transletFile.exists())
            return null;
  -               
  +
        // Compare the timestamps of the translet and the xsl file.
  -     // If the translet is older than the xsl file, return null 
  +     // If the translet is older than the xsl file, return null
        // so that the xsl file is used for the transformation and
        // the translet is regenerated.
        if (xslFile != null && xslFile.exists()) {
  @@ -976,9 +976,9 @@
            if (transletTimestamp < xslTimestamp)
                return null;
        }
  -     
  +
        // Load the translet into a bytecode array.
  -     Vector bytecodes = new Vector();
  +     ArrayList bytecodes = new ArrayList();
        int fileLength = (int)transletFile.length();
        if (fileLength > 0) {
            FileInputStream input = null;
  @@ -988,7 +988,7 @@
            catch (FileNotFoundException e) {
                return null;
            }
  -       
  +
            byte[] bytes = new byte[fileLength];
            try {
                readFromInputStream(bytes, input, fileLength);
  @@ -997,28 +997,28 @@
            catch (IOException e) {
                return null;
            }
  -       
  -         bytecodes.addElement(bytes);
  +
  +         bytecodes.add(bytes);
        }
        else
            return null;
  -     
  +
        // Find the parent directory of the translet.
        String transletParentDir = transletFile.getParent();
        if (transletParentDir == null)
            transletParentDir = System.getProperty("user.dir");
  -       
  +
        File transletParentFile = new File(transletParentDir);
  -     
  +
        // Find all the auxiliary files which have a name pattern of 
"transletClass$nnn.class".
        final String transletAuxPrefix = transletName + "$";
        File[] auxfiles = transletParentFile.listFiles(new FilenameFilter() {
                public boolean accept(File dir, String name)
                {
  -                 return (name.endsWith(".class") && 
name.startsWith(transletAuxPrefix));     
  +                 return (name.endsWith(".class") && 
name.startsWith(transletAuxPrefix));
                }
              });
  -     
  +
        // Load the auxiliary class files and add them to the bytecode array.
        for (int i = 0; i < auxfiles.length; i++)
        {
  @@ -1032,9 +1032,9 @@
                catch (FileNotFoundException e) {
                    continue;
                }
  -       
  +
                byte[] bytes = new byte[auxlength];
  -         
  +
                try {
                    readFromInputStream(bytes, auxinput, auxlength);
                    auxinput.close();
  @@ -1042,25 +1042,25 @@
                catch (IOException e) {
                    continue;
                }
  -         
  -             bytecodes.addElement(bytes);        
  +
  +             bytecodes.add(bytes);
            }
        }
  -     
  -     // Convert the Vector of byte[] to byte[][].
  +
  +     // Convert the ArrayList of byte[] to byte[][].
        final int count = bytecodes.size();
        if ( count > 0) {
            final byte[][] result = new byte[count][1];
            for (int i = 0; i < count; i++) {
  -             result[i] = (byte[])bytecodes.elementAt(i);
  +             result[i] = (byte[])bytecodes.get(i);
            }
  -       
  +
            return result;
        }
        else
            return null;
       }
  -    
  +
       /**
        * Load the translet classes from the jar file and return the bytecode.
        *
  @@ -1074,7 +1074,7 @@
        File xslFile = null;
        if (xslFileName != null)
            xslFile = new File(xslFileName);
  -      
  +
                // Construct the path for the jar file
                String jarPath = null;
                if (_destinationDirectory != null)
  @@ -1085,7 +1085,7 @@
            else
                jarPath = _jarFileName;
        }
  -            
  +
                // Return null if the jar file does not exist.
                File file = new File(jarPath);
                if (!file.exists())
  @@ -1099,7 +1099,7 @@
            if (transletTimestamp < xslTimestamp)
                return null;
        }
  -      
  +
                // Create a ZipFile object for the jar file
                ZipFile jarFile = null;
                try {
  @@ -1108,23 +1108,23 @@
                catch (IOException e) {
               return null;
                }
  -      
  +
                String transletPath = fullClassName.replace('.', '/');
                String transletAuxPrefix = transletPath + "$";
                String transletFullName = transletPath + ".class";
  -      
  -             Vector bytecodes = new Vector();      
  -      
  -             // Iterate through all entries in the jar file to find the 
  +
  +             ArrayList bytecodes = new ArrayList();
  +
  +             // Iterate through all entries in the jar file to find the
                // translet and auxiliary classes.
                Enumeration entries = jarFile.entries();
                while (entries.hasMoreElements())
                {
               ZipEntry entry = (ZipEntry)entries.nextElement();
               String entryName = entry.getName();
  -            if (entry.getSize() > 0 && 
  +            if (entry.getSize() > 0 &&
                  (entryName.equals(transletFullName) ||
  -                       (entryName.endsWith(".class") && 
  +                       (entryName.endsWith(".class") &&
                              entryName.startsWith(transletAuxPrefix))))
               {
                try {
  @@ -1133,28 +1133,28 @@
                            byte[] bytes = new byte[size];
                            readFromInputStream(bytes, input, size);
                            input.close();
  -                         bytecodes.addElement(bytes);
  +                         bytecodes.add(bytes);
                }
                catch (IOException e) {
                            return null;
  -             }          
  +             }
               }
                }
  -      
  -        // Convert the Vector of byte[] to byte[][].
  +
  +        // Convert the ArrayList of byte[] to byte[][].
        final int count = bytecodes.size();
        if (count > 0) {
            final byte[][] result = new byte[count][1];
            for (int i = 0; i < count; i++) {
  -             result[i] = (byte[])bytecodes.elementAt(i);
  +             result[i] = (byte[])bytecodes.get(i);
            }
  -       
  +
            return result;
        }
        else
            return null;
       }
  -    
  +
       /**
        * Read a given number of bytes from the InputStream into a byte array.
        *
  @@ -1171,7 +1171,7 @@
         while (length > 0 && (n = input.read(bytes, offset, length)) > 0) {
             offset = offset + n;
             length = length - n;
  -      }    
  +      }
       }
   
       /**
  @@ -1181,7 +1181,7 @@
        * @return The full name of the translet class
        */
       private String getTransletClassName(Source source)
  -    {      
  +    {
           String transletBaseName = null;
           if (!_transletName.equals(DEFAULT_TRANSLET_NAME))
               transletBaseName = _transletName;
  @@ -1197,16 +1197,16 @@
                }
               }
                }
  -      
  +
           if (transletBaseName == null)
               transletBaseName = DEFAULT_TRANSLET_NAME;
  -        
  +
           if (_packageName != null)
               return _packageName + "." + transletBaseName;
           else
               return transletBaseName;
       }
  -        
  +
       /**
        *  Return the local file name from the systemId of the Source object
        *
  @@ -1229,7 +1229,7 @@
                catch (MalformedURLException e) {
                    return null;
                }
  -          
  +
                if ("file".equals(url.getProtocol()))
                    return url.getFile();
                else
  
  
  

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

Reply via email to