zongaro     2002/09/27 14:54:40

  Modified:    java/src/org/apache/xalan/extensions Tag: XSLTC_DTM
                        ExpressionContext.java
               java/src/org/apache/xalan/xsltc/cmdline/getopt Tag:
                        XSLTC_DTM GetOpt.java
               java/src/org/apache/xalan/xsltc/compiler Tag: XSLTC_DTM
                        FunctionAvailableCall.java FunctionCall.java
                        Include.java TransletOutput.java
               java/src/org/apache/xalan/xsltc/compiler/util Tag: XSLTC_DTM
                        ErrorMessages.java ErrorMsg.java
                        TypeCheckError.java
               java/src/org/apache/xalan/xsltc/dom Tag: XSLTC_DTM
                        DOMImpl.java DTDMonitor.java DocumentCache.java
                        SAXImpl.java
               java/src/org/apache/xalan/xsltc/runtime Tag: XSLTC_DTM
                        BasisLibrary.java ErrorMessages.java
               java/src/org/apache/xalan/xsltc/trax Tag: XSLTC_DTM
                        TransformerFactoryImpl.java TransformerImpl.java
               java/src/org/apache/xpath Tag: XSLTC_DTM XPathContext.java
               java/src/org/apache/xpath/functions Tag: XSLTC_DTM
                        FunctionMultiArgs.java
  Log:
  Folding changes from MAIN branch back into XSLTC_DTM branch.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.10.2  +7 -0      
