📄 errormessages.java
字号:
/* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//* * $Id: ErrorMessages.java,v 1.2.4.1 2005/09/15 09:59:41 pvedula Exp $ */package com.sun.org.apache.xalan.internal.xsltc.compiler.util;import java.util.ListResourceBundle;/** * @author Morten Jorgensen */public class ErrorMessages extends ListResourceBundle {/* * XSLTC compile-time error messages. * * General notes to translators and definitions: * * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". * XSLT is an acronym for "XML Stylesheet Language: Transformations". * * 2) A stylesheet is a description of how to transform an input XML document * into a resultant XML document (or HTML document or text). The * stylesheet itself is described in the form of an XML document. * * 3) A template is a component of a stylesheet that is used to match a * particular portion of an input document and specifies the form of the * corresponding portion of the output document. * * 4) An axis is a particular "dimension" in a tree representation of an XML * document; the nodes in the tree are divided along different axes. * Traversing the "child" axis, for instance, means that the program * would visit each child of a particular node; traversing the "descendant" * axis means that the program would visit the child nodes of a particular * node, their children, and so on until the leaf nodes of the tree are * reached. * * 5) An iterator is an object that traverses nodes in a tree along a * particular axis, one at a time. * * 6) An element is a mark-up tag in an XML document; an attribute is a * modifier on the tag. For example, in <elem attr='val' attr2='val2'> * "elem" is an element name, "attr" and "attr2" are attribute names with * the values "val" and "val2", respectively. * * 7) A namespace declaration is a special attribute that is used to associate * a prefix with a URI (the namespace). The meanings of element names and * attribute names that use that prefix are defined with respect to that * namespace. * * 8) DOM is an acronym for Document Object Model. It is a tree * representation of an XML document. * * SAX is an acronym for the Simple API for XML processing. It is an API * used inform an XML processor (in this case XSLTC) of the structure and * content of an XML document. * * Input to the stylesheet processor can come from an XML parser in the * form of a DOM tree or through the SAX API. * * 9) DTD is a document type declaration. It is a way of specifying the * grammar for an XML file, the names and types of elements, attributes, * etc. * * 10) XPath is a specification that describes a notation for identifying * nodes in a tree-structured representation of an XML document. An * instance of that notation is referred to as an XPath expression. * * 11) Translet is an invented term that refers to the class file that contains * the compiled form of a stylesheet. */ // These message should be read from a locale-specific resource bundle /** Get the lookup table for error messages. * * @return The message lookup table. */ public Object[][] getContents() { return new Object[][] { {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. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -