xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zong...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
Date Wed, 19 Mar 2003 22:14:13 GMT
zongaro     2003/03/19 14:14:12

  Modified:    java/src/org/apache/xalan/xsltc/cmdline Transform.java
               java/src/org/apache/xalan/xsltc/compiler Import.java
                        Include.java Parser.java SyntaxTreeNode.java
                        XSLTC.java
               java/src/org/apache/xalan/xsltc/compiler/util
                        ErrorMessages.java ErrorMessages_no.java
                        ErrorMsg.java TypeCheckError.java
               java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
                        ErrorMessages.java ErrorMessages_no.java
               java/src/org/apache/xalan/xsltc/trax
                        TransformerFactoryImpl.java
  Log:
  Changed XSLTC messages to extend ListResourceBundle, and use String keys to
  access messages.  Code used to extend ResourceBundle and used to use integer
  indices to access error messages.
  
  Changes from myself and Gordon Chiu (grchiu@uwaterloo.ca).
  
  Revision  Changes    Path
  1.25      +9 -9      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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Transform.java	30 Jan 2003 18:45:58 -0000	1.24
  +++ Transform.java	19 Mar 2003 22:14:07 -0000	1.25
  @@ -235,41 +235,41 @@
   	}
   	catch (TransletException e) {
   	    if (_debug) e.printStackTrace();
  -	    System.err.println(ErrorMsg.getTransletErrorMessage()+
  +	    System.err.println(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)+
   			       e.getMessage());
   	    if (_allowExit) System.exit(-1);	    
   	}
   	catch (RuntimeException e) {
   	    if (_debug) e.printStackTrace();
  -	    System.err.println(ErrorMsg.getTransletErrorMessage()+
  +	    System.err.println(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)+
   			       e.getMessage());
   	    if (_allowExit) System.exit(-1);
   	}
   	catch (FileNotFoundException e) {
   	    if (_debug) e.printStackTrace();
   	    ErrorMsg err = new ErrorMsg(ErrorMsg.FILE_NOT_FOUND_ERR, _fileName);
  -	    System.err.println(ErrorMsg.getTransletErrorMessage()+
  +	    System.err.println(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)+
   			       err.toString());
   	    if (_allowExit) System.exit(-1);
   	}
   	catch (MalformedURLException e) {
   	    if (_debug) e.printStackTrace();
   	    ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_URI_ERR, _fileName);
  -	    System.err.println(ErrorMsg.getTransletErrorMessage()+
  +	    System.err.println(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)+
   			       err.toString());
   	    if (_allowExit) System.exit(-1);
   	}
   	catch (ClassNotFoundException e) {
   	    if (_debug) e.printStackTrace();
   	    ErrorMsg err= new ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR,_className);
  -	    System.err.println(ErrorMsg.getTransletErrorMessage()+
  +	    System.err.println(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)+
   			       err.toString());
   	    if (_allowExit) System.exit(-1);
   	}
           catch (UnknownHostException e) {
   	    if (_debug) e.printStackTrace();
   	    ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_URI_ERR, _fileName);
  -	    System.err.println(ErrorMsg.getTransletErrorMessage()+
  +	    System.err.println(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)+
   			       err.toString());
   	    if (_allowExit) System.exit(-1);
           }
  @@ -279,7 +279,7 @@
   		if (ex != null) ex.printStackTrace();
   		e.printStackTrace();
   	    }
  -	    System.err.print(ErrorMsg.getTransletErrorMessage());
  +	    System.err.print(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY));
   	    if (ex != null)
   		System.err.println(ex.getMessage());
   	    else
  @@ -288,7 +288,7 @@
   	}
   	catch (Exception e) {
   	    if (_debug) e.printStackTrace();
  -	    System.err.println(ErrorMsg.getTransletErrorMessage()+
  +	    System.err.println(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)+
   			       e.getMessage());
   	    if (_allowExit) System.exit(-1);
   	}
  
  
  
  1.20      +3 -3      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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Import.java	5 Feb 2003 21:13:17 -0000	1.19
  +++ Import.java	19 Mar 2003 22:14:08 -0000	1.20
  @@ -92,8 +92,8 @@
   	try {
   	    String docToLoad = getAttribute("href");
   	    if (context.checkForLoop(docToLoad)) {
  -		final int errno = ErrorMsg.CIRCULAR_INCLUDE_ERR;
  -		final ErrorMsg msg = new ErrorMsg(errno, docToLoad, this);
  +		final ErrorMsg msg = new ErrorMsg(ErrorMsg.CIRCULAR_INCLUDE_ERR,
  +                                                  docToLoad, this);
   		parser.reportError(Constants.FATAL, msg);
   		return;
   	    }
  
  
  
  1.24      +3 -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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Include.java	5 Feb 2003 21:13:17 -0000	1.23
  +++ Include.java	19 Mar 2003 22:14:08 -0000	1.24
  @@ -93,8 +93,8 @@
   	String docToLoad = getAttribute("href");
   	try {
   	    if (context.checkForLoop(docToLoad)) {
  -		final int errno = ErrorMsg.CIRCULAR_INCLUDE_ERR;
  -		final ErrorMsg msg = new ErrorMsg(errno, docToLoad, this);
  +		final ErrorMsg msg = new ErrorMsg(ErrorMsg.CIRCULAR_INCLUDE_ERR,
  +                                                  docToLoad, this);
   		parser.reportError(Constants.FATAL, msg);
   		return;
   	    }
  
  
  
  1.57      +8 -8      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.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- Parser.java	30 Jan 2003 18:46:01 -0000	1.56
  +++ Parser.java	19 Mar 2003 22:14:08 -0000	1.57
  @@ -432,7 +432,7 @@
   	    }
   	}
   	catch (TypeCheckError e) {
  -	    reportError(ERROR, new ErrorMsg(e.toString()));
  +	    reportError(ERROR, new ErrorMsg(e));
   	}
       }
   
  @@ -452,7 +452,7 @@
   	}
   	catch (IOException e) {
   	    if (_xsltc.debug()) e.printStackTrace();
  -	    reportError(ERROR,new ErrorMsg(e.getMessage()));
  +	    reportError(ERROR,new ErrorMsg(e));
   	}
   	catch (SAXException e) {
   	    Throwable ex = e.getException();
  @@ -460,15 +460,15 @@
   		e.printStackTrace();
   		if (ex != null) ex.printStackTrace();
   	    }
  -	    reportError(ERROR, new ErrorMsg(e.getMessage()));
  +	    reportError(ERROR, new ErrorMsg(e));
   	}
   	catch (CompilerException e) {
   	    if (_xsltc.debug()) e.printStackTrace();
  -	    reportError(ERROR, new ErrorMsg(e.getMessage()));
  +	    reportError(ERROR, new ErrorMsg(e));
   	}
   	catch (Exception e) {
   	    if (_xsltc.debug()) e.printStackTrace();
  -	    reportError(ERROR, new ErrorMsg(e.getMessage()));
  +	    reportError(ERROR, new ErrorMsg(e));
   	}
   	return null;
       }
  @@ -1146,7 +1146,7 @@
       public void printErrors() {
   	final int size = _errors.size();
   	if (size > 0) {
  -	    System.err.println(ErrorMsg.getCompileErrorMessage());
  +	    System.err.println(new ErrorMsg(ErrorMsg.COMPILER_ERROR_KEY));
   	    for (int i = 0; i < size; i++) {
   		System.err.println("  " + _errors.elementAt(i));
   	    }
  @@ -1159,7 +1159,7 @@
       public void printWarnings() {
   	final int size = _warnings.size();
   	if (size > 0) {
  -	    System.err.println(ErrorMsg.getCompileWarningMessage());
  +	    System.err.println(new ErrorMsg(ErrorMsg.COMPILER_WARNING_KEY));
   	    for (int i = 0; i < size; i++) {
   		System.err.println("  " + _warnings.elementAt(i));
   	    }
  
  
  
  1.25      +3 -3      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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- SyntaxTreeNode.java	30 Jan 2003 18:46:02 -0000	1.24
  +++ SyntaxTreeNode.java	19 Mar 2003 22:14:08 -0000	1.25
  @@ -781,7 +781,7 @@
        * @param message Any additional error message.
        */
       protected void reportError(SyntaxTreeNode element, Parser parser,
  -			       int errorCode, String message) {
  +			       String errorCode, String message) {
   	final ErrorMsg error = new ErrorMsg(errorCode, message, element);
           parser.reportError(Constants.ERROR, error);
       }
  @@ -795,7 +795,7 @@
        * @param message Any additional error message.
        */
       protected  void reportWarning(SyntaxTreeNode element, Parser parser,
  -				  int errorCode, String message) {
  +				  String errorCode, String message) {
   	final ErrorMsg error = new ErrorMsg(errorCode, message, element);
           parser.reportError(Constants.WARNING, error);
       }
  
  
  
  1.49      +5 -5      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.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- XSLTC.java	5 Feb 2003 21:13:17 -0000	1.48
  +++ XSLTC.java	19 Mar 2003 22:14:08 -0000	1.49
  @@ -264,7 +264,7 @@
   	    return compile(input, _className);
   	}
   	catch (IOException e) {
  -	    _parser.reportError(Constants.FATAL, new ErrorMsg(e.getMessage()));
  +	    _parser.reportError(Constants.FATAL, new ErrorMsg(e));
   	    return false;
   	}
       }
  @@ -283,7 +283,7 @@
   	    return compile(input, name);
   	}
   	catch (IOException e) {
  -	    _parser.reportError(Constants.FATAL, new ErrorMsg(e.getMessage()));
  +	    _parser.reportError(Constants.FATAL, new ErrorMsg(e));
   	    return false;
   	}
       }
  @@ -362,11 +362,11 @@
   	}
   	catch (Exception e) {
   	    if (_debug) e.printStackTrace();
  -	    _parser.reportError(Constants.FATAL, new ErrorMsg(e.getMessage()));
  +	    _parser.reportError(Constants.FATAL, new ErrorMsg(e));
   	}
   	catch (Error e) {
   	    if (_debug) e.printStackTrace();
  -	    _parser.reportError(Constants.FATAL, new ErrorMsg(e.getMessage()));
  +	    _parser.reportError(Constants.FATAL, new ErrorMsg(e));
   	}
   	finally {
   	    _reader = null; // reset this here to be sure it is not re-used
  
  
  
  1.19      +768 -767  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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ErrorMessages.java	30 Jan 2003 18:46:09 -0000	1.18
  +++ ErrorMessages.java	19 Mar 2003 22:14:09 -0000	1.19
  @@ -62,11 +62,9 @@
   
   package org.apache.xalan.xsltc.compiler.util;
   
  -import java.util.Enumeration;
  -import java.util.ResourceBundle;
  -import java.util.Vector;
  +import java.util.ListResourceBundle;
   
  -public class ErrorMessages extends ResourceBundle {
  +public class ErrorMessages extends ListResourceBundle {
   
   /*
    * XSLTC compile-time error messages.
  @@ -128,796 +126,799 @@
    */
   
       // These message should be read from a locale-specific resource bundle
  -    private static final String errorMessages[] = { 
  -	//MULTIPLE_STYLESHEET_ERR
  -	"More than one stylesheet defined in the same file.",
  -
  -	/*
  -	 * 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.",
  -
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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).",
  -
  -	/*
  -	 * 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}''",
  -
  -	/*
  -	 * Note to translators:  The file or URI named in the substitution text
  -	 * is missing.
  -	 */
  -	//FILE_NOT_FOUND_ERR
  -	"File or URI ''{0}'' not found.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * Note to translators:  The Java function named in the stylesheet could
  -	 * not be found.
  -	 */
  -	//FUNCTION_RESOLVE_ERR
  -	"Unable to resolve call to function ''{0}''.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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:  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}''.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * Note to translators:  The operator in an expresion with two operands was
  -	 * not recognized.
  -	 */
  -	//ILLEGAL_BINARY_OP_ERR
  -	"Unknown operator for binary expression.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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>.",
  -
  -	/*
  -	 * 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>.",
  -
  -	/*
  -	 * 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>.",
  -
  -	/*
  -	 * 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>.",
  -
  -	/*
  -	 * 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>.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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}''",
  -
  -	/*
  -	 * 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}''",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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",
  -
  -	/*
  -	 * Note to translators:  The substitution text names the internal error
  -	 * encountered.
  -	 */
  -	//INTERNAL_ERR
  -	"Unrecoverable XSLTC-internal error: ''{0}''",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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}''",
  -
  -	/*
  -	 * 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",
  -
  -	/*
  -	 * Note to translators:  The operator in a comparison operation was
  -	 * not recognized.
  -	 */
  -	//ILLEGAL_RELAT_OP_ERR
  -	"Unknown operator for relational expression",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * Note to translators:  ???
  -	 */
  -	//UNKNOWN_SIG_TYPE_ERR
  -	"Unknown data-type in signature for class ''{0}''.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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 class loaded, but unable to create translet instance.",
  -
  -	/*
  -	 * 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",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * Note to translators:  "setResult()" and "startDocument()" are Java
  -	 * method names that should not be translated.
  -	 */
  -	//JAXP_SET_RESULT_ERR
  -	"setResult() must be called prior to startDocument().",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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
  -	"The -i option must be used with the -o option.",
  -
  -
  -	/*
  -	 * Note to translators:  This message contains usage information for a
  -	 * means of invoking XSLTC from the command-line.  The message is
  +    private static final String[][] m_errorMessages = { 
  +        {ErrorMsg.MULTIPLE_STYLESHEET_ERR,
  +        "More than one stylesheet defined in the same file."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.TEMPLATE_REDEF_ERR,
  +        "Template ''{0}'' already defined in this stylesheet."},
  +
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.TEMPLATE_UNDEF_ERR,
  +        "Template ''{0}'' not defined in this stylesheet."},
  +
  +        /*
  +         * Note to translators:  The substitution text is the name of a variable
  +         * that was defined more than once.
  +         */
  +        {ErrorMsg.VARIABLE_REDEF_ERR,
  +        "Variable ''{0}'' is multiply defined in the same scope."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.VARIABLE_UNDEF_ERR,
  +        "Variable or parameter ''{0}'' is undefined."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.CLASS_NOT_FOUND_ERR,
  +        "Cannot find class ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.METHOD_NOT_FOUND_ERR,
  +        "Cannot find external method ''{0}'' (must be public)."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.ARGUMENT_CONVERSION_ERR,
  +        "Cannot convert argument/return type in call to method ''{0}''"},
  +
  +        /*
  +         * Note to translators:  The file or URI named in the substitution text
  +         * is missing.
  +         */
  +        {ErrorMsg.FILE_NOT_FOUND_ERR,
  +        "File or URI ''{0}'' not found."},
  +
  +        /*
  +         * Note to translators:  This message is displayed when the URI
  +         * mentioned in the substitution text is not well-formed syntactically.
  +         */
  +        {ErrorMsg.INVALID_URI_ERR,
  +        "Invalid URI ''{0}''."},
  +
  +        /*
  +         * Note to translators:  The file or URI named in the substitution text
  +         * exists but could not be opened.
  +         */
  +        {ErrorMsg.FILE_ACCESS_ERR,
  +        "Cannot open file or URI ''{0}''."},
  +
  +        /*
  +         * Note to translators: <xsl:stylesheet> and <xsl:transform> are
  +         * keywords that should not be translated.
  +         */
  +        {ErrorMsg.MISSING_ROOT_ERR,
  +        "<xsl:stylesheet> or <xsl:transform> element expected."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.NAMESPACE_UNDEF_ERR,
  +        "Namespace prefix ''{0}'' is undeclared."},
  +
  +        /*
  +         * Note to translators:  The Java function named in the stylesheet could
  +         * not be found.
  +         */
  +        {ErrorMsg.FUNCTION_RESOLVE_ERR,
  +        "Unable to resolve call to function ''{0}''."},
  +
  +        /*
  +         * Note to translators:  The substitution text is the name of a
  +         * function.  A literal string here means a constant string value.
  +         */
  +        {ErrorMsg.NEED_LITERAL_ERR,
  +        "Argument to ''{0}'' must be a literal string."},
  +
  +        /*
  +         * Note to translators:  This message indicates there was a syntactic
  +         * error in the form of an XPath expression.  The substitution text is
  +         * the expression.
  +         */
  +        {ErrorMsg.XPATH_PARSER_ERR,
  +        "Error parsing XPath expression ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.REQUIRED_ATTR_ERR,
  +        "Required attribute ''{0}'' is missing."},
  +
  +        /*
  +         * Note to translators:  This message indicates that a character not
  +         * permitted in an XPath expression was encountered.  The substitution
  +         * text is the offending character.
  +         */
  +        {ErrorMsg.ILLEGAL_CHAR_ERR,
  +        "Illegal character ''{0}'' in XPath expression."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.ILLEGAL_PI_ERR,
  +        "Illegal name ''{0}'' for processing instruction."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.STRAY_ATTRIBUTE_ERR,
  +        "Attribute ''{0}'' outside of element."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR,
  +        "Illegal attribute ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.CIRCULAR_INCLUDE_ERR,
  +        "Circular import/include. Stylesheet ''{0}'' already loaded."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.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.
  +         */
  +        {ErrorMsg.SYMBOLS_REDEF_ERR,
  +        "Decimal formatting ''{0}'' is already defined."},
  +
  +        /*
  +         * Note to translators:  The stylesheet version named in the
  +         * substitution text is not supported.
  +         */
  +        {ErrorMsg.XSL_VERSION_ERR,
  +        "XSL version ''{0}'' is not supported by XSLTC."},
  +
  +        /*
  +         * Note to translators:  The definitions of one or more variables or
  +         * parameters depend on one another.
  +         */
  +        {ErrorMsg.CIRCULAR_VARIABLE_ERR,
  +        "Circular variable/parameter reference in ''{0}''."},
  +
  +        /*
  +         * Note to translators:  The operator in an expresion with two operands was
  +         * not recognized.
  +         */
  +        {ErrorMsg.ILLEGAL_BINARY_OP_ERR,
  +        "Unknown operator for binary expression."},
  +
  +        /*
  +         * Note to translators:  This message is produced if a reference to a
  +         * function has too many or too few arguments.
  +         */
  +        {ErrorMsg.ILLEGAL_ARG_ERR,
  +        "Illegal argument(s) for function call."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.DOCUMENT_ARG_ERR,
  +        "Second argument to document() function must be a node-set."},
  +
  +        /*
  +         * Note to translators:  "<xsl:when>" and "<xsl:choose>" are keywords
  +         * and should not be translated.  This message describes a syntax error
  +         * in the stylesheet.
  +         */
  +        {ErrorMsg.MISSING_WHEN_ERR,
  +        "At least one <xsl:when> element required in <xsl:choose>."},
  +
  +        /*
  +         * Note to translators:  "<xsl:otherwise>" and "<xsl:choose>" are
  +         * keywords and should not be translated.  This message describes a
  +         * syntax error in the stylesheet.
  +         */
  +        {ErrorMsg.MULTIPLE_OTHERWISE_ERR,
  +        "Only one <xsl:otherwise> element allowed in <xsl:choose>."},
  +
  +        /*
  +         * Note to translators:  "<xsl:otherwise>" and "<xsl:choose>" are
  +         * keywords and should not be translated.  This message describes a
  +         * syntax error in the stylesheet.
  +         */
  +        {ErrorMsg.STRAY_OTHERWISE_ERR,
  +        "<xsl:otherwise> can only be used within <xsl:choose>."},
  +
  +        /*
  +         * Note to translators:  "<xsl:when>" and "<xsl:choose>" are keywords
  +         * and should not be translated.  This message describes a syntax error
  +         * in the stylesheet.
  +         */
  +        {ErrorMsg.STRAY_WHEN_ERR,
  +        "<xsl:when> can only be used within <xsl:choose>."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.WHEN_ELEMENT_ERR,
  +        "Only <xsl:when> and <xsl:otherwise> elements allowed in <xsl:choose>."},
  +
  +        /*
  +         * Note to translators:  "<xsl:attribute-set>" and "name" are keywords
  +         * that should not be translated.
  +         */
  +        {ErrorMsg.UNNAMED_ATTRIBSET_ERR,
  +        "<xsl:attribute-set> is missing the 'name' attribute."},
  +
  +        /*
  +         * Note to translators:  An element in the stylesheet contained an
  +         * element of a type that it was not permitted to contain.
  +         */
  +        {ErrorMsg.ILLEGAL_CHILD_ERR,
  +        "Illegal child element."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.ILLEGAL_ELEM_NAME_ERR,
  +        "You cannot call an element ''{0}''"},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.ILLEGAL_ATTR_NAME_ERR,
  +        "You cannot call an attribute ''{0}''"},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.ILLEGAL_TEXT_NODE_ERR,
  +        "Text data outside of top-level <xsl:stylesheet> element."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.SAX_PARSER_CONFIG_ERR,
  +        "JAXP parser not configured correctly"},
  +
  +        /*
  +         * Note to translators:  The substitution text names the internal error
  +         * encountered.
  +         */
  +        {ErrorMsg.INTERNAL_ERR,
  +        "Unrecoverable XSLTC-internal error: ''{0}''"},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.UNSUPPORTED_XSL_ERR,
  +        "Unsupported XSL element ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.UNSUPPORTED_EXT_ERR,
  +        "Unrecognised XSLTC extension ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.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.
  +         */
  +        {ErrorMsg.MISSING_XSLT_TARGET_ERR,
  +        "Could not find stylesheet target ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.NOT_IMPLEMENTED_ERR,
  +        "Not implemented: ''{0}''."},
  +
  +        /*
  +         * Note to translators:  The XML document given to XSLTC as a stylesheet
  +         * was not, in fact, a stylesheet.
  +         */
  +        {ErrorMsg.NOT_STYLESHEET_ERR,
  +        "The input document does not contain an XSL stylesheet."},
  +
  +        /*
  +         * Note to translators:  The element named in the substitution text was
  +         * encountered in the stylesheet but is not recognized.
  +         */
  +        {ErrorMsg.ELEMENT_PARSE_ERR,
  +        "Could not parse element ''{0}''"},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.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.
  +         */
  +        {ErrorMsg.OUTPUT_VERSION_ERR,
  +        "Output XML document version should be 1.0"},
  +
  +        /*
  +         * Note to translators:  The operator in a comparison operation was
  +         * not recognized.
  +         */
  +        {ErrorMsg.ILLEGAL_RELAT_OP_ERR,
  +        "Unknown operator for relational expression"},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.ATTRIBSET_UNDEF_ERR,
  +        "Attempting to use non-existing attribute set ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.ATTR_VAL_TEMPLATE_ERR,
  +        "Cannot parse attribute value template ''{0}''."},
  +
  +        /*
  +         * Note to translators:  ???
  +         */
  +        {ErrorMsg.UNKNOWN_SIG_TYPE_ERR,
  +        "Unknown data-type in signature for class ''{0}''."},
  +
  +        /*
  +         * 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}.
  +         */
  +        {ErrorMsg.DATA_CONVERSION_ERR,
  +        "Cannot convert data-type ''{0}'' to ''{1}''."},
  +
  +        /*
  +         * Note to translators:  "Templates" is a Java class name that should
  +         * not be translated.
  +         */
  +        {ErrorMsg.NO_TRANSLET_CLASS_ERR,
  +        "This Templates does not contain a valid translet class definition."},
  +
  +        /*
  +         * Note to translators:  "Templates" is a Java class name that should
  +         * not be translated.
  +         */
  +        {ErrorMsg.NO_MAIN_TRANSLET_ERR,
  +        "This Templates does not contain a class with the name ''{0}''."},
  +
  +        /*
  +         * Note to translators:  The substitution text is the name of a class.
  +         */
  +        {ErrorMsg.TRANSLET_CLASS_ERR,
  +        "Could not load the translet class ''{0}''."},
  +
  +        {ErrorMsg.TRANSLET_OBJECT_ERR,
  +        "Translet class loaded, but unable to create translet instance."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.ERROR_LISTENER_NULL_ERR,
  +        "Attempting to set ErrorListener for ''{0}'' to null"},
  +
  +        /*
  +         * Note to translators:  StreamSource, SAXSource and DOMSource are Java
  +         * interface names that should not be translated.
  +         */
  +        {ErrorMsg.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.
  +         */
  +        {ErrorMsg.JAXP_NO_SOURCE_ERR,
  +        "Source object passed to ''{0}'' has no contents."},
  +
  +        /*
  +         * Note to translators:  The message indicates that XSLTC failed to
  +         * compile the stylesheet into a translet (class file).
  +         */
  +        {ErrorMsg.JAXP_COMPILE_ERR,
  +        "Could not compile stylesheet"},
  +
  +        /*
  +         * 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".
  +         */
  +        {ErrorMsg.JAXP_INVALID_ATTR_ERR,
  +        "TransformerFactory does not recognise attribute ''{0}''."},
  +
  +        /*
  +         * Note to translators:  "setResult()" and "startDocument()" are Java
  +         * method names that should not be translated.
  +         */
  +        {ErrorMsg.JAXP_SET_RESULT_ERR,
  +        "setResult() must be called prior to startDocument()."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.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.
  +         */
  +        {ErrorMsg.JAXP_NO_HANDLER_ERR,
  +        "No defined output handler for transformation result."},
  +
  +        /*
  +         * Note to translators:  "Result" is a Java interface name in this
  +         * context.  The substitution text is a method name.
  +         */
  +        {ErrorMsg.JAXP_NO_RESULT_ERR,
  +        "Result object passed to ''{0}'' is invalid."},
  +
  +        /*
  +         * 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".
  +         */
  +        {ErrorMsg.JAXP_UNKNOWN_PROP_ERR,
  +        "Attempting to access invalid Transformer property ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.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".
  +         */
  +        {ErrorMsg.XSLTC_SOURCE_ERR,
  +        "XSLTCSource.build() called without systemId being set."},
  +
  +
  +        {ErrorMsg.COMPILE_STDIN_ERR,
  +        "The -i option must be used with the -o option."},
  +
  +
  +        /*
  +         * Note to translators:  This message contains usage information for a
  +         * means of invoking XSLTC from the command-line.  The message is
            * formatted for presentation in English.  The strings <output>,
            * <directory>, etc. indicate user-specified argument values, and can
            * be translated - the argument <package> refers to a Java package, so
            * it should be handled in the same way the term is handled for JDK
            * documentation.
  -	 */
  -	//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"+
  -	"   -j <jarfile>   packages translet classes into a jar file of the\n"+
  -	"                  name specified as <jarfile>\n"+
  -	"   -p <package>   specifies a package name prefix for all generated\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",
  -
  -	/*
  -	 * Note to translators:  This message contains usage information for a
  -	 * means of invoking XSLTC from the command-line.  The message is
  +         */
  +        {ErrorMsg.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"+
  +        "   -j <jarfile>   packages translet classes into a jar file of the\n"+
  +        "                  name specified as <jarfile>\n"+
  +        "   -p <package>   specifies a package name prefix for all generated\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"},
  +
  +        /*
  +         * Note to translators:  This message contains usage information for a
  +         * means of invoking XSLTC from the command-line.  The message is
            * formatted for presentation in English.  The strings <jarfile>,
            * <document>, etc. indicate user-specified argument values, and can
            * be translated - the argument <class> refers to a Java class, so it
            * should be handled in the same way the term is handled for JDK
            * documentation.
  -	 */
  -	//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"+
  -	"   specified as <document>. The translet <class> is either in\n"+
  -	"   the user's CLASSPATH or in the optionally specified <jarfile>.\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",
  -
  -
  -
  -	/*
  -	 * 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>.",
  -
  -	/*
  -	 * 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.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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}''.",
  -
  -	/*
  -	 * 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_UNK_LOC_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.  The spacing before the second substitution text indents
  +         */
  +        {ErrorMsg.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"+
  +        "   specified as <document>. The translet <class> is either in\n"+
  +        "   the user's CLASSPATH or in the optionally specified <jarfile>.\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"},
  +
  +
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.STRAY_SORT_ERR,
  +        "<xsl:sort> can only be used within <xsl:for-each> or <xsl:apply-templates>."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.UNSUPPORTED_ENCODING,
  +        "Output encoding ''{0}'' is not supported on this JVM."},
  +
  +        /*
  +         * Note to translators:  The message indicates that the XPath expression
  +         * named in the substitution text was not well formed syntactically.
  +         */
  +        {ErrorMsg.SYNTAX_ERR,
  +        "Syntax error in ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.CONSTRUCTOR_NOT_FOUND,
  +        "Cannot find external constructor ''{0}''."},
  +
  +        /*
  +         * 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.
  +         */
  +        {ErrorMsg.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.
  +         */
  +        {ErrorMsg.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.
  +         */
  +        {ErrorMsg.TYPE_CHECK_UNK_LOC_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.
  +         */
  +        {ErrorMsg.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.
  +         */
  +        {ErrorMsg.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.  The spacing before the second substitution text indents
            * it the same amount as the first in English.
  -	 */
  -	//WARNING_PLUS_WRAPPED_MSG
  -	"WARNING:  ''{0}''\n       :{1}",
  +         */
  +        {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
  +        "WARNING:  ''{0}''\n       :{1}"},
   
  -	/*
  -	 * Note to translators:  This message is used to indicate the severity
  +        /*
  +         * 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.  The spacing before the second substitution text indents
  +         */
  +        {ErrorMsg.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.  The spacing before the second substitution text indents
            * it the same amount as the first in English.
  -	 */
  -	//FATAL_ERR_PLUS_WRAPPED_MSG
  -	"FATAL ERROR:  ''{0}''\n           :{1}",
  +         */
  +        {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
  +        "FATAL ERROR:  ''{0}''\n           :{1}"},
   
  -	/*
  -	 * Note to translators:  This message is used to indicate the severity
  +        /*
  +         * 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.  The spacing before the second substitution text indents
  +         */
  +        {ErrorMsg.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.  The spacing before the second substitution text indents
            * it the same amount as the first in English.
  -	 */
  -	//ERROR_PLUS_WRAPPED_MSG
  -	"ERROR:  ''{0}''\n     :{1}",
  +         */
  +        {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
  +        "ERROR:  ''{0}''\n     :{1}"},
   
  -	/*
  -	 * Note to translators:  This message is used to indicate the severity
  +        /*
  +         * 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}''",
  -	
  -	/*
  -	 * Note to translators:  The substitution text is the name of a class.
  -	 */
  -	//TRANSFORM_WITH_TRANSLET_STR
  -	"Transform using translet ''{0}'' ",
  +         */
  +        {ErrorMsg.ERROR_MSG,
  +        "ERROR:  ''{0}''"},
  +        
  +        /*
  +         * Note to translators:  The substitution text is the name of a class.
  +         */
  +        {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR,
  +        "Transform using translet ''{0}'' "},
   
  -	/*
  -	 * Note to translators:  The first substitution is the name of a class,
  +        /*
  +         * Note to translators:  The first substitution is the name of a class,
            * while the second substitution is the name of a jar file.
  -	 */
  -	//TRANSFORM_WITH_JAR_STR
  -	"Transform using translet ''{0}'' from jar file ''{1}''",
  +         */
  +        {ErrorMsg.TRANSFORM_WITH_JAR_STR,
  +        "Transform using translet ''{0}'' from jar file ''{1}''"},
   
           /*
  -	 * Note to translators:  "TransformerFactory" is the name of a Java
  +         * Note to translators:  "TransformerFactory" is the name of a Java
            * interface and must not be translated.  The substitution text is
            * the name of the class that could not be instantiated.
  -	 */
  -        //COULD_NOT_CREATE_TRANS_FACT
  -        "Could not create an instance of the TransformerFactory class ''{0}''."
  -    };
  +         */
  +        {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT,
  +        "Could not create an instance of the TransformerFactory class ''{0}''."},
   
  -    private static Vector _keys;
  +        /*
  +         * Note to translators:  The following message is used as a header.
  +         * All the error messages are collected together and displayed beneath
  +         * this message.
  +         */
  +        {ErrorMsg.COMPILER_ERROR_KEY,
  +        "Compiler errors:"},
   
  -    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);
  -    }
  +        /*
  +         * Note to translators:  The following message is used as a header.
  +         * All the warning messages are collected together and displayed
  +         * beneath this message.
  +         */
  +        {ErrorMsg.COMPILER_WARNING_KEY,
  +        "Compiler warnings:"},
   
  -    public Enumeration getKeys() {
  -	return _keys.elements();
  -    }
  +        /*
  +         * Note to translators:  The following message is used as a header.
  +         * All the error messages that are produced when the stylesheet is
  +         * applied to an input document are collected together and displayed
  +         * beneath this message.  A 'translet' is the compiled form of a
  +         * stylesheet (see above).
  +         */
  +        {ErrorMsg.RUNTIME_ERROR_KEY,
  +        "Translet errors:"}
  +    };
   
  -    public Object handleGetObject(String key) {
  -	if (key == null) return null;
  -	if (key.equals(ErrorMsg.ERROR_MESSAGES_KEY))
  -	    return errorMessages;
  - 	else if (key.equals(ErrorMsg.COMPILER_ERROR_KEY))
  -	    return "Compiler error(s): ";
  -	else if (key.equals(ErrorMsg.COMPILER_WARNING_KEY))
  -	    return "Compiler warning(s): ";	    
  - 	else if (key.equals(ErrorMsg.RUNTIME_ERROR_KEY))
  -	    return "Translet error(s): ";
  -	return(null);
  -    }
   
  +    public Object[][] getContents() {
  +        return m_errorMessages;
  +    }
   }
  
  
  
  1.9       +161 -171  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ErrorMessages_no.java	30 Jan 2003 18:46:09 -0000	1.8
  +++ ErrorMessages_no.java	19 Mar 2003 22:14:09 -0000	1.9
  @@ -66,157 +66,157 @@
   public final class ErrorMessages_no extends ErrorMessages {
       
       // Disse feilmeldingene maa korrespondere med konstantene som er definert
  -    // i kildekoden til ErrorMsg.
  -    private static final String errorMessages[] = { 
  -	// MULTIPLE_STYLESHEET_ERR
  -	"En fil kan bare innehold ett stilark.",
  -	// TEMPLATE_REDEF_ERR	
  -	"<xsl:template> ''{0}'' er allerede definert i dette stilarket.",
  -	// TEMPLATE_UNDEF_ERR
  -	"<xsl:template> ''{0}'' er ikke definert i dette stilarket.",
  -	// VARIABLE_REDEF_ERR	
  -	"Variabel ''{0}'' er allerede definert.",
  -	// VARIABLE_UNDEF_ERR
  -	"Variabel eller parameter ''{0}'' er ikke definert.",
  -	// CLASS_NOT_FOUND_ERR
  -	"Finner ikke klassen ''{0}''.",
  -	// METHOD_NOT_FOUND_ERR
  -	"Finner ikke ekstern funksjon ''{0}'' (m\u00e5 v\00e6re deklarert b\u00e5de 'static' og 'public').",
  -	// ARGUMENT_CONVERSION_ERR
  -	"Kan ikke konvertere argument/retur type i kall til funksjon ''{0}''",
  -	// FILE_NOT_FOUND_ERR
  -	"Finner ikke fil eller URI ''{0}''.",
  -	// INVALID_URI_ERR
  -	"Ugyldig URI ''{0}''.",
  -	// FILE_ACCESS_ERR
  -	"Kan ikke \u00e5pne fil eller URI ''{0}''.",
  -	// MISSING_ROOT_ERR
  -	"Forvented <xsl:stylesheet> eller <xsl:transform> element.",
  -	// NAMESPACE_UNDEF_ERR
  -	"Prefiks ''{0}'' er ikke deklarert.",
  -	// FUNCTION_RESOLVE_ERR
  -	"Kunne ikke resolvere kall til funksjon ''{0}''.",
  -	// NEED_LITERAL_ERR
  -	"Argument til ''{0}'' m\u00e5 v\00e6re ordrett tekst.",
  -	// XPATH_PARSER_ERR
  -	"Kunne ikke tolke XPath uttrykk ''{0}''.",
  -	// REQUIRED_ATTR_ERR
  -	"N\u00f8dvendig attributt ''{0}'' er ikke deklarert.",
  -	// ILLEGAL_CHAR_ERR
  -	"Ugyldig bokstav/tegn ''{0}'' i XPath uttrykk.",
  -	// ILLEGAL_PI_ERR
  -	"Ugyldig navn ''{0}'' for prosesserings-instruksjon.",
  -	// STRAY_ATTRIBUTE_ERR
  -	"Attributt ''{0}'' utenfor element.",
  -	// ILLEGAL_ATTRIBUTE_ERR
  -	"Ugyldig attributt ''{0}''.",
  -	// CIRCULAR_INCLUDE_ERR
  -	"Sirkul \00e6 import/include; stilark ''{0}'' er alt lest.",
  -	// RESULT_TREE_SORT_ERR
  +    // i kildekoden til {ErrorMsg.
  +    private static final String m_errorMessages[][] = { 
  +	{ErrorMsg.MULTIPLE_STYLESHEET_ERR,
  +	"En fil kan bare innehold ett stilark."},
  +	{ErrorMsg.TEMPLATE_REDEF_ERR,	
  +	"<xsl:template> ''{0}'' er allerede definert i dette stilarket."},
  +	{ErrorMsg.TEMPLATE_UNDEF_ERR,
  +	"<xsl:template> ''{0}'' er ikke definert i dette stilarket."},
  +	{ErrorMsg.VARIABLE_REDEF_ERR,	
  +	"Variabel ''{0}'' er allerede definert."},
  +	{ErrorMsg.VARIABLE_UNDEF_ERR,
  +	"Variabel eller parameter ''{0}'' er ikke definert."},
  +	{ErrorMsg.CLASS_NOT_FOUND_ERR,
  +	"Finner ikke klassen ''{0}''."},
  +	{ErrorMsg.METHOD_NOT_FOUND_ERR,
  +	"Finner ikke ekstern funksjon ''{0}'' (m\u00e5 v\00e6re deklarert b\u00e5de 'static' og 'public')."},
  +	{ErrorMsg.ARGUMENT_CONVERSION_ERR,
  +	"Kan ikke konvertere argument/retur type i kall til funksjon ''{0}''"},
  +	{ErrorMsg.FILE_NOT_FOUND_ERR,
  +	"Finner ikke fil eller URI ''{0}''."},
  +	{ErrorMsg.INVALID_URI_ERR,
  +	"Ugyldig URI ''{0}''."},
  +	{ErrorMsg.FILE_ACCESS_ERR,
  +	"Kan ikke \u00e5pne fil eller URI ''{0}''."},
  +	{ErrorMsg.MISSING_ROOT_ERR,
  +	"Forvented <xsl:stylesheet> eller <xsl:transform> element."},
  +	{ErrorMsg.NAMESPACE_UNDEF_ERR,
  +	"Prefiks ''{0}'' er ikke deklarert."},
  +	{ErrorMsg.FUNCTION_RESOLVE_ERR,
  +	"Kunne ikke resolvere kall til funksjon ''{0}''."},
  +	{ErrorMsg.NEED_LITERAL_ERR,
  +	"Argument til ''{0}'' m\u00e5 v\00e6re ordrett tekst."},
  +	{ErrorMsg.XPATH_PARSER_ERR,
  +	"Kunne ikke tolke XPath uttrykk ''{0}''."},
  +	{ErrorMsg.REQUIRED_ATTR_ERR,
  +	"N\u00f8dvendig attributt ''{0}'' er ikke deklarert."},
  +	{ErrorMsg.ILLEGAL_CHAR_ERR,
  +	"Ugyldig bokstav/tegn ''{0}'' i XPath uttrykk."},
  +	{ErrorMsg.ILLEGAL_PI_ERR,
  +	"Ugyldig navn ''{0}'' for prosesserings-instruksjon."},
  +	{ErrorMsg.STRAY_ATTRIBUTE_ERR,
  +	"Attributt ''{0}'' utenfor element."},
  +	{ErrorMsg.ILLEGAL_ATTRIBUTE_ERR,
  +	"Ugyldig attributt ''{0}''."},
  +	{ErrorMsg.CIRCULAR_INCLUDE_ERR,
  +	"Sirkul \00e6 import/include; stilark ''{0}'' er alt lest."},
  +	{ErrorMsg.RESULT_TREE_SORT_ERR,
   	"Result-tre fragmenter kan ikke sorteres (<xsl:sort> elementer vil "+
  -	"bli ignorert). Du m\u00e5 sortere nodene mens du bygger treet.",
  -	// SYMBOLS_REDEF_ERR
  -	"Formatterings-symboler ''{0}'' er alt definert.",
  -	// XSL_VERSION_ERR
  -	"XSL versjon ''{0}'' er ikke st\u00f8ttet av XSLTC.",
  -	// CIRCULAR_VARIABLE_ERR
  -	"Sirkul\00e6r variabel/parameter referanse i ''{0}''.",
  -	// ILLEGAL_BINARY_OP_ERR
  -	"Ugyldig operator for bin\00e6rt uttrykk.",
  -	// ILLEGAL_ARG_ERR
  -	"Ugyldig parameter i funksjons-kall.",
  -	// DOCUMENT_ARG_ERR
  -	"Andre argument til document() m\u00e5 v\00e6re et node-sett.",
  -	// MISSING_WHEN_ERR
  -	"Du m\u00e5 deklarere minst ett <xsl:when> element innenfor <xsl:choose>.",
  -	// MULTIPLE_OTHERWISE_ERR
  -	"Kun ett <xsl:otherwise> element kan deklareres innenfor <xsl:choose>.",
  -	// STRAY_OTHERWISE_ERR
  -	"<xsl:otherwise> kan kun benyttes innenfor <xsl:choose>.",
  -	// STRAY_WHEN_ERR
  -	"<xsl:when> kan kun benyttes innenfor <xsl:choose>.",
  -	// WHEN_ELEMENT_ERR	
  -	"Kun <xsl:when> og <xsl:otherwise> kan benyttes innenfor <xsl:choose>.",
  -	// UNNAMED_ATTRIBSET_ERR
  -	"<xsl:attribute-set> element manger 'name' attributt.",
  -	// ILLEGAL_CHILD_ERR
  -	"Ugyldig element.",
  -	// ILLEGAL_ELEM_NAME_ERR
  -	"''{0}'' er ikke et gyldig navn for et element.",
  -	// ILLEGAL_ATTR_NAME_ERR
  -	"''{0}'' er ikke et gyldig navn for et attributt.",
  -	// ILLEGAL_TEXT_NODE_ERR
  -	"Du kan ikke plassere tekst utenfor et <xsl:stylesheet> element.",
  -	// SAX_PARSER_CONFIG_ERR
  -	"JAXP parser er ikke korrekt konfigurert.",
  -	// INTERNAL_ERR
  -	"XSLTC-intern feil: ''{0}''",
  -	// UNSUPPORTED_XSL_ERR
  -	"St\u00f8tter ikke XSL element ''{0}''.",
  -	// UNSUPPORTED_EXT_ERR
  -	"XSLTC st\u00f8tter ikke utvidet funksjon ''{0}''.",
  -	// MISSING_XSLT_URI_ERR
  +	"bli ignorert). Du m\u00e5 sortere nodene mens du bygger treet."},
  +	{ErrorMsg.SYMBOLS_REDEF_ERR,
  +	"Formatterings-symboler ''{0}'' er alt definert."},
  +	{ErrorMsg.XSL_VERSION_ERR,
  +	"XSL versjon ''{0}'' er ikke st\u00f8ttet av XSLTC."},
  +	{ErrorMsg.CIRCULAR_VARIABLE_ERR,
  +	"Sirkul\00e6r variabel/parameter referanse i ''{0}''."},
  +	{ErrorMsg.ILLEGAL_BINARY_OP_ERR,
  +	"Ugyldig operator for bin\00e6rt uttrykk."},
  +	{ErrorMsg.ILLEGAL_ARG_ERR,
  +	"Ugyldig parameter i funksjons-kall."},
  +	{ErrorMsg.DOCUMENT_ARG_ERR,
  +	"Andre argument til document() m\u00e5 v\00e6re et node-sett."},
  +	{ErrorMsg.MISSING_WHEN_ERR,
  +	"Du m\u00e5 deklarere minst ett <xsl:when> element innenfor <xsl:choose>."},
  +	{ErrorMsg.MULTIPLE_OTHERWISE_ERR,
  +	"Kun ett <xsl:otherwise> element kan deklareres innenfor <xsl:choose>."},
  +	{ErrorMsg.STRAY_OTHERWISE_ERR,
  +	"<xsl:otherwise> kan kun benyttes innenfor <xsl:choose>."},
  +	{ErrorMsg.STRAY_WHEN_ERR,
  +	"<xsl:when> kan kun benyttes innenfor <xsl:choose>."},
  +	{ErrorMsg.WHEN_ELEMENT_ERR,	
  +	"Kun <xsl:when> og <xsl:otherwise> kan benyttes innenfor <xsl:choose>."},
  +	{ErrorMsg.UNNAMED_ATTRIBSET_ERR,
  +	"<xsl:attribute-set> element manger 'name' attributt."},
  +	{ErrorMsg.ILLEGAL_CHILD_ERR,
  +	"Ugyldig element."},
  +	{ErrorMsg.ILLEGAL_ELEM_NAME_ERR,
  +	"''{0}'' er ikke et gyldig navn for et element."},
  +	{ErrorMsg.ILLEGAL_ATTR_NAME_ERR,
  +	"''{0}'' er ikke et gyldig navn for et attributt."},
  +	{ErrorMsg.ILLEGAL_TEXT_NODE_ERR,
  +	"Du kan ikke plassere tekst utenfor et <xsl:stylesheet> element."},
  +	{ErrorMsg.SAX_PARSER_CONFIG_ERR,
  +	"JAXP parser er ikke korrekt konfigurert."},
  +	{ErrorMsg.INTERNAL_ERR,
  +	"XSLTC-intern feil: ''{0}''"},
  +	{ErrorMsg.UNSUPPORTED_XSL_ERR,
  +	"St\u00f8tter ikke XSL element ''{0}''."},
  +	{ErrorMsg.UNSUPPORTED_EXT_ERR,
  +	"XSLTC st\u00f8tter ikke utvidet funksjon ''{0}''."},
  +	{ErrorMsg.MISSING_XSLT_URI_ERR,
   	"Dette dokumentet er ikke et XSL stilark "+
  -	"(xmlns:xsl='http://www.w3.org/1999/XSL/Transform' er ikke deklarert).",
  -	// MISSING_XSLT_TARGET_ERR
  -	"Kan ikke finne stilark ved navn ''{0}'' i dette dokumentet.",
  -	// NOT_IMPLEMENTED_ERR
  -	"Ikke implementert/gjenkjent: ''{0}''.",
  -	// NOT_STYLESHEET_ERR
  -	"Dokumentet inneholder ikke et XSL stilark",
  -	// ELEMENT_PARSE_ERR
  -	"Kan ikke tolke element ''{0}''",
  -	// KEY_USE_ATTR_ERR
  -	"'use'-attributtet i <xsl:key> m\u00e5 v\00e6re node, node-sett, tekst eller nummer.",
  -	// OUTPUT_VERSION_ERR
  -	"Det genererte XML dokumentet m\u00e5 gis versjon 1.0",
  -	// ILLEGAL_RELAT_OP_ERR
  -	"Ugyldig operator for relasjons-uttrykk.",
  -	// ATTRIBSET_UNDEF_ERR
  -	"Finner ikke <xsl:attribute-set> element med navn ''{0}''.",
  -	// ATTR_VAL_TEMPLATE_ERR
  -	"Kan ikke tolke attributt ''{0}''.",
  -	// UNKNOWN_SIG_TYPE_ERR
  -	"Ukjent data-type i signatur for klassen ''{0}''.",
  -	// DATA_CONVERSION_ERR
  -	"Kan ikke oversette mellom data-type ''{0}'' og ''{1}''.",
  +	"(xmlns:xsl='http://www.w3.org/1999/XSL/Transform' er ikke deklarert)."},
  +	{ErrorMsg.MISSING_XSLT_TARGET_ERR,
  +	"Kan ikke finne stilark ved navn ''{0}'' i dette dokumentet."},
  +	{ErrorMsg.NOT_IMPLEMENTED_ERR,
  +	"Ikke implementert/gjenkjent: ''{0}''."},
  +	{ErrorMsg.NOT_STYLESHEET_ERR,
  +	"Dokumentet inneholder ikke et XSL stilark"},
  +	{ErrorMsg.ELEMENT_PARSE_ERR,
  +	"Kan ikke tolke element ''{0}''"},
  +	{ErrorMsg.KEY_USE_ATTR_ERR,
  +	"'use'-attributtet i <xsl:key> m\u00e5 v\00e6re node, node-sett, tekst eller nummer."},
  +	{ErrorMsg.OUTPUT_VERSION_ERR,
  +	"Det genererte XML dokumentet m\u00e5 gis versjon 1.0"},
  +	{ErrorMsg.ILLEGAL_RELAT_OP_ERR,
  +	"Ugyldig operator for relasjons-uttrykk."},
  +	{ErrorMsg.ATTRIBSET_UNDEF_ERR,
  +	"Finner ikke <xsl:attribute-set> element med navn ''{0}''."},
  +	{ErrorMsg.ATTR_VAL_TEMPLATE_ERR,
  +	"Kan ikke tolke attributt ''{0}''."},
  +	{ErrorMsg.UNKNOWN_SIG_TYPE_ERR,
  +	"Ukjent data-type i signatur for klassen ''{0}''."},
  +	{ErrorMsg.DATA_CONVERSION_ERR,
  +	"Kan ikke oversette mellom data-type ''{0}'' og ''{1}''."},
   
  -	// NO_TRANSLET_CLASS_ERR
  -	"Dette Templates objected inneholder ingen translet klasse definisjon.",
  -	// NO_MAIN_TRANSLET_ERR
  -	"Dette Templates objected inneholder ingen klasse ved navn ''{0}''.",
  -	// TRANSLET_CLASS_ERR
  -	"Kan ikke laste translet-klasse ''{0}''.",
  -	// TRANSLET_OBJECT_ERR
  -	"Translet klassen er lastet man kan instansieres.",
  -	// ERROR_LISTENER_NULL_ERR
  -	"ErrorListener for ''{0}'' fors\u00f8kt satt til 'null'.",
  -	// JAXP_UNKNOWN_SOURCE_ERR
  -	"Kun StreamSource, SAXSource og DOMSOurce er st\u00f8ttet av XSLTC",
  -	// JAXP_NO_SOURCE_ERR
  -	"Source objekt sendt til ''{0}'' har intet innhold.",
  -	// JAXP_COMPILE_ERR
  -	"Kan ikke kompilere stilark.",
  -	// JAXP_INVALID_ATTR_ERR
  -	"TransformerFactory gjenkjenner ikke attributtet ''{0}''.",
  -	// JAXP_SET_RESULT_ERROR
  -	"setResult() m\u00e5 kalles f\u00f8r startDocument().",
  -	// JAXP_NO_TRANSLET_ERR
  -	"Transformer objektet inneholder ikken noen translet instans.",
  -	// JAXP_NO_HANDLER_ERR
  -	"Ingen 'handler' er satt for \u00e5 ta imot generert dokument.",
  -	// JAXP_NO_RESULT_ERR
  -	"Result objektet sendt til ''{0}'' er ikke gyldig.",
  -	// JAXP_UNKNOWN_PROP_ERR
  -	"Fors\u00f8ker \u00e5 lese ugyldig attributt ''{0}'' fra Transformer.",
  -	// SAX2DOM_ADAPTER_ERR
  -	"Kan ikke instansiere SAX2DOM adapter: ''{0}''.",
  -	// XSLTC_SOURCE_ERR
  -	"XSLTCSource.build() kalt uten at 'systemId' er definert.",
  +	{ErrorMsg.NO_TRANSLET_CLASS_ERR,
  +	"Dette Templates objected inneholder ingen translet klasse definisjon."},
  +	{ErrorMsg.NO_MAIN_TRANSLET_ERR,
  +	"Dette Templates objected inneholder ingen klasse ved navn ''{0}''."},
  +	{ErrorMsg.TRANSLET_CLASS_ERR,
  +	"Kan ikke laste translet-klasse ''{0}''."},
  +	{ErrorMsg.TRANSLET_OBJECT_ERR,
  +	"Translet klassen er lastet man kan instansieres."},
  +	{ErrorMsg.ERROR_LISTENER_NULL_ERR,
  +	"ErrorListener for ''{0}'' fors\u00f8kt satt til 'null'."},
  +	{ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR,
  +	"Kun StreamSource, SAXSource og DOMSOurce er st\u00f8ttet av XSLTC"},
  +	{ErrorMsg.JAXP_NO_SOURCE_ERR,
  +	"Source objekt sendt til ''{0}'' har intet innhold."},
  +	{ErrorMsg.JAXP_COMPILE_ERR,
  +	"Kan ikke kompilere stilark."},
  +	{ErrorMsg.JAXP_INVALID_ATTR_ERR,
  +	"TransformerFactory gjenkjenner ikke attributtet ''{0}''."},
  +	{ErrorMsg.JAXP_SET_RESULT_ERR,
  +	"setResult() m\u00e5 kalles f\u00f8r startDocument()."},
  +	{ErrorMsg.JAXP_NO_TRANSLET_ERR,
  +	"Transformer objektet inneholder ikken noen translet instans."},
  +	{ErrorMsg.JAXP_NO_HANDLER_ERR,
  +	"Ingen 'handler' er satt for \u00e5 ta imot generert dokument."},
  +	{ErrorMsg.JAXP_NO_RESULT_ERR,
  +	"Result objektet sendt til ''{0}'' er ikke gyldig."},
  +	{ErrorMsg.JAXP_UNKNOWN_PROP_ERR,
  +	"Fors\u00f8ker \u00e5 lese ugyldig attributt ''{0}'' fra Transformer."},
  +	{ErrorMsg.SAX2DOM_ADAPTER_ERR,
  +	"Kan ikke instansiere SAX2DOM adapter: ''{0}''."},
  +	{ErrorMsg.XSLTC_SOURCE_ERR,
  +	"XSLTCSource.build() kalt uten at 'systemId' er definert."},
   
  -	// COMPILE_STDIN_ERR
  -	"Du kan ikke bruke -i uten \u00e5 ogs\u00e5 angi klasse-navn med -o.",
  -	// COMPILE_USAGE_STR
  +	{ErrorMsg.COMPILE_STDIN_ERR,
  +	"Du kan ikke bruke -i uten \u00e5 ogs\u00e5 angi klasse-navn med -o."},
  +	{ErrorMsg.COMPILE_USAGE_STR,
   	"Bruk:\n" + 
   	"   xsltc [-o <klasse>] [-d <katalog>] [-j <arkiv>]\n"+
   	"         [-p <pakke>] [-x] [-s] [-u] <stilark>|-i\n\n"+
  @@ -230,8 +230,8 @@
   	"         -i tvinger kompilatoren til \u00e5 lese fra stdin.\n"+
   	"         -o ignoreres dersom flere enn ett silark kompileres.\n"+
   	"         -x sl\u00e5r p\u00e5 debug meldinger.\n"+
  -	"         -s blokkerer alle kall til System.exit().",
  -	// TRANSFORM_USAGE_STR
  +	"         -s blokkerer alle kall til System.exit()."},
  +	{ErrorMsg.TRANSFORM_USAGE_STR,
   	"Bruk: \n" +
   	"   xslt  [-j <arkiv>] {-u <url> | <dokument>} <klasse>\n"+
   	"         [<param>=<verdi> ...]\n\n" +
  @@ -241,27 +241,17 @@
   	"         <arkiv> er en JAR-fil som klassen leses fra.\n"+
   	"   Annet:\n"+
   	"         -x sl\u00e5r p\u00e5 debug meldinger.\n"+
  -	"         -s blokkerer alle kall til System.exit().",
  +	"         -s blokkerer alle kall til System.exit()."},
   
  -	// STRAY_SORT_ERR
  -	"<xsl:sort> kan bare brukes under <xsl:for-each> eller <xsl:apply-templates>.",
  -	// UNSUPPORTED_ENCODING
  -	"Karaktersett ''{0}'' er ikke st\u00f8ttet av denne JVM.",
  -	// SYNTAX_ERR
  -	"Syntax error in ''{0}''."  // TODO: How do you say "syntax error" in norwegian?
  +	{ErrorMsg.STRAY_SORT_ERR,
  +	"<xsl:sort> kan bare brukes under <xsl:for-each> eller <xsl:apply-templates>."},
  +	{ErrorMsg.UNSUPPORTED_ENCODING,
  +	"Karaktersett ''{0}'' er ikke st\u00f8ttet av denne JVM."},
  +	{ErrorMsg.SYNTAX_ERR,
  +	"Syntax error in ''{0}''."}  // TODO: How do you say "syntax error" in norwegian?
       };
   
  -    public Object handleGetObject(String key) {
  -	if (key == null) return null;
  -	if (key.equals(ErrorMsg.ERROR_MESSAGES_KEY))
  -	    return errorMessages;
  - 	else if (key.equals(ErrorMsg.COMPILER_ERROR_KEY))
  -	    return "Kompilator-feil: ";
  -	else if (key.equals(ErrorMsg.COMPILER_WARNING_KEY))
  -	    return "Advarsel : ";	    
  - 	else if (key.equals(ErrorMsg.RUNTIME_ERROR_KEY))
  -	    return "Kj\u00f8refeil: ";
  -	return(null);
  +    public Object[][] getContents() {
  +        return m_errorMessages;
       }
  -
   }
  
  
  
  1.20      +128 -133  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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ErrorMsg.java	30 Jan 2003 18:46:09 -0000	1.19
  +++ ErrorMsg.java	19 Mar 2003 22:14:09 -0000	1.20
  @@ -75,174 +75,170 @@
   
   public final class ErrorMsg {
   
  -    private int _code;
  +    private String _code;
       private int _line;
       private String _message = null;
       private String _url = null;
       Object[] _params = null;
   
       // Compiler error messages
  -    public static final int MULTIPLE_STYLESHEET_ERR = 0;
  -    public static final int TEMPLATE_REDEF_ERR      = 1;
  -    public static final int TEMPLATE_UNDEF_ERR      = 2;
  -    public static final int VARIABLE_REDEF_ERR      = 3;
  -    public static final int VARIABLE_UNDEF_ERR      = 4;
  -    public static final int CLASS_NOT_FOUND_ERR     = 5;
  -    public static final int METHOD_NOT_FOUND_ERR    = 6;
  -    public static final int ARGUMENT_CONVERSION_ERR = 7;
  -    public static final int FILE_NOT_FOUND_ERR      = 8;
  -    public static final int INVALID_URI_ERR         = 9;
  -    public static final int FILE_ACCESS_ERR         = 10;
  -    public static final int MISSING_ROOT_ERR        = 11;
  -    public static final int NAMESPACE_UNDEF_ERR     = 12;
  -    public static final int FUNCTION_RESOLVE_ERR    = 13;
  -    public static final int NEED_LITERAL_ERR        = 14;
  -    public static final int XPATH_PARSER_ERR        = 15;
  -    public static final int REQUIRED_ATTR_ERR       = 16;
  -    public static final int ILLEGAL_CHAR_ERR        = 17;
  -    public static final int ILLEGAL_PI_ERR          = 18;
  -    public static final int STRAY_ATTRIBUTE_ERR     = 19;
  -    public static final int ILLEGAL_ATTRIBUTE_ERR   = 20;
  -    public static final int CIRCULAR_INCLUDE_ERR    = 21;
  -    public static final int RESULT_TREE_SORT_ERR    = 22;
  -    public static final int SYMBOLS_REDEF_ERR       = 23;
  -    public static final int XSL_VERSION_ERR         = 24;
  -    public static final int CIRCULAR_VARIABLE_ERR   = 25;
  -    public static final int ILLEGAL_BINARY_OP_ERR   = 26;
  -    public static final int ILLEGAL_ARG_ERR         = 27;
  -    public static final int DOCUMENT_ARG_ERR        = 28;
  -    public static final int MISSING_WHEN_ERR        = 29;
  -    public static final int MULTIPLE_OTHERWISE_ERR  = 30;
  -    public static final int STRAY_OTHERWISE_ERR     = 31;
  -    public static final int STRAY_WHEN_ERR          = 32;
  -    public static final int WHEN_ELEMENT_ERR        = 33;
  -    public static final int UNNAMED_ATTRIBSET_ERR   = 34;
  -    public static final int ILLEGAL_CHILD_ERR       = 35;
  -    public static final int ILLEGAL_ELEM_NAME_ERR   = 36;
  -    public static final int ILLEGAL_ATTR_NAME_ERR   = 37;
  -    public static final int ILLEGAL_TEXT_NODE_ERR   = 38;
  -    public static final int SAX_PARSER_CONFIG_ERR   = 39;
  -    public static final int INTERNAL_ERR            = 40;
  -    public static final int UNSUPPORTED_XSL_ERR     = 41;
  -    public static final int UNSUPPORTED_EXT_ERR     = 42;
  -    public static final int MISSING_XSLT_URI_ERR    = 43;
  -    public static final int MISSING_XSLT_TARGET_ERR = 44;
  -    public static final int NOT_IMPLEMENTED_ERR     = 45;
  -    public static final int NOT_STYLESHEET_ERR      = 46;
  -    public static final int ELEMENT_PARSE_ERR       = 47;
  -    public static final int KEY_USE_ATTR_ERR        = 48;
  -    public static final int OUTPUT_VERSION_ERR      = 49;
  -    public static final int ILLEGAL_RELAT_OP_ERR    = 50;
  -    public static final int ATTRIBSET_UNDEF_ERR     = 51;
  -    public static final int ATTR_VAL_TEMPLATE_ERR   = 52;
  -    public static final int UNKNOWN_SIG_TYPE_ERR    = 53;
  -    public static final int DATA_CONVERSION_ERR     = 54;
  +    public static final String MULTIPLE_STYLESHEET_ERR = "MULTIPLE_STYLESHEET_ERR";
  +    public static final String TEMPLATE_REDEF_ERR = "TEMPLATE_REDEF_ERR";
  +    public static final String TEMPLATE_UNDEF_ERR = "TEMPLATE_UNDEF_ERR";
  +    public static final String VARIABLE_REDEF_ERR = "VARIABLE_REDEF_ERR";
  +    public static final String VARIABLE_UNDEF_ERR = "VARIABLE_UNDEF_ERR";
  +    public static final String CLASS_NOT_FOUND_ERR = "CLASS_NOT_FOUND_ERR";
  +    public static final String METHOD_NOT_FOUND_ERR = "METHOD_NOT_FOUND_ERR";
  +    public static final String ARGUMENT_CONVERSION_ERR = "ARGUMENT_CONVERSION_ERR";
  +    public static final String FILE_NOT_FOUND_ERR = "FILE_NOT_FOUND_ERR";
  +    public static final String INVALID_URI_ERR = "INVALID_URI_ERR";
  +    public static final String FILE_ACCESS_ERR = "FILE_ACCESS_ERR";
  +    public static final String MISSING_ROOT_ERR = "MISSING_ROOT_ERR";
  +    public static final String NAMESPACE_UNDEF_ERR = "NAMESPACE_UNDEF_ERR";
  +    public static final String FUNCTION_RESOLVE_ERR = "FUNCTION_RESOLVE_ERR";
  +    public static final String NEED_LITERAL_ERR = "NEED_LITERAL_ERR";
  +    public static final String XPATH_PARSER_ERR = "XPATH_PARSER_ERR";
  +    public static final String REQUIRED_ATTR_ERR = "REQUIRED_ATTR_ERR";
  +    public static final String ILLEGAL_CHAR_ERR = "ILLEGAL_CHAR_ERR";
  +    public static final String ILLEGAL_PI_ERR = "ILLEGAL_PI_ERR";
  +    public static final String STRAY_ATTRIBUTE_ERR = "STRAY_ATTRIBUTE_ERR";
  +    public static final String ILLEGAL_ATTRIBUTE_ERR = "ILLEGAL_ATTRIBUTE_ERR";
  +    public static final String CIRCULAR_INCLUDE_ERR = "CIRCULAR_INCLUDE_ERR";
  +    public static final String RESULT_TREE_SORT_ERR = "RESULT_TREE_SORT_ERR";
  +    public static final String SYMBOLS_REDEF_ERR = "SYMBOLS_REDEF_ERR";
  +    public static final String XSL_VERSION_ERR = "XSL_VERSION_ERR";
  +    public static final String CIRCULAR_VARIABLE_ERR = "CIRCULAR_VARIABLE_ERR";
  +    public static final String ILLEGAL_BINARY_OP_ERR = "ILLEGAL_BINARY_OP_ERR";
  +    public static final String ILLEGAL_ARG_ERR = "ILLEGAL_ARG_ERR";
  +    public static final String DOCUMENT_ARG_ERR = "DOCUMENT_ARG_ERR";
  +    public static final String MISSING_WHEN_ERR = "MISSING_WHEN_ERR";
  +    public static final String MULTIPLE_OTHERWISE_ERR = "MULTIPLE_OTHERWISE_ERR";
  +    public static final String STRAY_OTHERWISE_ERR = "STRAY_OTHERWISE_ERR";
  +    public static final String STRAY_WHEN_ERR = "STRAY_WHEN_ERR";
  +    public static final String WHEN_ELEMENT_ERR = "WHEN_ELEMENT_ERR";
  +    public static final String UNNAMED_ATTRIBSET_ERR = "UNNAMED_ATTRIBSET_ERR";
  +    public static final String ILLEGAL_CHILD_ERR = "ILLEGAL_CHILD_ERR";
  +    public static final String ILLEGAL_ELEM_NAME_ERR = "ILLEGAL_ELEM_NAME_ERR";
  +    public static final String ILLEGAL_ATTR_NAME_ERR = "ILLEGAL_ATTR_NAME_ERR";
  +    public static final String ILLEGAL_TEXT_NODE_ERR = "ILLEGAL_TEXT_NODE_ERR";
  +    public static final String SAX_PARSER_CONFIG_ERR = "SAX_PARSER_CONFIG_ERR";
  +    public static final String INTERNAL_ERR = "INTERNAL_ERR";
  +    public static final String UNSUPPORTED_XSL_ERR = "UNSUPPORTED_XSL_ERR";
  +    public static final String UNSUPPORTED_EXT_ERR = "UNSUPPORTED_EXT_ERR";
  +    public static final String MISSING_XSLT_URI_ERR = "MISSING_XSLT_URI_ERR";
  +    public static final String MISSING_XSLT_TARGET_ERR = "MISSING_XSLT_TARGET_ERR";
  +    public static final String NOT_IMPLEMENTED_ERR = "NOT_IMPLEMENTED_ERR";
  +    public static final String NOT_STYLESHEET_ERR = "NOT_STYLESHEET_ERR";
  +    public static final String ELEMENT_PARSE_ERR = "ELEMENT_PARSE_ERR";
  +    public static final String KEY_USE_ATTR_ERR = "KEY_USE_ATTR_ERR";
  +    public static final String OUTPUT_VERSION_ERR = "OUTPUT_VERSION_ERR";
  +    public static final String ILLEGAL_RELAT_OP_ERR = "ILLEGAL_RELAT_OP_ERR";
  +    public static final String ATTRIBSET_UNDEF_ERR = "ATTRIBSET_UNDEF_ERR";
  +    public static final String ATTR_VAL_TEMPLATE_ERR = "ATTR_VAL_TEMPLATE_ERR";
  +    public static final String UNKNOWN_SIG_TYPE_ERR = "UNKNOWN_SIG_TYPE_ERR";
  +    public static final String DATA_CONVERSION_ERR = "DATA_CONVERSION_ERR";
   
       // JAXP/TrAX error messages
  -    public static final int NO_TRANSLET_CLASS_ERR   = 55;
  -    public static final int NO_MAIN_TRANSLET_ERR    = 56;
  -    public static final int TRANSLET_CLASS_ERR      = 57;
  -    public static final int TRANSLET_OBJECT_ERR     = 58;
  -    public static final int ERROR_LISTENER_NULL_ERR = 59;
  -    public static final int JAXP_UNKNOWN_SOURCE_ERR = 60;
  -    public static final int JAXP_NO_SOURCE_ERR      = 61;
  -    public static final int JAXP_COMPILE_ERR        = 62;
  -    public static final int JAXP_INVALID_ATTR_ERR   = 63;
  -    public static final int JAXP_SET_RESULT_ERR     = 64;
  -    public static final int JAXP_NO_TRANSLET_ERR    = 65;
  -    public static final int JAXP_NO_HANDLER_ERR     = 66;
  -    public static final int JAXP_NO_RESULT_ERR      = 67;
  -    public static final int JAXP_UNKNOWN_PROP_ERR   = 68;
  -    public static final int SAX2DOM_ADAPTER_ERR     = 69;
  -    public static final int XSLTC_SOURCE_ERR        = 70;
  +    public static final String NO_TRANSLET_CLASS_ERR = "NO_TRANSLET_CLASS_ERR";
  +    public static final String NO_MAIN_TRANSLET_ERR = "NO_MAIN_TRANSLET_ERR";
  +    public static final String TRANSLET_CLASS_ERR = "TRANSLET_CLASS_ERR";
  +    public static final String TRANSLET_OBJECT_ERR = "TRANSLET_OBJECT_ERR";
  +    public static final String ERROR_LISTENER_NULL_ERR = "ERROR_LISTENER_NULL_ERR";
  +    public static final String JAXP_UNKNOWN_SOURCE_ERR = "JAXP_UNKNOWN_SOURCE_ERR";
  +    public static final String JAXP_NO_SOURCE_ERR = "JAXP_NO_SOURCE_ERR";
  +    public static final String JAXP_COMPILE_ERR = "JAXP_COMPILE_ERR";
  +    public static final String JAXP_INVALID_ATTR_ERR = "JAXP_INVALID_ATTR_ERR";
  +    public static final String JAXP_SET_RESULT_ERR = "JAXP_SET_RESULT_ERR";
  +    public static final String JAXP_NO_TRANSLET_ERR = "JAXP_NO_TRANSLET_ERR";
  +    public static final String JAXP_NO_HANDLER_ERR = "JAXP_NO_HANDLER_ERR";
  +    public static final String JAXP_NO_RESULT_ERR = "JAXP_NO_RESULT_ERR";
  +    public static final String JAXP_UNKNOWN_PROP_ERR = "JAXP_UNKNOWN_PROP_ERR";
  +    public static final String SAX2DOM_ADAPTER_ERR = "SAX2DOM_ADAPTER_ERR";
  +    public static final String XSLTC_SOURCE_ERR = "XSLTC_SOURCE_ERR";
   
       // Command-line error messages
  -    public static final int COMPILE_STDIN_ERR       = 71;
  -    public static final int COMPILE_USAGE_STR       = 72;
  -    public static final int TRANSFORM_USAGE_STR     = 73;
  +    public static final String COMPILE_STDIN_ERR = "COMPILE_STDIN_ERR";
  +    public static final String COMPILE_USAGE_STR = "COMPILE_USAGE_STR";
  +    public static final String TRANSFORM_USAGE_STR = "TRANSFORM_USAGE_STR";
   
       // 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 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;
  -    public static final int TRANSFORM_WITH_TRANSLET_STR = 89;
  -    public static final int TRANSFORM_WITH_JAR_STR      = 90;
  +    public static final String STRAY_SORT_ERR = "STRAY_SORT_ERR";
  +    public static final String UNSUPPORTED_ENCODING = "UNSUPPORTED_ENCODING";
  +    public static final String SYNTAX_ERR = "SYNTAX_ERR";
  +    public static final String CONSTRUCTOR_NOT_FOUND = "CONSTRUCTOR_NOT_FOUND";
  +    public static final String NO_JAVA_FUNCT_THIS_REF = "NO_JAVA_FUNCT_THIS_REF";
  +    public static final String TYPE_CHECK_ERR = "TYPE_CHECK_ERR";
  +    public static final String TYPE_CHECK_UNK_LOC_ERR = "TYPE_CHECK_UNK_LOC_ERR";
  +    public static final String ILLEGAL_CMDLINE_OPTION_ERR = "ILLEGAL_CMDLINE_OPTION_ERR";
  +    public static final String CMDLINE_OPT_MISSING_ARG_ERR = "CMDLINE_OPT_MISSING_ARG_ERR";
  +    public static final String WARNING_PLUS_WRAPPED_MSG = "WARNING_PLUS_WRAPPED_MSG";
  +    public static final String WARNING_MSG = "WARNING_MSG";
  +    public static final String FATAL_ERR_PLUS_WRAPPED_MSG = "FATAL_ERR_PLUS_WRAPPED_MSG";
  +    public static final String FATAL_ERR_MSG = "FATAL_ERR_MSG";
  +    public static final String ERROR_PLUS_WRAPPED_MSG = "ERROR_PLUS_WRAPPED_MSG";
  +    public static final String ERROR_MSG = "ERROR_MSG";
  +    public static final String TRANSFORM_WITH_TRANSLET_STR = "TRANSFORM_WITH_TRANSLET_STR";
  +    public static final String TRANSFORM_WITH_JAR_STR = "TRANSFORM_WITH_JAR_STR";
  +    public static final String COULD_NOT_CREATE_TRANS_FACT = "COULD_NOT_CREATE_TRANS_FACT";
       
       // All error messages are localized and are stored in resource bundles.
       // This array and the following 4 strings are read from that bundle.
  -    private static String[] _errorMessages;
  -    private static String   _compileError;
  -    private static String   _compileWarning;
  -    private static String   _runtimeError;
  +    private static ResourceBundle _bundle;
       
  -    public final static String ERROR_MESSAGES_KEY   = "error-messages";
  -    public final static String COMPILER_ERROR_KEY   = "compile-error";
  -    public final static String COMPILER_WARNING_KEY = "compile-warning";
  -    public final static String RUNTIME_ERROR_KEY    = "runtime-error";
  +    public final static String ERROR_MESSAGES_KEY   = "ERROR_MESSAGES_KEY";
  +    public final static String COMPILER_ERROR_KEY   = "COMPILER_ERROR_KEY";
  +    public final static String COMPILER_WARNING_KEY = "COMPILER_WARNING_KEY";
  +    public final static String RUNTIME_ERROR_KEY    = "RUNTIME_ERROR_KEY";
   
       static {
  -	ResourceBundle bundle = ResourceBundle.getBundle("org.apache.xalan.xsltc.compiler.util.ErrorMessages", Locale.getDefault());
  -	_errorMessages  = bundle.getStringArray(ERROR_MESSAGES_KEY);
  -	_compileError   = bundle.getString(COMPILER_ERROR_KEY);
  -	_compileWarning = bundle.getString(COMPILER_WARNING_KEY);
  -	_runtimeError   = bundle.getString(RUNTIME_ERROR_KEY);
  +        _bundle = ResourceBundle.getBundle(
  +                          "org.apache.xalan.xsltc.compiler.util.ErrorMessages",
  +                          Locale.getDefault());
       }
   
  -    public ErrorMsg(int code) {
  +    public ErrorMsg(String code) {
   	_code = code;
   	_line = 0;
       }
   	
  -    public ErrorMsg(String message) {
  -	_code = -1;
  -	_message = message;
  +    public ErrorMsg(Throwable e) {
  +   	_code = null;
  +	_message = e.getMessage();
   	_line = 0;
       }
   
       public ErrorMsg(String message, int line) {
  -	_code = -1;
  +	_code = null;
   	_message = message;
   	_line = line;
       }
   
  -    public ErrorMsg(int code, int line, Object param) {
  +    public ErrorMsg(String code, int line, Object param) {
   	_code = code;
   	_line = line;
   	_params = new Object[] { param };
       }
   
  -    public ErrorMsg(int code, Object param) {
  +    public ErrorMsg(String code, Object param) {
   	this(code);
   	_params = new Object[1];
   	_params[0] = param;
       }
   
  -    public ErrorMsg(int code, Object param1, Object param2) {
  +    public ErrorMsg(String code, Object param1, Object param2) {
   	this(code);
   	_params = new Object[2];
   	_params[0] = param1;
   	_params[1] = param2;
       }
   
  -    public ErrorMsg(int code, SyntaxTreeNode node) {
  +    public ErrorMsg(String code, SyntaxTreeNode node) {
   	_code = code;
   	_url  = getFileName(node);
   	_line = node.getLineNumber();
       }
   
  -    public ErrorMsg(int code, Object param1, SyntaxTreeNode node) {
  +    public ErrorMsg(String code, Object param1, SyntaxTreeNode node) {
   	_code = code;
   	_url  = getFileName(node);
   	_line = node.getLineNumber();
  @@ -250,7 +246,7 @@
   	_params[0] = param1;
       }
   
  -    public ErrorMsg(int code, Object param1, Object param2,
  +    public ErrorMsg(String code, Object param1, Object param2,
   		    SyntaxTreeNode node) {
   	_code = code;
   	_url  = getFileName(node);
  @@ -260,18 +256,6 @@
   	_params[1] = param2;
       }
   
  -    public static String getCompileErrorMessage() {
  -	return _compileError;
  -    }
  -
  -    public static String getCompileWarningMessage() {
  -	return _compileWarning;
  -    }
  -
  -    public static String getTransletErrorMessage() {
  -	return _runtimeError;
  -    }
  -
       private String getFileName(SyntaxTreeNode node) {
   	Stylesheet stylesheet = node.getStylesheet();
   	if (stylesheet != null)
  @@ -301,15 +285,15 @@
        */
       public String toString() {
   	String suffix = (_params == null) ? 
  -	    (_code >= 0 ? new String(_errorMessages[_code]) : _message)
  -	    : MessageFormat.format(_errorMessages[_code], _params);
  +	    (null != _code ? new String(getErrorMessage()) : _message)
  +	    : MessageFormat.format(getErrorMessage(), _params);
   	return formatLine() + suffix;
       }
   	
       public String toString(Object obj) {
   	Object params[] = new Object[1];
   	params[0] = obj.toString();
  -	String suffix = MessageFormat.format(_errorMessages[_code], params);
  +	String suffix = MessageFormat.format(getErrorMessage(), params);
   	return formatLine() + suffix;
       }
   	
  @@ -317,8 +301,19 @@
   	Object params[] = new Object[2];
   	params[0] = obj0.toString();
   	params[1] = obj1.toString();
  -	String suffix = MessageFormat.format(_errorMessages[_code], params);
  +	String suffix = MessageFormat.format(getErrorMessage(), params);
   	return formatLine() + suffix;
  +    }
  +
  +    /**
  +     * Return an ErrorMessages string corresponding to the _code
  +     * This function is temporary until the three special-cased keys
  +     * below are moved into ErrorMessages
  +     * 
  +     * @return ErrorMessages string
  +     */    
  +    private String getErrorMessage() {
  +      return _bundle.getString(_code);
       }
   }
   
  
  
  
  1.5       +3 -3      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TypeCheckError.java	27 Jan 2003 18:44:48 -0000	1.4
  +++ TypeCheckError.java	19 Mar 2003 22:14:09 -0000	1.5
  @@ -79,12 +79,12 @@
   	_error = error;
       }
   	
  -    public TypeCheckError(int code, Object param) {
  +    public TypeCheckError(String code, Object param) {
   	super();
   	_error = new ErrorMsg(code, param);
       }
   
  -    public TypeCheckError(int code, Object param1, Object param2) {
  +    public TypeCheckError(String code, Object param1, Object param2) {
   	super();
   	_error = new ErrorMsg(code, param1, param2);
       }
  
  
  
  1.60      +44 -27    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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- BasisLibrary.java	30 Jan 2003 18:46:12 -0000	1.59
  +++ BasisLibrary.java	19 Mar 2003 22:14:10 -0000	1.60
  @@ -1309,52 +1309,69 @@
   	return ("ns" + prefixIndex++);
       }
   
  -    public static final int RUN_TIME_INTERNAL_ERR   = 0;
  -    public static final int RUN_TIME_COPY_ERR       = 1;
  -    public static final int DATA_CONVERSION_ERR     = 2;
  -    public static final int EXTERNAL_FUNC_ERR       = 3;
  -    public static final int EQUALITY_EXPR_ERR       = 4;
  -    public static final int INVALID_ARGUMENT_ERR    = 5;
  -    public static final int FORMAT_NUMBER_ERR       = 6;
  -    public static final int ITERATOR_CLONE_ERR      = 7;
  -    public static final int AXIS_SUPPORT_ERR        = 8;
  -    public static final int TYPED_AXIS_SUPPORT_ERR  = 9;
  -    public static final int STRAY_ATTRIBUTE_ERR     = 10; 
  -    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;
  +    public static final String RUN_TIME_INTERNAL_ERR =
  +                                           "RUN_TIME_INTERNAL_ERR";
  +    public static final String RUN_TIME_COPY_ERR =
  +                                           "RUN_TIME_COPY_ERR";
  +    public static final String DATA_CONVERSION_ERR =
  +                                           "DATA_CONVERSION_ERR";
  +    public static final String EXTERNAL_FUNC_ERR =
  +                                           "EXTERNAL_FUNC_ERR";
  +    public static final String EQUALITY_EXPR_ERR =
  +                                           "EQUALITY_EXPR_ERR";
  +    public static final String INVALID_ARGUMENT_ERR =
  +                                           "INVALID_ARGUMENT_ERR";
  +    public static final String FORMAT_NUMBER_ERR =
  +                                           "FORMAT_NUMBER_ERR";
  +    public static final String ITERATOR_CLONE_ERR =
  +                                           "ITERATOR_CLONE_ERR";
  +    public static final String AXIS_SUPPORT_ERR =
  +                                           "AXIS_SUPPORT_ERR";
  +    public static final String TYPED_AXIS_SUPPORT_ERR =
  +                                           "TYPED_AXIS_SUPPORT_ERR";
  +    public static final String STRAY_ATTRIBUTE_ERR =
  +                                           "STRAY_ATTRIBUTE_ERR"; 
  +    public static final String STRAY_NAMESPACE_ERR =
  +                                           "STRAY_NAMESPACE_ERR";
  +    public static final String NAMESPACE_PREFIX_ERR =
  +                                           "NAMESPACE_PREFIX_ERR";
  +    public static final String DOM_ADAPTER_INIT_ERR =
  +                                           "DOM_ADAPTER_INIT_ERR";
  +    public static final String PARSER_DTD_SUPPORT_ERR =
  +                                           "PARSER_DTD_SUPPORT_ERR";
  +    public static final String NAMESPACES_SUPPORT_ERR =
  +                                           "NAMESPACES_SUPPORT_ERR";
  +    public static final String CANT_RESOLVE_RELATIVE_URI_ERR =
  +                                           "CANT_RESOLVE_RELATIVE_URI_ERR";
   
       // All error messages are localized and are stored in resource bundles.
  -    // This array and the following 4 strings are read from that bundle.
  -    private static String[] _errorMessages;
  +    protected static ResourceBundle m_bundle;
       
       public final static String ERROR_MESSAGES_KEY = "error-messages";
   
       static {
   	String resource = "org.apache.xalan.xsltc.runtime.ErrorMessages";
  -	ResourceBundle bundle = ResourceBundle.getBundle(resource);
  -	_errorMessages  = bundle.getStringArray(ERROR_MESSAGES_KEY);
  +	m_bundle = ResourceBundle.getBundle(resource);
       }
   
       /**
        * Print a run-time error message.
        */
  -    public static void runTimeError(int code) {
  -	throw new RuntimeException(_errorMessages[code]);
  +    public static void runTimeError(String code) {
  +	throw new RuntimeException(m_bundle.getString(code));
       }
   
  -    public static void runTimeError(int code, Object[] args) {
  -	final String message = MessageFormat.format(_errorMessages[code],args);
  +    public static void runTimeError(String code, Object[] args) {
  +	final String message = MessageFormat.format(m_bundle.getString(code),
  +                                                    args);
   	throw new RuntimeException(message);
       }
   
  -    public static void runTimeError(int code, Object arg0) {
  +    public static void runTimeError(String code, Object arg0) {
   	runTimeError(code, new Object[]{ arg0 } );
       }
   
  -    public static void runTimeError(int code, Object arg0, Object arg1) {
  +    public static void runTimeError(String code, Object arg0, Object arg1) {
   	runTimeError(code, new Object[]{ arg0, arg1 } );
       }
   
  
  
  
  1.6       +142 -157  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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ErrorMessages.java	30 Jan 2003 18:46:12 -0000	1.5
  +++ ErrorMessages.java	19 Mar 2003 22:14:10 -0000	1.6
  @@ -4,7 +4,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001,2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -62,11 +62,9 @@
   
   package org.apache.xalan.xsltc.runtime;
   
  -import java.util.Enumeration;
  -import java.util.ResourceBundle;
  -import java.util.Vector;
  +import java.util.ListResourceBundle;
   
  -public class ErrorMessages extends ResourceBundle {
  +public class ErrorMessages extends ListResourceBundle {
   
   /*
    * XSLTC run-time error messages.
  @@ -117,165 +115,152 @@
    */
   
       // These message should be read from a locale-specific resource bundle
  -    private static final String errorMessages[] = {
  +    private static final Object[][] m_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 an attribute 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.",
  -
  -	/*
  -	 * 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.",
  +        /*
  +         * Note to translators:  the substitution text in the following message
  +         * is a class name.  Used for internal errors in the processor.
  +         */
  +        {BasisLibrary.RUN_TIME_INTERNAL_ERR,
  +        "Run-time internal error in ''{0}''"},
  +
  +        /*
  +         * Note to translators:  <xsl:copy> is a keyword that should not be
  +         * translated.
  +         */
  +        {BasisLibrary.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}.
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.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.)
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.STRAY_ATTRIBUTE_ERR,
  +        "Attribute ''{0}'' outside of element."},
  +
  +        /*
  +         * Note to translators:  As with the preceding message, a namespace
  +         * declaration has the form of an attribute 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.
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.DOM_ADAPTER_INIT_ERR,
  +        "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.
  +         */
  +        {BasisLibrary.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.
  +         */
  +        {BasisLibrary.NAMESPACES_SUPPORT_ERR,
  +        "The SAX parser you are using does not have support for XML Namespaces."},
   
           /*
            * Note to translators:  The substitution text is the URI that was in
            * error.
            */
  -        // CANT_RESOLVE_RELATIVE_URI_ERR
  -        "Could not resolve the URI reference ''{0}''."
  +        {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR,
  +        "Could not resolve the URI reference ''{0}''."}
       };
   
  -    private static Vector _keys;
  -
  -    static {
  -	_keys = new Vector();
  -	_keys.addElement(BasisLibrary.ERROR_MESSAGES_KEY);
  -    }
  -
  -    public Enumeration getKeys() {
  -	return _keys.elements();
  -    }
  -
  -    public Object handleGetObject(String key) {
  -	if (key == null) return null;
  -	if (key.equals(BasisLibrary.ERROR_MESSAGES_KEY)) return errorMessages;
  -	return(null);
  +    public Object[][] getContents() {
  +        return m_errorMessages;
       }
   
   }
  
  
  
  1.4       +49 -36    xml-xalan/java/src/org/apache/xalan/xsltc/runtime/ErrorMessages_no.java
  
  Index: ErrorMessages_no.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/ErrorMessages_no.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ErrorMessages_no.java	30 Jan 2003 18:46:12 -0000	1.3
  +++ ErrorMessages_no.java	19 Mar 2003 22:14:10 -0000	1.4
  @@ -62,46 +62,59 @@
   
   package org.apache.xalan.xsltc.runtime;
   
  +import java.util.ListResourceBundle;
  +
  +public class ErrorMessages_no extends ListResourceBundle {
   
  -public class ErrorMessages_no extends ErrorMessages {
   
       // Disse feilmeldingene maa korrespondere med konstantene some er definert
       // nederst i kildekoden til BasisLibrary.
  -    private static final String errorMessages[] = {
  -	// RUN_TIME_INTERNAL_ERR
  -	"Intern programfeil i ''{0}''",
  -	// RUN_TIME_COPY_ERR
  -	"Programfeil under utf\u00f8ing av <xsl:copy>.",
  -	// DATA_CONVERSION_ERR
  -	"Ugyldig konvertering av ''{0}'' fra ''{1}''.",
  -	// EXTERNAL_FUNC_ERR
  -	"Ekstern funksjon ''{0}'' er ikke st\u00f8ttet av XSLTC.",
  -	// EQUALITY_EXPR_ERR
  -	"Ugyldig argument i EQUALITY uttrykk.",
  -	// INVALID_ARGUMENT_ERR
  -	"Ugyldig argument ''{0}'' i kall til ''{1}''",
  -	// FORMAT_NUMBER_ERR
  -	"Fors\u00f8k p\u00e5 \u00e5 formattere nummer ''{0}'' med ''{1}''.",
  -	// ITERATOR_CLONE_ERR
  -	"Kan ikke klone iterator ''{0}''.",
  -	// AXIS_SUPPORT_ERR
  -	"Iterator for axis ''{0}'' er ikke st\u00e8ttet.",
  -	// TYPED_AXIS_SUPPORT_ERR
  -	"Iterator for typet axis ''{0}'' er ikke st\u00e8ttet.",
  -	// STRAY_ATTRIBUTE_ERR
  -	"Attributt ''{0}'' utenfor element.",
  -	// STRAY_NAMESPACE_ERR
  -	"Navnedeklarasjon ''{0}''=''{1}'' utenfor element.",
  -	// NAMESPACE_PREFIX_ERR
  -	"Prefix ''{0}'' er ikke deklartert.",
  -	// DOM_ADAPTER_INIT_ERR
  -	"Fors\u00f8k p\u00e5 \u00e5 instansiere DOMAdapter med feil type DOM."
  +    private static final Object[][] m_errorMessages = {
  +	{BasisLibrary.RUN_TIME_INTERNAL_ERR,
  +	"Intern programfeil i ''{0}''"},
  +
  +	{BasisLibrary.RUN_TIME_COPY_ERR,
  +	"Programfeil under utf\u00f8ing av <xsl:copy>."},
  +
  +	{BasisLibrary.DATA_CONVERSION_ERR,
  +	"Ugyldig konvertering av ''{0}'' fra ''{1}''."},
  +
  +	{BasisLibrary.EXTERNAL_FUNC_ERR,
  +	"Ekstern funksjon ''{0}'' er ikke st\u00f8ttet av XSLTC."},
  +
  +	{BasisLibrary.EQUALITY_EXPR_ERR,
  +	"Ugyldig argument i EQUALITY uttrykk."},
  +
  +	{BasisLibrary.INVALID_ARGUMENT_ERR,
  +	"Ugyldig argument ''{0}'' i kall til ''{1}''"},
  +
  +	{BasisLibrary.FORMAT_NUMBER_ERR,
  +	"Fors\u00f8k p\u00e5 \u00e5 formattere nummer ''{0}'' med ''{1}''."},
  +
  +	{BasisLibrary.ITERATOR_CLONE_ERR,
  +	"Kan ikke klone iterator ''{0}''."},
  +
  +	{BasisLibrary.AXIS_SUPPORT_ERR,
  +	"Iterator for axis ''{0}'' er ikke st\u00e8ttet."},
  +
  +	{BasisLibrary.TYPED_AXIS_SUPPORT_ERR,
  +	"Iterator for typet axis ''{0}'' er ikke st\u00e8ttet."},
  +
  +	{BasisLibrary.STRAY_ATTRIBUTE_ERR,
  +	"Attributt ''{0}'' utenfor element."},
  +
  +	{BasisLibrary.STRAY_NAMESPACE_ERR,
  +	"Navnedeklarasjon ''{0}''=''{1}'' utenfor element."},
  +
  +	{BasisLibrary.NAMESPACE_PREFIX_ERR,
  +	"Prefix ''{0}'' er ikke deklartert."},
  +
  +	{BasisLibrary.DOM_ADAPTER_INIT_ERR,
  +	"Fors\u00f8k p\u00e5 \u00e5 instansiere DOMAdapter med feil type DOM."}
  +
       };
   
  -    public Object handleGetObject(String key) {
  -	if (key == null) return null;
  -	if (key.equals(BasisLibrary.ERROR_MESSAGES_KEY)) return errorMessages;
  -	return(null);
  +    public Object[][] getContents() {
  +        return m_errorMessages;
       }
  -
   }
  
  
  
  1.59      +4 -2      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.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- TransformerFactoryImpl.java	3 Feb 2003 19:52:35 -0000	1.58
  +++ TransformerFactoryImpl.java	19 Mar 2003 22:14:10 -0000	1.59
  @@ -612,7 +612,9 @@
   	        throw new TransformerConfigurationException(err.toString());
   	    }
   	    catch (Exception e) {
  -	        ErrorMsg err = new ErrorMsg(ErrorMsg.getTransletErrorMessage() + e.getMessage());
  +	        ErrorMsg err = new ErrorMsg(
  +                                     new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)
  +                                     + e.getMessage());
   	        throw new TransformerConfigurationException(err.toString());
   	    }
   	}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message