xml-xalan/java/src/org/apache/xalan/extensions/ExpressionContext.java
  
  Index: ExpressionContext.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/ExpressionContext.java,v
  retrieving revision 1.3.10.1
  retrieving revision 1.3.10.2
  diff -u -r1.3.10.1 -r1.3.10.2
  --- ExpressionContext.java    29 Jul 2002 00:01:17 -0000      1.3.10.1
  +++ ExpressionContext.java    27 Sep 2002 21:54:38 -0000      1.3.10.2
  @@ -59,6 +59,7 @@
   import org.w3c.dom.traversal.NodeIterator;
   import org.w3c.dom.Node;
   import org.apache.xpath.objects.XObject;
  +import javax.xml.transform.ErrorListener;
   
   /**
    * An object that implements this interface can supply
  @@ -79,6 +80,12 @@
      * defined in XSLT.
      */
     public NodeIterator getContextNodes();
  +  
  +  /**
  +   * Get the error listener.
  +   * @return The registered error listener.
  +   */
  +  public ErrorListener getErrorListener();
   
     /**
      * Get the value of a node as a number.
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.10.1  +10 -7     
xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/getopt/GetOpt.java
  
  Index: GetOpt.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/getopt/GetOpt.java,v
  retrieving revision 1.1
  retrieving revision 1.1.10.1
  diff -u -r1.1 -r1.1.10.1
  --- GetOpt.java       12 Jul 2001 12:54:36 -0000      1.1
  +++ GetOpt.java       27 Sep 2002 21:54:38 -0000      1.1.10.1
  @@ -68,6 +68,7 @@
   
   import org.apache.xalan.xsltc.cmdline.getopt.IllegalArgumentException;
   import org.apache.xalan.xsltc.cmdline.getopt.MissingOptArgException;
  +import org.apache.xalan.xsltc.compiler.util.ErrorMsg;
   
   
   /**
  @@ -189,13 +190,15 @@
            char c = theCurrentOption.getArgLetter();
            boolean shouldHaveArg = theOptionMatcher.hasArg(c);
            String arg = theCurrentOption.getArgument();
  -         if(!theOptionMatcher.match(c)){
  -             throw (new IllegalArgumentException("Option " +
  -                     c + " is not valid."));
  +         if(!theOptionMatcher.match(c)) {
  +                ErrorMsg msg = new 
ErrorMsg(ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR,
  +                                            new Character(c));
  +             throw (new IllegalArgumentException(msg.toString()));
            }
  -         else if(shouldHaveArg && (arg == null)){
  -             throw (new MissingOptArgException("Option " + 
  -                     c + " is missing its argument."));
  +         else if(shouldHaveArg && (arg == null)) {
  +                ErrorMsg msg = new 
ErrorMsg(ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR,
  +                                            new Character(c));
  +             throw (new MissingOptArgException(msg.toString()));
            }
            retval = c;
        }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.5.6.3   +44 -79    
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.5.6.2
  retrieving revision 1.5.6.3
  diff -u -r1.5.6.2 -r1.5.6.3
  --- FunctionAvailableCall.java        13 Aug 2002 21:21:13 -0000      1.5.6.2
  +++ FunctionAvailableCall.java        27 Sep 2002 21:54:38 -0000      1.5.6.3
  @@ -94,11 +94,8 @@
               _namespaceOfFunct = arg.getNamespace();
               _nameOfFunct = arg.getValue();
   
  -            if (_namespaceOfFunct != null &&
  -             (_namespaceOfFunct.startsWith(JAVA_EXT_XSLTC) ||
  -              _namespaceOfFunct.startsWith(JAVA_EXT_XALAN))) 
  -         {
  -                _isFunctionAvailable = hasMethods();
  +            if (!isInternalNamespace()) {
  +              _isFunctionAvailable = hasMethods();
               }
           }
       }
  @@ -129,86 +126,51 @@
       }
   
       /**
  -     * (For ext. java functions only)
  -     * Parses the argument to function-available to extract the package 
  -     * qualified class name, for example, given the argument 
  -     * 'java:java.lang.Math.sin', getClassName would return
  -     * 'java.lang.Math'. See also 'getMethodName'.
  -     */
  -    private String getClassName(String argValue){
  -     int colonSep = argValue.indexOf(":");
  -     if (colonSep != -1) {
  -         argValue = argValue.substring(colonSep+1);  
  -     }               
  -     int lastDot  = argValue.lastIndexOf(".");
  -     if (lastDot != -1) {
  -         argValue = argValue.substring(0, lastDot);
  -     }
  -     return argValue;
  -    }
  -
  -    /**
  -     * (For ext. java functions only) 
  -     * Parses the argument to function-available
  -     * to extract the method name, for example, given the argument
  -     * 'java.lang.Math.sin', getMethodName would return 'sin'. 
  -     */
  -    private String getMethodName(String argValue){
  -     int lastDot  = argValue.lastIndexOf(".");
  -     if (lastDot != -1) {
  -         argValue = argValue.substring(lastDot+1);
  -     }
  -     return argValue;
  -    }
  -
  -    /**
  -     * (For java external functions only) 
  -     * Creates a full package qualified 
  -     * function name taking into account the namespace and the
  -     * function name derived from the argument passed to function-available.
  -     * For example, given a name of 'java:java.lang.Math.sin' and a
  -     * namespace of 'http://xml.apache.org/xalan/xsltc/java' this routine
  -     * constructs a uri and then derives the class name 
  -     * 'java.lang.Math.sin' from the uri. The uri in this example would
  -     * be 'http://xml.apache.org/xalan/xsltc/java.java.lang.Math.sin'
  -     */
  -    private String getExternalFunctionName() {
  -     int colonIndex = _nameOfFunct.indexOf(":");
  -     String uri = _namespaceOfFunct + 
  -                    "." + _nameOfFunct.substring(colonIndex+1);
  -     try{
  -         return getClassNameFromUri(uri); 
  -        } catch (TypeCheckError e) {
  -         return null; 
  -        }
  -    }
  -
  -    /**
        * for external java functions only: reports on whether or not
        * the specified method is found in the specifed class. 
        */
       private boolean hasMethods() {
        LiteralExpr arg = (LiteralExpr)_arg;
  -     final String externalFunctName = getExternalFunctionName();
  -
  -     if (externalFunctName == null) {
  +     
  +     // Get the class name from the namespace uri
  +     String className = getClassNameFromUri(_namespaceOfFunct);
  +     
  +     // Get the method name from the argument to function-available
  +     String methodName = null;
  +     int colonIndex = _nameOfFunct.indexOf(":");
  +     if (colonIndex > 0) {
  +       String functionName = _nameOfFunct.substring(colonIndex+1);
  +       int lastDotIndex = functionName.lastIndexOf('.');
  +       if (lastDotIndex > 0) {
  +         methodName = functionName.substring(lastDotIndex+1);
  +         if (className != null && !className.equals(""))
  +           className = className + "." + functionName.substring(0, 
lastDotIndex);
  +         else
  +           className = functionName.substring(0, lastDotIndex);
  +       }
  +       else
  +         methodName = functionName;
  +     }
  +     else
  +       methodName = _nameOfFunct;
  +       
  +     if (className == null || methodName == null) {
            return false;
        }
  -
  -     final String className = getClassName(externalFunctName);
  +     
  +     // Replace the '-' characters in the method name
  +     if (methodName.indexOf('-') > 0)
  +       methodName = replaceDash(methodName);
   
        try {
            TransletLoader loader = new TransletLoader();
            final Class clazz = loader.loadClass(className);
   
            if (clazz == null) {
  -             final ErrorMsg msg =
  -                 new ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR, className);
  -             getParser().reportError(Constants.ERROR, msg);
  +             return false;
            }
            else {
  -             final String methodName = getMethodName(externalFunctName);
  -             final Method[] methods = clazz.getDeclaredMethods();
  +             final Method[] methods = clazz.getMethods();
   
                for (int i = 0; i < methods.length; i++) {
                    final int mods = methods[i].getModifiers();
  @@ -223,9 +185,7 @@
            }
        }
        catch (ClassNotFoundException e) {
  -         final ErrorMsg msg =
  -             new ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR, className);
  -                 getParser().reportError(Constants.ERROR, msg);
  +       return false;
        }
           return false;   
       }
  @@ -239,16 +199,21 @@
            return false;
        }
   
  -        if (_namespaceOfFunct == null ||
  -            _namespaceOfFunct.equals(EMPTYSTRING) ||
  -         _namespaceOfFunct.equals(EXT_XALAN) ||
  -         _namespaceOfFunct.equals(TRANSLET_URI))
  -        {
  +        if (isInternalNamespace()) {
               final Parser parser = getParser();
               _isFunctionAvailable = 
                parser.functionSupported(Util.getLocalName(_nameOfFunct));
           }
        return _isFunctionAvailable;
  +    }
  +    
  +    /**
  +     * Return true if the namespace uri is null or it is the XSLTC translet 
uri.
  +     */
  +    private boolean isInternalNamespace() {
  +     return (_namespaceOfFunct == null ||
  +            _namespaceOfFunct.equals(EMPTYSTRING) ||
  +         _namespaceOfFunct.equals(TRANSLET_URI));
       }
   
       /**
  
  
  
  1.14.2.4  +3 -3      
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.14.2.3
  retrieving revision 1.14.2.4
  diff -u -r1.14.2.3 -r1.14.2.4
  --- FunctionCall.java 18 Sep 2002 13:31:52 -0000      1.14.2.3
  +++ FunctionCall.java 27 Sep 2002 21:54:38 -0000      1.14.2.4
  @@ -267,6 +267,7 @@
            
            // Initialize the extension namespace table
            _extensionNamespaceTable.put(EXT_XALAN, 
"org.apache.xalan.lib.Extensions");
  +         _extensionNamespaceTable.put(EXSLT_COMMON, 
"org.apache.xalan.lib.ExsltCommon");
            _extensionNamespaceTable.put(EXSLT_MATH, 
"org.apache.xalan.lib.ExsltMath");
            _extensionNamespaceTable.put(EXSLT_SETS, 
"org.apache.xalan.lib.ExsltSets");
            _extensionNamespaceTable.put(EXSLT_DATETIME, 
"org.apache.xalan.lib.ExsltDatetime");
  @@ -309,7 +310,6 @@
       }
   
       public String getClassNameFromUri(String uri) 
  -     throws TypeCheckError
       {
       
           String className = (String)_extensionNamespaceTable.get(uri);
  @@ -1060,7 +1060,7 @@
        * e.g., convert abc-xyz to abcXyz.
        * Note: dashes only appear in middle of an EXSLT function or element 
name.
        */
  -    private static String replaceDash(String name)
  +    protected static String replaceDash(String name)
       {
         char dash = '-';
         StringBuffer buff = new StringBuffer("");
  
  
  
  1.14.2.2  +6 -3      
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.14.2.1
  retrieving revision 1.14.2.2
  diff -u -r1.14.2.1 -r1.14.2.2
  --- Include.java      29 Jul 2002 00:01:22 -0000      1.14.2.1
  +++ Include.java      27 Sep 2002 21:54:38 -0000      1.14.2.2
  @@ -125,8 +125,11 @@
                        docToLoad = "file:" + file.getCanonicalPath();
                    }
                    else {
  -                     throw new FileNotFoundException(
  -                       "Could not load file " + docToLoad);
  +                     final ErrorMsg msg =
  +                                       new ErrorMsg(ErrorMsg.FILE_ACCESS_ERR,
  +                                                    docToLoad);
  +                        parser.reportError(Constants.FATAL, msg);
  +                        return;
                    }
                    input = new InputSource(docToLoad);
                }
  
  
  
  1.7.6.2   +1 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/TransletOutput.java
  
  Index: TransletOutput.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/TransletOutput.java,v
  retrieving revision 1.7.6.1
  retrieving revision 1.7.6.2
  diff -u -r1.7.6.1 -r1.7.6.2
  --- TransletOutput.java       18 Sep 2002 13:31:52 -0000      1.7.6.1
  +++ TransletOutput.java       27 Sep 2002 21:54:38 -0000      1.7.6.2
  @@ -71,9 +71,6 @@
       private Expression _filename;
       private boolean _append;
   
  -    private final static String MISSING_FILE_ATTR =
  -     "The <xsltc:output> element requires a 'file' attribute.";
  -
       /**
        * Displays the contents of this <xsltc:output> element.
        */
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.5.10.3  +705 -118  
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.5.10.2
  retrieving revision 1.5.10.3
  diff -u -r1.5.10.2 -r1.5.10.3
  --- ErrorMessages.java        18 Sep 2002 15:56:48 -0000      1.5.10.2
  +++ ErrorMessages.java        27 Sep 2002 21:54:38 -0000      1.5.10.3
  @@ -68,208 +68,795 @@
   
   public class ErrorMessages extends ResourceBundle {
   
  +/*
  + * XSLTC compile-time error messages.
  + *
  + * General notes to translators and definitions:
  + *
  + *   1) XSLTC is the name of the product.  It is an acronym for "XSLT 
Compiler".
  + *      XSLT is an acronym for "XML Stylesheet Language: Transformations".
  + *
  + *   2) A stylesheet is a description of how to transform an input XML 
document
  + *      into a resultant XML document (or HTML document or text).  The
  + *      stylesheet itself is described in the form of an XML document.
  + *
  + *   3) A template is a component of a stylesheet that is used to match a
  + *      particular portion of an input document and specifies the form of the
  + *      corresponding portion of the output document.
  + *
  + *   4) An axis is a particular "dimension" in a tree representation of an 
XML
  + *      document; the nodes in the tree are divided along different axes.
  + *      Traversing the "child" axis, for instance, means that the program
  + *      would visit each child of a particular node; traversing the 
"descendant"
  + *      axis means that the program would visit the child nodes of a 
particular
  + *      node, their children, and so on until the leaf nodes of the tree are
  + *      reached.
  + *
  + *   5) An iterator is an object that traverses nodes in a tree along a
  + *      particular axis, one at a time.
  + *
  + *   6) An element is a mark-up tag in an XML document; an attribute is a
  + *      modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
  + *      "elem" is an element name, "attr" and "attr2" are attribute names 
with
  + *      the values "val" and "val2", respectively.
  + *
  + *   7) A namespace declaration is a special attribute that is used to 
associate
  + *      a prefix with a URI (the namespace).  The meanings of element names 
and
  + *      attribute names that use that prefix are defined with respect to that
  + *      namespace.
  + *
  + *   8) DOM is an acronym for Document Object Model.  It is a tree
  + *      representation of an XML document.
  + *
  + *      SAX is an acronym for the Simple API for XML processing.  It is an 
API
  + *      used inform an XML processor (in this case XSLTC) of the structure 
and
  + *      content of an XML document.
  + *
  + *      Input to the stylesheet processor can come from an XML parser in the
  + *      form of a DOM tree or through the SAX API.
  + *
  + *   9) DTD is a document type declaration.  It is a way of specifying the
  + *      grammar for an XML file, the names and types of elements, attributes,
  + *      etc.
  + *
  + *  10) XPath is a specification that describes a notation for identifying
  + *      nodes in a tree-structured representation of an XML document.  An
  + *      instance of that notation is referred to as an XPath expression.
  + *
  + *  11) Translet is an invented term that refers to the class file that 
contains
  + *      the compiled form of a stylesheet.
  + */
  +
       // These message should be read from a locale-specific resource bundle
       private static final String errorMessages[] = { 
  -     // MULTIPLE_STYLESHEET_ERR
  +     //MULTIPLE_STYLESHEET_ERR
        "More than one stylesheet defined in the same file.",
  -     // TEMPLATE_REDEF_ERR   
  +
  +     /*
  +      * Note to translators:  The substitution text is the name of a
  +      * template.  The same name was used on two different templates in the
  +      * same stylesheet.
  +      */
  +     // TEMPLATE_REDEF_ERR
        "Template ''{0}'' already defined in this stylesheet.",
  -     // TEMPLATE_UNDEF_ERR
  +
  +
  +     /*
  +      * Note to translators:  The substitution text is the name of a
  +      * template.  A reference to the template name was encountered, but the
  +      * template is undefined.
  +      */
  +     //TEMPLATE_UNDEF_ERR
        "Template ''{0}'' not defined in this stylesheet.",
  -     // VARIABLE_REDEF_ERR   
  +
  +     /*
  +      * Note to translators:  The substitution text is the name of a variable
  +      * that was defined more than once.
  +      */
  +     //VARIABLE_REDEF_ERR
        "Variable ''{0}'' is multiply defined in the same scope.",
  -     // VARIABLE_UNDEF_ERR
  +
  +     /*
  +      * Note to translators:  The substitution text is the name of a variable
  +      * or parameter.  A reference to the variable or parameter was found,
  +      * but it was never defined.
  +      */
  +     //VARIABLE_UNDEF_ERR
        "Variable or parameter ''{0}'' is undefined.",
  -     // CLASS_NOT_FOUND_ERR
  +
  +     /*
  +      * Note to translators:  The word "class" here refers to a Java class.
  +      * Processing the stylesheet required a class to be loaded, but it could
  +      * not be found.  The substitution text is the name of the class.
  +      */
  +     //CLASS_NOT_FOUND_ERR
        "Cannot find class ''{0}''.",
  -     // METHOD_NOT_FOUND_ERR
  +
  +     /*
  +      * Note to translators:  The word "method" here refers to a Java method.
  +      * Processing the stylesheet required a reference to the method named by
  +      * the substitution text, but it could not be found.  "public" is the
  +      * Java keyword.
  +      */
  +     //METHOD_NOT_FOUND_ERR
        "Cannot find external method ''{0}'' (must be public).",
  -     // ARGUMENT_CONVERSION_ERR
  +
  +     /*
  +      * Note to translators:  The word "method" here refers to a Java method.
  +      * Processing the stylesheet required a reference to the method named by
  +      * the substitution text, but no method with the required types of
  +      * arguments or return type could be found.
  +      */
  +     //ARGUMENT_CONVERSION_ERR
        "Cannot convert argument/return type in call to method ''{0}''",
  -     // FILE_NOT_FOUND_ERR
  +
  +     /*
  +      * Note to translators:  The file or URI named in the substitution text
  +      * is missing.
  +      */
  +     //FILE_NOT_FOUND_ERR
        "File or URI ''{0}'' not found.",
  -     // INVALID_URI_ERR
  +
  +     /*
  +      * Note to translators:  This message is displayed when the URI
  +      * mentioned in the substitution text is not well-formed syntactically.
  +      */
  +     //INVALID_URI_ERR
        "Invalid URI ''{0}''.",
  -     // FILE_ACCESS_ERR
  +
  +     /*
  +      * Note to translators:  The file or URI named in the substitution text
  +      * exists but could not be opened.
  +      */
  +     //FILE_ACCESS_ERR
        "Cannot open file or URI ''{0}''.",
  -     // MISSING_ROOT_ERR
  +
  +     /*
  +      * Note to translators: <xsl:stylesheet> and <xsl:transform> are
  +      * keywords that should not be translated.
  +      */
  +     //MISSING_ROOT_ERR
        "<xsl:stylesheet> or <xsl:transform> element expected.",
  -     // NAMESPACE_UNDEF_ERR
  +
  +     /*
  +      * Note to translators:  The stylesheet contained a reference to a
  +      * namespace prefix that was undefined.  The value of the substitution
  +      * text is the name of the prefix.
  +      */
  +     //NAMESPACE_UNDEF_ERR
        "Namespace prefix ''{0}'' is undeclared.",
  -     // FUNCTION_RESOLVE_ERR
  +
  +     /*
  +      * Note to translators:  The Java function named in the stylesheet could
  +      * not be found.
  +      */
  +     //FUNCTION_RESOLVE_ERR
        "Unable to resolve call to function ''{0}''.",
  -     // NEED_LITERAL_ERR
  +
  +     /*
  +      * Note to translators:  The substitution text is the name of a
  +      * function.  A literal string here means a constant string value.
  +      */
  +     //NEED_LITERAL_ERR
        "Argument to ''{0}'' must be a literal string.",
  -     // XPATH_PARSER_ERR
  +
  +     /*
  +      * Note to translators:  This message indicates there was a syntactic
  +      * error in the form of an XPath expression.  The substitution text is
  +      * the expression.
  +      */
  +     //XPATH_PARSER_ERR
        "Error parsing XPath expression ''{0}''.",
  -     // REQUIRED_ATTR_ERR
  +
  +     /*
  +      * Note to translators:  An element in the stylesheet requires a
  +      * particular attribute named by the substitution text, but that
  +      * attribute was not specified in the stylesheet.
  +      */
  +     //REQUIRED_ATTR_ERR
        "Required attribute ''{0}'' is missing.",
  -     // ILLEGAL_CHAR_ERR
  +
  +     /*
  +      * Note to translators:  This message indicates that a character not
  +      * permitted in an XPath expression was encountered.  The substitution
  +      * text is the offending character.
  +      */
  +     //ILLEGAL_CHAR_ERR
        "Illegal character ''{0}'' in XPath expression.",
  -     // ILLEGAL_PI_ERR
  +
  +     /*
  +      * Note to translators:  A processing instruction is a mark-up item in
  +      * an XML document that request some behaviour of an XML processor.  The
  +      * form of the name of was invalid in this case, and the substitution
  +      * text is the name.
  +      */
  +     //ILLEGAL_PI_ERR
        "Illegal name ''{0}'' for processing instruction.",
  -     // STRAY_ATTRIBUTE_ERR
  +
  +     /*
  +      * Note to translators:  This message is reported if the stylesheet
  +      * being processed attempted to construct an XML document with an
  +      * attribute in a place other than on an element.  The substitution text
  +      * specifies the name of the attribute.
  +      */
  +     //STRAY_ATTRIBUTE_ERR
        "Attribute ''{0}'' outside of element.",
  -     // ILLEGAL_ATTRIBUTE_ERR
  +
  +     /*
  +      * Note to translators:  An attribute that wasn't recognized was
  +      * specified on an element in the stylesheet.  The attribute is named
  +      * by the substitution
  +      * text.
  +      */
  +     //ILLEGAL_ATTRIBUTE_ERR
        "Illegal attribute ''{0}''.",
  -     // CIRCULAR_INCLUDE_ERR
  +
  +     /*
  +      * Note to translators:  "import" and "include" are keywords that should
  +      * not be translated.  This messages indicates that the stylesheet
  +      * named in the substitution text imported or included itself either
  +      * directly or indirectly.
  +      */
  +     //CIRCULAR_INCLUDE_ERR
        "Circular import/include. Stylesheet ''{0}'' already loaded.",
  -     // RESULT_TREE_SORT_ERR
  -     "Result-tree fragments cannot be sorted (<xsl:sort> elements are "+
  -     "ignored). You must sort the nodes when creating the result tree.",
  -     // SYMBOLS_REDEF_ERR
  +
  +     /*
  +      * Note to translators:  A result-tree fragment is a portion of a
  +      * resulting XML document represented as a tree.  "<xsl:sort>" is a
  +      * keyword and should not be translated.
  +      */
  +     //RESULT_TREE_SORT_ERR
  +     "Result-tree fragments cannot be sorted (<xsl:sort> elements are " +
  +        "ignored). You must sort the nodes when creating the result tree.",
  +
  +     /*
  +      * Note to translators:  A name can be given to a particular style to be
  +      * used to format decimal values.  The substitution text gives the name
  +      * of such a style for which more than one declaration was encountered.
  +      */
  +     //SYMBOLS_REDEF_ERR
        "Decimal formatting ''{0}'' is already defined.",
  -     // XSL_VERSION_ERR
  +
  +     /*
  +      * Note to translators:  The stylesheet version named in the
  +      * substitution text is not supported.
  +      */
  +     //XSL_VERSION_ERR
        "XSL version ''{0}'' is not supported by XSLTC.",
  -     // CIRCULAR_VARIABLE_ERR
  +
  +     /*
  +      * Note to translators:  The definitions of one or more variables or
  +      * parameters depend on one another.
  +      */
  +     //CIRCULAR_VARIABLE_ERR
        "Circular variable/parameter reference in ''{0}''.",
  -     // ILLEGAL_BINARY_OP_ERR
  +
  +     /*
  +      * Note to translators:  The operator in an expresion with two operands 
was
  +      * not recognized.
  +      */
  +     //ILLEGAL_BINARY_OP_ERR
        "Unknown operator for binary expression.",
  -     // ILLEGAL_ARG_ERR
  +
  +     /*
  +      * Note to translators:  This message is produced if a reference to a
  +      * function has too many or too few arguments.
  +      */
  +     //ILLEGAL_ARG_ERR
        "Illegal argument(s) for function call.",
  -     // DOCUMENT_ARG_ERR
  +
  +     /*
  +      * Note to translators:  "document()" is the name of function and must
  +      * not be translated.  A node-set is a set of the nodes in the tree
  +      * representation of an XML document.
  +      */
  +     //DOCUMENT_ARG_ERR
        "Second argument to document() function must be a node-set.",
  -     // MISSING_WHEN_ERR
  +
  +     /*
  +      * Note to translators:  "<xsl:when>" and "<xsl:choose>" are keywords
  +      * and should not be translated.  This message describes a syntax error
  +      * in the stylesheet.
  +      */
  +     //MISSING_WHEN_ERR
        "At least one <xsl:when> element required in <xsl:choose>.",
  -     // MULTIPLE_OTHERWISE_ERR
  +
  +     /*
  +      * Note to translators:  "<xsl:otherwise>" and "<xsl:choose>" are
  +      * keywords and should not be translated.  This message describes a
  +      * syntax error in the stylesheet.
  +      */
  +     //MULTIPLE_OTHERWISE_ERR
        "Only one <xsl:otherwise> element allowed in <xsl:choose>.",
  -     // STRAY_OTHERWISE_ERR
  +
  +     /*
  +      * Note to translators:  "<xsl:otherwise>" and "<xsl:choose>" are
  +      * keywords and should not be translated.  This message describes a
  +      * syntax error in the stylesheet.
  +      */
  +     //STRAY_OTHERWISE_ERR
        "<xsl:otherwise> can only be used within <xsl:choose>.",
  -     // STRAY_WHEN_ERR
  +
  +     /*
  +      * Note to translators:  "<xsl:when>" and "<xsl:choose>" are keywords
  +      * and should not be translated.  This message describes a syntax error
  +      * in the stylesheet.
  +      */
  +     //STRAY_WHEN_ERR
        "<xsl:when> can only be used within <xsl:choose>.",
  -     // WHEN_ELEMENT_ERR     
  +
  +     /*
  +      * Note to translators:  "<xsl:when>", "<xsl:otherwise>" and
  +      * "<xsl:choose>" are keywords and should not be translated.  This
  +      * message describes a syntax error in the stylesheet.
  +      */
  +     //WHEN_ELEMENT_ERR
        "Only <xsl:when> and <xsl:otherwise> elements allowed in <xsl:choose>.",
  -     // UNNAMED_ATTRIBSET_ERR
  +
  +     /*
  +      * Note to translators:  "<xsl:attribute-set>" and "name" are keywords
  +      * that should not be translated.
  +      */
  +     //UNNAMED_ATTRIBSET_ERR
        "<xsl:attribute-set> is missing the 'name' attribute.",
  -     // ILLEGAL_CHILD_ERR
  +
  +     /*
  +      * Note to translators:  An element in the stylesheet contained an
  +      * element of a type that it was not permitted to contain.
  +      */
  +     //ILLEGAL_CHILD_ERR
        "Illegal child element.",
  -     // ILLEGAL_ELEM_NAME_ERR
  +
  +     /*
  +      * Note to translators:  The stylesheet tried to create an element with
  +      * a name that was not a valid XML name.  The substitution text contains
  +      * the name.
  +      */
  +     //ILLEGAL_ELEM_NAME_ERR
        "You cannot call an element ''{0}''",
  -     // ILLEGAL_ATTR_NAME_ERR
  +
  +     /*
  +      * Note to translators:  The stylesheet tried to create an attribute
  +      * with a name that was not a valid XML name.  The substitution text
  +      * contains the name.
  +      */
  +     //ILLEGAL_ATTR_NAME_ERR
        "You cannot call an attribute ''{0}''",
  -     // ILLEGAL_TEXT_NODE_ERR
  +
  +     /*
  +      * Note to translators:  The children of the outermost element of a
  +      * stylesheet are referred to as top-level elements.  No text should
  +      * occur within that outermost element unless it is within a top-level
  +      * element.  This message indicates that that constraint was violated.
  +      * "<xsl:stylesheet>" is a keyword that should not be translated.
  +      */
  +     //ILLEGAL_TEXT_NODE_ERR
        "Text data outside of top-level <xsl:stylesheet> element.",
  -     // SAX_PARSER_CONFIG_ERR
  +
  +     /*
  +      * Note to translators:  JAXP is an acronym for the Java API for XML
  +      * Processing.  This message indicates that the XML parser provided to
  +      * XSLTC to process the XML input document had a configuration problem.
  +      */
  +     //SAX_PARSER_CONFIG_ERR
        "JAXP parser not configured correctly",
  -     // INTERNAL_ERR
  +
  +     /*
  +      * Note to translators:  The substitution text names the internal error
  +      * encountered.
  +      */
  +     //INTERNAL_ERR
        "Unrecoverable XSLTC-internal error: ''{0}''",
  -     // UNSUPPORTED_XSL_ERR
  +
  +     /*
  +      * Note to translators:  The stylesheet contained an element that was
  +      * not recognized as part of the XSL syntax.  The substitution text
  +      * gives the element name.
  +      */
  +     //UNSUPPORTED_XSL_ERR
        "Unsupported XSL element ''{0}''.",
  -     // UNSUPPORTED_EXT_ERR
  +
  +     /*
  +      * Note to translators:  The stylesheet referred to an extension to the
  +      * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does
  +      * not recognized the particular extension named.  The substitution text
  +      * gives the extension name.
  +      */
  +     //UNSUPPORTED_EXT_ERR
        "Unrecognised XSLTC extension ''{0}''.",
  -     // MISSING_XSLT_URI_ERR
  -     "The input document is not a stylesheet "+
  -     "(the XSL namespace is not declared in the root element).",
  -     // MISSING_XSLT_TARGET_ERR
  +
  +     /*
  +      * Note to translators:  The XML document given to XSLTC as a stylesheet
  +      * was not, in fact, a stylesheet.  XSLTC is able to detect that in this
  +      * case because the outermost element in the stylesheet has to be
  +      * declared with respect to the XSL namespace URI, but no declaration
  +      * for that namespace was seen.
  +      */
  +     //MISSING_XSLT_URI_ERR
  +     "The input document is not a stylesheet (the XSL namespace is not "+
  +        "declared in the root element).",
  +
  +     /*
  +      * Note to translators:  XSLTC could not find the stylesheet document
  +      * with the name specified by the substitution text.
  +      */
  +     //MISSING_XSLT_TARGET_ERR
        "Could not find stylesheet target ''{0}''.",
  -     // NOT_IMPLEMENTED_ERR
  +
  +     /*
  +      * Note to translators:  This message represents an internal error in
  +      * condition in XSLTC.  The substitution text is the class name in XSLTC
  +      * that is missing some functionality.
  +      */
  +     //NOT_IMPLEMENTED_ERR
        "Not implemented: ''{0}''.",
  -     // NOT_STYLESHEET_ERR
  +
  +     /*
  +      * Note to translators:  The XML document given to XSLTC as a stylesheet
  +      * was not, in fact, a stylesheet.
  +      */
  +     //NOT_STYLESHEET_ERR
        "The input document does not contain an XSL stylesheet.",
  -     // ELEMENT_PARSE_ERR
  +
  +     /*
  +      * Note to translators:  The element named in the substitution text was
  +      * encountered in the stylesheet but is not recognized.
  +      */
  +     //ELEMENT_PARSE_ERR
        "Could not parse element ''{0}''",
  -     // KEY_USE_ATTR_ERR
  -     "The use-attribute of <key> must be node, node-set, string or number.",
  -     // OUTPUT_VERSION_ERR
  +
  +     /*
  +      * Note to translators:  "use", "<key>", "node", "node-set", "string"
  +      * and "number" are keywords in this context and should not be
  +      * translated.  This message indicates that the value of the "use"
  +      * attribute was not one of the permitted values.
  +      */
  +     //KEY_USE_ATTR_ERR
  +     "The use attribute of <key> must be node, node-set, string or number.",
  +
  +     /*
  +      * Note to translators:  An XML document can specify the version of the
  +      * XML specification to which it adheres.  This message indicates that
  +      * the version specified for the output document was not valid.
  +      */
  +     //OUTPUT_VERSION_ERR
        "Output XML document version should be 1.0",
  -     // ILLEGAL_RELAT_OP_ERR
  +
  +     /*
  +      * Note to translators:  The operator in a comparison operation was
  +      * not recognized.
  +      */
  +     //ILLEGAL_RELAT_OP_ERR
        "Unknown operator for relational expression",
  -     // ATTRIBSET_UNDEF_ERR
  +
  +     /*
  +      * Note to translators:  An attribute set defines as a set of XML
  +      * attributes that can be added to an element in the output XML document
  +      * as a group.  This message is reported if the name specified was not
  +      * used to declare an attribute set.  The substitution text is the name
  +      * that is in error.
  +      */
  +     //ATTRIBSET_UNDEF_ERR
        "Attempting to use non-existing attribute set ''{0}''.",
  -     // ATTR_VAL_TEMPLATE_ERR
  +
  +     /*
  +      * Note to translators:  The term "attribute value template" is a term
  +      * defined by XSLT which describes the value of an attribute that is
  +      * determined by an XPath expression.  The message indicates that the
  +      * expression was syntactically incorrect; the substitution text
  +      * contains the expression that was in error.
  +      */
  +     //ATTR_VAL_TEMPLATE_ERR
        "Cannot parse attribute value template ''{0}''.",
  -     // UNKNOWN_SIG_TYPE_ERR
  +
  +     /*
  +      * Note to translators:  ???
  +      */
  +     //UNKNOWN_SIG_TYPE_ERR
        "Unknown data-type in signature for class ''{0}''.",
  -     // DATA_CONVERSION_ERR
  +
  +     /*
  +      * Note to translators:  The substitution text refers to data types.
  +      * The message is displayed if a value in a particular context needs to
  +      * be converted to type {1}, but that's not possible for a value of
  +      * type {0}.
  +      */
  +     //DATA_CONVERSION_ERR
        "Cannot convert data-type ''{0}'' to ''{1}''.",
   
  -     // NO_TRANSLET_CLASS_ERR
  +     /*
  +      * Note to translators:  "Templates" is a Java class name that should
  +      * not be translated.
  +      */
  +     //NO_TRANSLET_CLASS_ERR
        "This Templates does not contain a valid translet class definition.",
  -     // NO_MAIN_TRANSLET_ERR
  +
  +     /*
  +      * Note to translators:  "Templates" is a Java class name that should
  +      * not be translated.
  +      */
  +     //NO_MAIN_TRANSLET_ERR
        "This Templates does not contain a class with the name ''{0}''.",
  -     // TRANSLET_CLASS_ERR
  +
  +     /*
  +      * Note to translators:  The substitution text is the name of a class.
  +      */
  +     //TRANSLET_CLASS_ERR
        "Could not load the translet class ''{0}''.",
  -     // TRANSLET_OBJECT_ERR
  +
  +     //TRANSLET_OBJECT_ERR
        "Translet class loaded, but unable to create translet instance.",
  -     // ERROR_LISTENER_NULL_ERR
  +
  +     /*
  +      * Note to translators:  "ErrorListener" is a Java interface name that
  +      * should not be translated.  The message indicates that the user tried
  +      * to set an ErrorListener object on object of the class named in the
  +      * substitution text with "null" Java value.
  +      */
  +     //ERROR_LISTENER_NULL_ERR
        "Attempting to set ErrorListener for ''{0}'' to null",
  -     // JAXP_UNKNOWN_SOURCE_ERR
  -     "Only StreamSource, SAXSource and DOMSOurce are supported by XSLTC",
  -     // JAXP_NO_SOURCE_ERR
  +
  +     /*
  +      * Note to translators:  StreamSource, SAXSource and DOMSource are Java
  +      * interface names that should not be translated.
  +      */
  +     //JAXP_UNKNOWN_SOURCE_ERR
  +     "Only StreamSource, SAXSource and DOMSource are supported by XSLTC",
  +
  +     /*
  +      * Note to translators:  "Source" is a Java class name that should not
  +      * be translated.  The substitution text is the name of Java method.
  +      */
  +     //JAXP_NO_SOURCE_ERR
        "Source object passed to ''{0}'' has no contents.",
  -     // JAXP_COMPILE_ERR
  +
  +     /*
  +      * Note to translators:  The message indicates that XSLTC failed to
  +      * compile the stylesheet into a translet (class file).
  +      */
  +     //JAXP_COMPILE_ERR
        "Could not compile stylesheet",
  -     // JAXP_INVALID_ATTR_ERR
  +
  +     /*
  +      * Note to translators:  "TransformerFactory" is a class name.  In this
  +      * context, an attribute is a property or setting of the
  +      * TransformerFactory object.  The substitution text is the name of the
  +      * unrecognised attribute.  The method used to retrieve the attribute is
  +      * "getAttribute", so it's not clear whether it would be best to
  +      * translate the term "attribute".
  +      */
  +     //JAXP_INVALID_ATTR_ERR
        "TransformerFactory does not recognise attribute ''{0}''.",
  -     // JAXP_SET_RESULT_ERROR
  +
  +     /*
  +      * Note to translators:  "setResult()" and "startDocument()" are Java
  +      * method names that should not be translated.
  +      */
  +     //JAXP_SET_RESULT_ERROR
        "setResult() must be called prior to startDocument().",
  -     // JAXP_NO_TRANSLET_ERR
  -     "The transformer has no encapsulated translet object.",
  -     // JAXP_NO_HANDLER_ERR
  +
  +     /*
  +      * Note to translators:  "Transformer" is a Java interface name that
  +      * should not be translated.  A Transformer object should contained a
  +      * reference to a translet object in order to be used for
  +      * transformations; this message is produced if that requirement is not
  +      * met.
  +      */
  +     //JAXP_NO_TRANSLET_ERR
  +     "The Transformer has no encapsulated translet object.",
  +
  +     /*
  +      * Note to translators:  The XML document that results from a
  +      * transformation needs to be sent to an output handler object; this
  +      * message is produced if that requirement is not met.
  +      */
  +     //JAXP_NO_HANDLER_ERR
        "No defined output handler for transformation result.",
  -     // JAXP_NO_RESULT_ERR
  +
  +     /*
  +      * Note to translators:  "Result" is a Java interface name in this
  +      * context.  The substitution text is a method name.
  +      */
  +     //JAXP_NO_RESULT_ERR
        "Result object passed to ''{0}'' is invalid.",
  -     // JAXP_UNKNOWN_PROP_ERR
  +
  +     /*
  +      * Note to translators:  "Transformer" is a Java interface name.  The
  +      * user's program attempted to access an unrecognized property with the
  +      * name specified in the substitution text.  The method used to retrieve
  +      * the property is "getOutputProperty", so it's not clear whether it
  +      * would be best to translate the term "property".
  +      */
  +     //JAXP_UNKNOWN_PROP_ERR
        "Attempting to access invalid Transformer property ''{0}''.",
  -     // SAX2DOM_ADAPTER_ERR
  -     "Could not crate SAX2DOM adapter: ''{0}''.",
  -     // XSLTC_SOURCE_ERR
  +
  +     /*
  +      * Note to translators:  SAX2DOM is the name of a Java class that should
  +      * not be translated.  This is an adapter in the sense that it takes a
  +      * DOM object and converts it to something that uses the SAX API.
  +      */
  +     //SAX2DOM_ADAPTER_ERR
  +     "Could not create SAX2DOM adapter: ''{0}''.",
  +
  +     /*
  +      * Note to translators:  "XSLTCSource.build()" is a Java method name.
  +      * "systemId" is an XML term that is short for "system identification".
  +      */
  +     //XSLTC_SOURCE_ERR
        "XSLTCSource.build() called without systemId being set.",
   
  -     // COMPILE_STDIN_ERR
  +
  +     //COMPILE_STDIN_ERR
        "The -i option must be used with the -o option.",
   
  -     // COMPILE_USAGE_STR
  -     "SYNOPSIS\n" +
  -     "   java org.apache.xalan.xsltc.cmdline.Compile [-o <output>]\n" +
  -     "      [-d <directory>] [-j <jarfile>] [-p <package>]\n" +
  -     "      [-n] [-x] [-s] [-u] [-v] [-h] { <stylesheet> | -i }\n\n" +
  -     "OPTIONS\n" +
  -     "   -o <output>    assigns the name <output> to the generated\n" +
  -     "                  translet. By default the translet name\n" +
  +
  +     /*
  +      * Note to translators:  This message contains usage information for a
  +      * means of invoking XSLTC from the command-line.
  +      */
  +     //COMPILE_USAGE_STR
  +     "SYNOPSIS\n"+
  +     "   java org.apache.xalan.xsltc.cmdline.Compile [-o <output>]\n"+
  +     "      [-d <directory>] [-j <jarfile>] [-p <package>]\n"+
  +     "      [-n] [-x] [-s] [-u] [-v] [-h] { <stylesheet> | -i }\n\n"+
  +     "OPTIONS\n"+
  +     "   -o <output>    assigns the name <output> to the generated\n"+
  +     "                  translet. By default the translet name\n"+
        "                  is taken from the <stylesheet> name. This option\n"+
  -     "                  is ignored if compiling multiple stylesheets.\n" +
  -     "   -d <directory> specifies a destination directory for translet\n" +
  +     "                  is ignored if compiling multiple stylesheets.\n"+
  +     "   -d <directory> specifies a destination directory for translet\n"+
        "   -j <jarfile>   packages translet classes into a jar file of the\n"+
  -     "                  name specified as <jarfile>\n"+
  +     "                  name specified as <jarfile>\n"+
        "   -p <package>   specifies a package name prefix for all generated\n"+
  -     "                  translet classes.\n" +
  +     "                  translet classes.\n"+
        "   -n             enables template inlining (default behavior 
better\n"+
  -        "                  on average).\n" +
  -     "   -x             turns on additional debugging message output\n" +
  -     "   -s             disables calling System.exit\n" +
  -     "   -u             interprets <stylesheet> arguments as URLs\n" +
  -     "   -i             forces compiler to read stylesheet from stdin\n" +
  -     "   -v             prints the version of the compiler\n" +
  -     "   -h             prints this usage statement\n",  
  - 
  -     // TRANSFORM_USAGE_STR
  -     "SYNOPSIS \n" +
  +     "                  on average).\n"+
  +     "   -x             turns on additional debugging message output\n"+
  +     "   -s             disables calling System.exit\n"+
  +     "   -u             interprets <stylesheet> arguments as URLs\n"+
  +     "   -i             forces compiler to read stylesheet from stdin\n"+
  +     "   -v             prints the version of the compiler\n"+
  +     "   -h             prints this usage statement\n",
  +
  +     /*
  +      * Note to translators:  This message contains usage information for a
  +      * means of invoking XSLTC from the command-line.
  +      */
  +     //TRANSFORM_USAGE_STR
  +     "SYNOPSIS \n"+
        "   java org.apache.xalan.xsltc.cmdline.Transform [-j <jarfile>]\n"+
  -        "      [-x] [-s] [-n <iterations>] {-u <document_url> | 
<document>}\n" +  
  -        "      <class> [<param1>=<value1> ...]\n\n" +
  -        "   uses the translet <class> to transform an XML document \n"+
  +     "      [-x] [-s] [-n <iterations>] {-u <document_url> | <document>}\n"+
  +     "      <class> [<param1>=<value1> ...]\n\n"+
  +     "   uses the translet <class> to transform an XML document \n"+
        "   specified as <document>. The translet <class> is either in\n"+
        "   the user's CLASSPATH or in the optionally specified <jarfile>.\n"+
  -     "OPTIONS\n" +
  +     "OPTIONS\n"+
        "   -j <jarfile>    specifies a jarfile from which to load translet\n"+
  -     "   -x              turns on additional debugging message output\n" +
  -     "   -s              disables calling System.exit\n" +
  -     "   -n <iterations> runs the transformation <iterations> times and\n" +
  -     "                   displays profiling information\n" +
  -     "   -u <document_url> specifies XML input document as a URL\n", 
  +     "   -x              turns on additional debugging message output\n"+
  +     "   -s              disables calling System.exit\n"+
  +     "   -n <iterations> runs the transformation <iterations> times and\n"+
  +     "                   displays profiling information\n"+
  +     "   -u <document_url> specifies XML input document as a URL\n",
  +
   
   
  -     // STRAY_SORT_ERR
  +     /*
  +      * Note to translators:  "<xsl:sort>", "<xsl:for-each>" and
  +      * "<xsl:apply-templates>" are keywords that should not be translated.
  +      * The message indicates that an xsl:sort element must be a child of
  +      * one of the other kinds of elements mentioned.
  +      */
  +     //STRAY_SORT_ERR
        "<xsl:sort> can only be used within <xsl:for-each> or 
<xsl:apply-templates>.",
  -     // UNSUPPORTED_ENCODING
  +
  +     /*
  +      * Note to translators:  The message indicates that the encoding
  +      * requested for the output document was on that requires support that
  +      * is not available from the Java Virtual Machine being used to execute
  +      * the program.
  +      */
  +     //UNSUPPORTED_ENCODING
        "Output encoding ''{0}'' is not supported on this JVM.",
  -     // SYNTAX_ERR
  +
  +     /*
  +      * Note to translators:  The message indicates that the XPath expression
  +      * named in the substitution text was not well formed syntactically.
  +      */
  +     //SYNTAX_ERR
        "Syntax error in ''{0}''.",
  -     // CONSTRUCTOR_NOT_FOUND 
  +
  +     /*
  +      * Note to translators:  The substitution text is the name of a Java
  +      * class.  The term "constructor" here is the Java term.  The message is
  +      * displayed if XSLTC could not find a constructor for the specified
  +      * class.
  +      */
  +     //CONSTRUCTOR_NOT_FOUND
        "Cannot find external constructor ''{0}''.",
  -     // NO_JAVA_FUNCT_THIS_REF 
  -     "First argument to non-static Java function ''{0}'' is not valid object 
ref."
  +
  +     /*
  +      * Note to translators:  "static" is the Java keyword.  The substitution
  +      * text is the name of a function.  The first argument of that function
  +      * is not of the required type.
  +      */
  +     //NO_JAVA_FUNCT_THIS_REF
  +     "The first argument to the non-static Java function ''{0}'' is not a "+
  +     "valid object reference.",
  +
  +     /*
  +      * Note to translators:  An XPath expression was not of the type
  +      * required in a particular context.  The substitution text is the
  +      * expression that was in error.
  +      */
  +     //TYPE_CHECK_ERR
  +     "Error checking type of the expression ''{0}''.",
  +
  +     /*
  +      * Note to translators:  An XPath expression was not of the type
  +      * required in a particular context.  However, the location of the
  +      * problematic expression is unknown.
  +      */
  +     //TYPE_CHECK_LOC_UNK_ERR
  +     "Error checking type of an expression at an unknown location.",
  +
  +     /*
  +      * Note to translators:  The substitution text is the name of a command-
  +      * line option that was not recognized.
  +      */
  +     //ILLEGAL_CMDLINE_OPTION_ERR
  +     "The command-line option ''{0}'' is not valid.",
  +
  +     /*
  +      * Note to translators:  The substitution text is the name of a command-
  +      * line option.
  +      */
  +     //CMDLINE_OPT_MISSING_ARG_ERR
  +     "The command-line option ''{0}'' is missing a required argument.",
  +
  +     /*
  +      * Note to translators:  This message is used to indicate the severity
  +      * of another message.  The substitution text contains two error
  +      * messages.
  +      */
  +     //WARNING_PLUS_WRAPPED_MSG
  +     "WARNING:  ''{0}''\n       :{1}",
  +
  +     /*
  +      * Note to translators:  This message is used to indicate the severity
  +         * of another message.  The substitution text is an error message.
  +      */
  +     //WARNING_MSG
  +     "WARNING:  ''{0}''",
  +
  +     /*
  +      * Note to translators:  This message is used to indicate the severity
  +      * of another message.  The substitution text contains two error
  +      * messages.
  +      */
  +     //FATAL_ERR_PLUS_WRAPPED_MSG
  +     "FATAL ERROR:  ''{0}''\n           :{1}",
  +
  +     /*
  +      * Note to translators:  This message is used to indicate the severity
  +         * of another message.  The substitution text is an error message.
  +      */
  +     //FATAL_ERR_MSG
  +     "FATAL ERROR:  ''{0}''",
  +
  +     /*
  +      * Note to translators:  This message is used to indicate the severity
  +      * of another message.  The substitution text contains two error
  +      * messages.
  +      */
  +     //ERROR_PLUS_WRAPPED_MSG
  +     "ERROR:  ''{0}''\n     :{1}",
  +
  +     /*
  +      * Note to translators:  This message is used to indicate the severity
  +         * of another message.  The substitution text is an error message.
  +      */
  +     //ERROR_MSG
  +     "ERROR:  ''{0}''"
       };
   
       private static Vector _keys;
  
  
  
  1.12.10.2 +16 -6     
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java
  
  Index: ErrorMsg.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java,v
  retrieving revision 1.12.10.1
  retrieving revision 1.12.10.2
  diff -u -r1.12.10.1 -r1.12.10.2
  --- ErrorMsg.java     29 Jul 2002 00:01:26 -0000      1.12.10.1
  +++ ErrorMsg.java     27 Sep 2002 21:54:38 -0000      1.12.10.2
  @@ -163,11 +163,21 @@
       public static final int TRANSFORM_USAGE_STR     = 73;
   
       // Recently added error messages
  -    public static final int STRAY_SORT_ERR          = 74;
  -    public static final int UNSUPPORTED_ENCODING    = 75;
  -    public static final int SYNTAX_ERR              = 76;
  -    public static final int CONSTRUCTOR_NOT_FOUND   = 77;
  -    public static final int NO_JAVA_FUNCT_THIS_REF  = 78;
  +    public static final int STRAY_SORT_ERR              = 74;
  +    public static final int UNSUPPORTED_ENCODING        = 75;
  +    public static final int SYNTAX_ERR                  = 76;
  +    public static final int CONSTRUCTOR_NOT_FOUND       = 77;
  +    public static final int NO_JAVA_FUNCT_THIS_REF      = 78;
  +    public static final int TYPE_CHECK_ERR              = 79;
  +    public static final int TYPE_CHECK_UNK_LOC_ERR      = 80;
  +    public static final int ILLEGAL_CMDLINE_OPTION_ERR  = 81;
  +    public static final int CMDLINE_OPT_MISSING_ARG_ERR = 82;
  +    public static final int WARNING_PLUS_WRAPPED_MSG    = 83;
  +    public static final int WARNING_MSG                 = 84;
  +    public static final int FATAL_ERR_PLUS_WRAPPED_MSG  = 85;
  +    public static final int FATAL_ERR_MSG               = 86;
  +    public static final int ERROR_PLUS_WRAPPED_MSG      = 87;
  +    public static final int ERROR_MSG                   = 88;
   
       // All error messages are localized and are stored in resource bundles.
       // This array and the following 4 strings are read from that bundle.
  
  
  
  1.1.14.2  +10 -11    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/TypeCheckError.java
  
  Index: TypeCheckError.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/TypeCheckError.java,v
  retrieving revision 1.1.14.1
  retrieving revision 1.1.14.2
  diff -u -r1.1.14.1 -r1.1.14.2
  --- TypeCheckError.java       29 Jul 2002 00:01:26 -0000      1.1.14.1
  +++ TypeCheckError.java       27 Sep 2002 21:54:38 -0000      1.1.14.2
  @@ -96,16 +96,15 @@
       public String toString() {
        String result;
   
  -     if (_error != null) {
  -         result = _error.toString();
  -     }
  -     else if (_node != null) {
  -         result = "Type check error in " + _node.toString() + ".";
  -     }
  -     else {
  -         result = "Type check error (no line information).";
  -     }
  +     if (_error == null) {
  +            if (_node != null) {
  +                _error = new ErrorMsg(ErrorMsg.TYPE_CHECK_ERR,
  +                                      _node.toString());
  +         } else {
  +             _error = new ErrorMsg(ErrorMsg.TYPE_CHECK_UNK_LOC_ERR);
  +         }
  +        }
   
  -     return result;
  +     return _error.toString();
       }
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.68.2.12 +3 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java
  
  Index: DOMImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java,v
  retrieving revision 1.68.2.11
  retrieving revision 1.68.2.12
  diff -u -r1.68.2.11 -r1.68.2.12
  --- DOMImpl.java      27 Sep 2002 16:47:09 -0000      1.68.2.11
  +++ DOMImpl.java      27 Sep 2002 21:54:39 -0000      1.68.2.12
  @@ -330,9 +330,8 @@
            }
        }
   
  -     // TODO: Internationalization?
  -     throw new TransletException("Namespace prefix '" + prefix +
  -                                 "' is undeclared.");
  +        BasisLibrary.runTimeError(BasisLibrary.NAMESPACE_PREFIX_ERR, prefix);
  +        return null;
       }
   
       /**
  
  
  
  1.7.10.2  +4 -7      
xml-xalan/java/src/org/apache/xalan/xsltc/dom/DTDMonitor.java
  
  Index: DTDMonitor.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DTDMonitor.java,v
  retrieving revision 1.7.10.1
  retrieving revision 1.7.10.2
  diff -u -r1.7.10.1 -r1.7.10.2
  --- DTDMonitor.java   17 Apr 2002 18:13:44 -0000      1.7.10.1
  +++ DTDMonitor.java   27 Sep 2002 21:54:39 -0000      1.7.10.2
  @@ -75,6 +75,7 @@
   import org.apache.xalan.xsltc.*;
   import org.apache.xalan.xsltc.runtime.AbstractTranslet;
   import org.apache.xalan.xsltc.runtime.Hashtable;
  +import org.apache.xalan.xsltc.runtime.BasisLibrary;
   
   import org.apache.xml.dtm.ref.DTMDefaultBase;
   import org.apache.xml.dtm.DTMAxisIterator;
  @@ -94,10 +95,6 @@
       private final static String DECL_HANDLER_PROP =
        "http://xml.org/sax/properties/declaration-handler";;
   
  -    // Error message used when the SAX parser does not generate DTD events
  -    private final static String NO_DTD_SUPPORT_STR =
  -     "Your SAX parser does not handle DTD declarations";
  -
       /**
        * Constructor - does nothing
        */
  @@ -120,10 +117,10 @@
            reader.setDTDHandler(this);
        }
        catch (SAXNotRecognizedException e) {
  -         throw(new RuntimeException(NO_DTD_SUPPORT_STR));
  +         BasisLibrary.runTimeError(BasisLibrary.PARSER_DTD_SUPPORT_ERR);
        }
        catch (SAXNotSupportedException e) {
  -         throw(new RuntimeException(NO_DTD_SUPPORT_STR));
  +         BasisLibrary.runTimeError(BasisLibrary.PARSER_DTD_SUPPORT_ERR);
        }
       }
   
  
  
  
  1.6.10.4  +3 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/dom/DocumentCache.java
  
  Index: DocumentCache.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DocumentCache.java,v
  retrieving revision 1.6.10.3
  retrieving revision 1.6.10.4
  diff -u -r1.6.10.3 -r1.6.10.4
  --- DocumentCache.java        27 Sep 2002 16:47:09 -0000      1.6.10.3
  +++ DocumentCache.java        27 Sep 2002 21:54:39 -0000      1.6.10.4
  @@ -86,6 +86,7 @@
   import org.apache.xalan.xsltc.dom.DOMImpl;
   import org.apache.xalan.xsltc.runtime.AbstractTranslet;
   import org.apache.xalan.xsltc.runtime.Constants;
  +import org.apache.xalan.xsltc.runtime.BasisLibrary;
   
   import org.apache.xml.dtm.DTMManager;
   import javax.xml.transform.stream.StreamSource;
  @@ -214,7 +215,7 @@
            _reader = _parser.getXMLReader();
        }
        catch (ParserConfigurationException e) {
  -         System.err.println("Your SAX parser is not configured correctly.");
  +         BasisLibrary.runTimeError(BasisLibrary.NAMESPACES_SUPPORT_ERR);
            System.exit(-1);
        }
       }
  
  
  
  1.1.2.13  +3 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/dom/Attic/SAXImpl.java
  
  Index: SAXImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/Attic/SAXImpl.java,v
  retrieving revision 1.1.2.12
  retrieving revision 1.1.2.13
  diff -u -r1.1.2.12 -r1.1.2.13
  --- SAXImpl.java      27 Sep 2002 16:47:09 -0000      1.1.2.12
  +++ SAXImpl.java      27 Sep 2002 21:54:39 -0000      1.1.2.13
  @@ -216,8 +216,8 @@
               }
           }
   
  -        // TODO: Internationalization?
  -        throw new TransletException("Namespace prefix '" + prefix + "' is 
undeclared.");
  +        BasisLibrary.runTimeError(BasisLibrary.NAMESPACE_PREFIX_ERR, prefix);
  +        return null;
       }
   
       /**
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.35.2.7  +3 -1      
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java
  
  Index: BasisLibrary.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java,v
  retrieving revision 1.35.2.6
  retrieving revision 1.35.2.7
  diff -u -r1.35.2.6 -r1.35.2.7
  --- BasisLibrary.java 18 Sep 2002 13:31:55 -0000      1.35.2.6
  +++ BasisLibrary.java 27 Sep 2002 21:54:39 -0000      1.35.2.7
  @@ -1199,6 +1199,8 @@
       public static final int STRAY_NAMESPACE_ERR     = 11;
       public static final int NAMESPACE_PREFIX_ERR    = 12;
       public static final int DOM_ADAPTER_INIT_ERR    = 13;
  +    public static final int PARSER_DTD_SUPPORT_ERR  = 14;
  +    public static final int NAMESPACES_SUPPORT_ERR  = 15;
   
       // All error messages are localized and are stored in resource bundles.
       // This array and the following 4 strings are read from that bundle.
  
  
  
  1.1.10.1  +156 -2    
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/ErrorMessages.java
  
  Index: ErrorMessages.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/ErrorMessages.java,v
  retrieving revision 1.1
  retrieving revision 1.1.10.1
  diff -u -r1.1 -r1.1.10.1
  --- ErrorMessages.java        31 Oct 2001 14:17:55 -0000      1.1
  +++ ErrorMessages.java        27 Sep 2002 21:54:39 -0000      1.1.10.1
  @@ -68,36 +68,190 @@
   
   public class ErrorMessages extends ResourceBundle {
   
  +/*
  + * XSLTC run-time error messages.
  + *
  + * General notes to translators and definitions:
  + *
  + *   1) XSLTC is the name of the product.  It is an acronym for XML 
Stylesheet:
  + *      Transformations Compiler
  + *
  + *   2) A stylesheet is a description of how to transform an input XML 
document
  + *      into a resultant output XML document (or HTML document or text)
  + *
  + *   3) An axis is a particular "dimension" in a tree representation of an 
XML
  + *      document; the nodes in the tree are divided along different axes.
  + *      Traversing the "child" axis, for instance, means that the program
  + *      would visit each child of a particular node; traversing the 
"descendant"
  + *      axis means that the program would visit the child nodes of a 
particular
  + *      node, their children, and so on until the leaf nodes of the tree are
  + *      reached.
  + *
  + *   4) An iterator is an object that traverses nodes in a tree along a
  + *      particular axis, one at a time.
  + *
  + *   5) An element is a mark-up tag in an XML document; an attribute is a
  + *      modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
  + *      "elem" is an element name, "attr" and "attr2" are attribute names 
with
  + *      the values "val" and "val2", respectively.
  + *
  + *   6) A namespace declaration is a special attribute that is used to 
associate
  + *      a prefix with a URI (the namespace).  The meanings of element names 
and
  + *      attribute names that use that prefix are defined with respect to that
  + *      namespace.
  + *
  + *   7) DOM is an acronym for Document Object Model.  It is a tree
  + *      representation of an XML document.
  + *
  + *      SAX is an acronym for the Simple API for XML processing.  It is an 
API
  + *      used inform an XML processor (in this case XSLTC) of the structure 
and
  + *      content of an XML document.
  + *
  + *      Input to the stylesheet processor can come from an XML parser in the
  + *      form of a DOM tree or through the SAX API.
  + *
  + *   8) DTD is a document type declaration.  It is a way of specifying the
  + *      grammar for an XML file, the names and types of elements, attributes,
  + *      etc.
  + *
  + */
  +
       // These message should be read from a locale-specific resource bundle
       private static final String errorMessages[] = {
  +
  +     /*
  +      * Note to translators:  the substitution text in the following message
  +      * is a class name.  Used for internal errors in the processor.
  +      */
        // RUN_TIME_INTERNAL_ERR
        "Run-time internal error in ''{0}''",
  +
  +     /*
  +      * Note to translators:  <xsl:copy> is a keyword that should not be
  +      * translated.
  +      */
        // RUN_TIME_COPY_ERR
        "Run-time error when executing <xsl:copy>.",
  +
  +     /*
  +      * Note to translators:  The substitution text refers to data types.
  +      * The message is displayed if a value in a particular context needs to
  +      * be converted to type {1}, but that's not possible for a value of type
  +      * {0}.
  +      */
        // DATA_CONVERSION_ERR
        "Invalid conversion from ''{0}'' to ''{1}''.",
  +
  +     /*
  +      * Note to translators:  This message is displayed if the function named
  +      * by the substitution text is not a function that is supported.  XSLTC
  +      * is the acronym naming the product.
  +      */
        // EXTERNAL_FUNC_ERR
        "External function ''{0}'' not supported by XSLTC.",
  +
  +     /*
  +      * Note to translators:  This message is displayed if two values are
  +      * compared for equality, but the data type of one of the values is
  +      * unknown.
  +      */
        // EQUALITY_EXPR_ERR
        "Unknown argument type in equality expression.",
  +
  +     /*
  +      * Note to translators:  The substitution text for {0} will be a data
  +      * type; the substitution text for {1} will be the name of a function.
  +      * This is displayed if an argument of the particular data type is not
  +      * permitted for a call to this function.
  +      */
        // INVALID_ARGUMENT_ERR
        "Invalid argument type ''{0}'' in call to ''{1}''",
  +
  +     /*
  +      * Note to translators:  There is way of specifying a format for a
  +      * number using a pattern; the processor was unable to format the
  +      * particular value using the specified pattern.
  +      */
        // FORMAT_NUMBER_ERR
        "Attempting to format number ''{0}'' using pattern ''{1}''.",
  +
  +     /*
  +      * Note to translators:  The following represents an internal error
  +      * situation in XSLTC.  The processor was unable to create a copy of an
  +      * iterator.  (See definition of iterator above.)
  +      */
        // ITERATOR_CLONE_ERR
        "Cannot clone iterator ''{0}''.",
  +
  +     /*
  +      * Note to translators:  The following represents an internal error
  +      * situation in XSLTC.  The processor attempted to create an iterator
  +      * for a particular axis (see definition above) that it does not
  +      * support.
  +      */
        // AXIS_SUPPORT_ERR
        "Iterator for axis ''{0}'' not supported.",
  +
  +     /*
  +      * Note to translators:  The following represents an internal error
  +      * situation in XSLTC.  The processor attempted to create an iterator
  +      * for a particular axis (see definition above) that it does not
  +      * support.
  +      */
        // TYPED_AXIS_SUPPORT_ERR
        "Iterator for typed axis ''{0}'' not supported.",
  +
  +     /*
  +      * Note to translators:  This message is reported if the stylesheet
  +      * being processed attempted to construct an XML document with an
  +      * attribute in a place other than on an element.  The substitution text
  +      * specifies the name of the attribute.
  +      */
        // STRAY_ATTRIBUTE_ERR
        "Attribute ''{0}'' outside of element.",
  +
  +     /*
  +      * Note to translators:  As with the preceding message, a namespace
  +      * declaration has the form of a namespace and is only permitted to
  +      * appear on an element.  The substitution text {0} is the namespace
  +      * prefix and {1} is the URI that was being used in the erroneous
  +      * namespace declaration.
  +      */
        // STRAY_NAMESPACE_ERR
        "Namespace declaration ''{0}''=''{1}'' outside of element.",
  +
  +     /*
  +      * Note to translators:  The stylesheet contained a reference to a
  +      * namespace prefix that was undefined.  The value of the substitution
  +      * text is the name of the prefix.
  +      */
        // NAMESPACE_PREFIX_ERR
        "Namespace for prefix ''{0}'' has not been declared.",
  +
  +     /*
  +      * Note to translators:  The following represents an internal error.
  +      * DOMAdapter is a Java class in XSLTC.
  +      */
        // DOM_ADAPTER_INIT_ERR
  -     "DOMAdapter created using wrong type of source DOM."
  +     "DOMAdapter created using wrong type of source DOM.",
  +
  +     /*
  +      * Note to translators:  The following message indicates that the XML
  +      * parser that is providing input to XSLTC cannot be used because it
  +      * does not describe to XSLTC the structure of the input XML document's
  +      * DTD.
  +      */
  +        // PARSER_DTD_SUPPORT_ERR
  +        "The SAX parser you are using does not handle DTD declaration 
events.",
  +
  +     /*
  +      * Note to translators:  The following message indicates that the XML
  +      * parser that is providing input to XSLTC cannot be used because it
  +      * does not distinguish between ordinary XML attributes and namespace
  +      * declarations.
  +      */
  +        // NAMESPACES_SUPPORT_ERR
  +        "The SAX parser you are using does not have support for XML 
Namespaces."
       };
   
       private static Vector _keys;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.34.2.5  +23 -11    
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.34.2.4
  retrieving revision 1.34.2.5
  diff -u -r1.34.2.4 -r1.34.2.5
  --- TransformerFactoryImpl.java       26 Sep 2002 13:58:38 -0000      1.34.2.4
  +++ TransformerFactoryImpl.java       27 Sep 2002 21:54:40 -0000      1.34.2.5
  @@ -651,10 +651,14 @@
       public void error(TransformerException e)
        throws TransformerException 
       {
  -     System.err.println("ERROR: "+e.getMessageAndLocation());
        Throwable wrapped = e.getException();
  -     if (wrapped != null) {
  -         System.err.println("     : "+wrapped.getMessage());
  +        if (wrapped != null) {
  +            System.err.println(new ErrorMsg(ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
  +                                            e.getMessageAndLocation(),
  +                                            wrapped.getMessage()));
  +        } else {
  +            System.err.println(new ErrorMsg(ErrorMsg.ERROR_MSG,
  +                                            e.getMessageAndLocation()));
        }
        throw e;        
       }
  @@ -675,11 +679,15 @@
       public void fatalError(TransformerException e)
        throws TransformerException 
       {
  -     System.err.println("FATAL: "+e.getMessageAndLocation());
        Throwable wrapped = e.getException();
  -     if (wrapped != null) {
  -         System.err.println("     : "+wrapped.getMessage());
  -     }
  +        if (wrapped != null) {
  +            System.err.println(new 
ErrorMsg(ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
  +                                            e.getMessageAndLocation(),
  +                                            wrapped.getMessage()));
  +        } else {
  +            System.err.println(new ErrorMsg(ErrorMsg.FATAL_ERR_MSG,
  +                                            e.getMessageAndLocation()));
  +        }
        throw e;
       }
   
  @@ -699,11 +707,15 @@
       public void warning(TransformerException e)
        throws TransformerException 
       {
  -     System.err.println("WARNING: "+e.getMessageAndLocation());
        Throwable wrapped = e.getException();
        if (wrapped != null) {
  -         System.err.println("       : "+wrapped.getMessage());
  -     }
  +            System.err.println(new 
ErrorMsg(ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
  +                                            e.getMessageAndLocation(),
  +                                            wrapped.getMessage()));
  +     } else {
  +            System.err.println(new ErrorMsg(ErrorMsg.WARNING_MSG,
  +                                            e.getMessageAndLocation()));
  +        }
       }
   
       /**
  
  
  
  1.37.2.8  +30 -14    
xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java
  
  Index: TransformerImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java,v
  retrieving revision 1.37.2.7
  retrieving revision 1.37.2.8
  diff -u -r1.37.2.7 -r1.37.2.8
  --- TransformerImpl.java      27 Sep 2002 16:47:09 -0000      1.37.2.7
  +++ TransformerImpl.java      27 Sep 2002 21:54:40 -0000      1.37.2.8
  @@ -1087,8 +1087,16 @@
       public void error(TransformerException e)
        throws TransformerException 
       {
  -     System.err.println("ERROR: " + e.getMessageAndLocation());
  -     throw(e);       
  +        Throwable wrapped = e.getException();
  +        if (wrapped != null) {
  +            System.err.println(new ErrorMsg(ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
  +                                            e.getMessageAndLocation(),
  +                                            wrapped.getMessage()));
  +        } else {
  +            System.err.println(new ErrorMsg(ErrorMsg.ERROR_MSG,
  +                                            e.getMessageAndLocation()));
  +        }
  +        throw e;
       }
   
       /**
  @@ -1107,12 +1115,16 @@
       public void fatalError(TransformerException e)
        throws TransformerException 
       {
  -     System.err.println("FATAL: " + e.getMessageAndLocation());
  -     Throwable wrapped = e.getException();
  -     if (wrapped != null) {
  -         System.err.println("     : "+wrapped.getMessage());
  -     }
  -     throw(e);
  +        Throwable wrapped = e.getException();
  +        if (wrapped != null) {
  +            System.err.println(new 
ErrorMsg(ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
  +                                            e.getMessageAndLocation(),
  +                                            wrapped.getMessage()));
  +        } else {
  +            System.err.println(new ErrorMsg(ErrorMsg.FATAL_ERR_MSG,
  +                                            e.getMessageAndLocation()));
  +        }
  +        throw e;
       }
   
       /**
  @@ -1131,11 +1143,15 @@
       public void warning(TransformerException e)
        throws TransformerException 
       {
  -     System.err.println("WARNING: " + e.getMessageAndLocation());
  -     Throwable wrapped = e.getException();
  -     if (wrapped != null) {
  -         System.err.println("       : "+wrapped.getMessage());
  -     }
  +        Throwable wrapped = e.getException();
  +        if (wrapped != null) {
  +            System.err.println(new 
ErrorMsg(ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
  +                                            e.getMessageAndLocation(),
  +                                            wrapped.getMessage()));
  +        } else {
  +            System.err.println(new ErrorMsg(ErrorMsg.WARNING_MSG,
  +                                            e.getMessageAndLocation()));
  +        }
       }
   
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.37.2.2  +9 -0      xml-xalan/java/src/org/apache/xpath/XPathContext.java
  
  Index: XPathContext.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPathContext.java,v
  retrieving revision 1.37.2.1
  retrieving revision 1.37.2.2
  diff -u -r1.37.2.1 -r1.37.2.2
  --- XPathContext.java 29 Jul 2002 00:01:32 -0000      1.37.2.1
  +++ XPathContext.java 27 Sep 2002 21:54:40 -0000      1.37.2.2
  @@ -1146,6 +1146,15 @@
       {
         return new 
org.apache.xml.dtm.ref.DTMNodeIterator(getContextNodeList());
       }
  +
  +    /**
  +     * Get the error listener.
  +     * @return The registered error listener.
  +     */
  +    public ErrorListener getErrorListener()
  +    {
  +      return XPathContext.this.getErrorListener();
  +    }
     
       /**
        * Get the value of a node as a number.
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.2   +10 -0     
xml-xalan/java/src/org/apache/xpath/functions/FunctionMultiArgs.java
  
  Index: FunctionMultiArgs.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FunctionMultiArgs.java,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.2
  diff -u -r1.8.2.1 -r1.8.2.2
  --- FunctionMultiArgs.java    29 Jul 2002 00:01:33 -0000      1.8.2.1
  +++ FunctionMultiArgs.java    27 Sep 2002 21:54:40 -0000      1.8.2.2
  @@ -76,6 +76,16 @@
     /** Argument expressions that are at index 3 or greater.
      *  @serial */
     Expression[] m_args;
  +  
  +  /**
  +   * Return an expression array containing arguments at index 3 or greater.
  +   *
  +   * @return An array that contains the arguments at index 3 or greater.
  +   */
  +  public Expression[] getArgs()
  +  {
  +    return m_args;
  +  }
   
     /**
      * Set an argument expression for a function.  This method is called by the
  
  
  

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

Reply via email to