1 /*
   2  * reserved comment block
   3  * DO NOT REMOVE OR ALTER!
   4  */
   5 /*
   6  * Copyright 2001-2004 The Apache Software Foundation.
   7  *
   8  * Licensed under the Apache License, Version 2.0 (the "License");
   9  * you may not use this file except in compliance with the License.
  10  * You may obtain a copy of the License at
  11  *
  12  *     http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 /*
  21  * $Id: ErrorMessages.java,v 1.2.4.1 2005/09/15 09:59:41 pvedula Exp $
  22  */
  23 
  24 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
  25 
  26 import java.util.ListResourceBundle;
  27 
  28 /**
  29  * @author Morten Jorgensen
  30  */
  31 public class ErrorMessages extends ListResourceBundle {
  32 
  33 /*
  34  * XSLTC compile-time error messages.
  35  *
  36  * General notes to translators and definitions:
  37  *
  38  *   1) XSLTC is the name of the product.  It is an acronym for "XSLT Compiler".
  39  *      XSLT is an acronym for "XML Stylesheet Language: Transformations".
  40  *
  41  *   2) A stylesheet is a description of how to transform an input XML document
  42  *      into a resultant XML document (or HTML document or text).  The
  43  *      stylesheet itself is described in the form of an XML document.
  44  *
  45  *   3) A template is a component of a stylesheet that is used to match a
  46  *      particular portion of an input document and specifies the form of the
  47  *      corresponding portion of the output document.
  48  *
  49  *   4) An axis is a particular "dimension" in a tree representation of an XML
  50  *      document; the nodes in the tree are divided along different axes.
  51  *      Traversing the "child" axis, for instance, means that the program
  52  *      would visit each child of a particular node; traversing the "descendant"
  53  *      axis means that the program would visit the child nodes of a particular
  54  *      node, their children, and so on until the leaf nodes of the tree are
  55  *      reached.
  56  *
  57  *   5) An iterator is an object that traverses nodes in a tree along a
  58  *      particular axis, one at a time.
  59  *
  60  *   6) An element is a mark-up tag in an XML document; an attribute is a
  61  *      modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
  62  *      "elem" is an element name, "attr" and "attr2" are attribute names with
  63  *      the values "val" and "val2", respectively.
  64  *
  65  *   7) A namespace declaration is a special attribute that is used to associate
  66  *      a prefix with a URI (the namespace).  The meanings of element names and
  67  *      attribute names that use that prefix are defined with respect to that
  68  *      namespace.
  69  *
  70  *   8) DOM is an acronym for Document Object Model.  It is a tree
  71  *      representation of an XML document.
  72  *
  73  *      SAX is an acronym for the Simple API for XML processing.  It is an API
  74  *      used inform an XML processor (in this case XSLTC) of the structure and
  75  *      content of an XML document.
  76  *
  77  *      Input to the stylesheet processor can come from an XML parser in the
  78  *      form of a DOM tree or through the SAX API.
  79  *
  80  *   9) DTD is a document type declaration.  It is a way of specifying the
  81  *      grammar for an XML file, the names and types of elements, attributes,
  82  *      etc.
  83  *
  84  *  10) XPath is a specification that describes a notation for identifying
  85  *      nodes in a tree-structured representation of an XML document.  An
  86  *      instance of that notation is referred to as an XPath expression.
  87  *
  88  *  11) Translet is an invented term that refers to the class file that contains
  89  *      the compiled form of a stylesheet.
  90  */
  91 
  92     // These message should be read from a locale-specific resource bundle
  93     private static final Object[][] _contents =  new Object[][] {
  94         {ErrorMsg.MULTIPLE_STYLESHEET_ERR,
  95         "More than one stylesheet defined in the same file."},
  96 
  97         /*
  98          * Note to translators:  The substitution text is the name of a
  99          * template.  The same name was used on two different templates in the
 100          * same stylesheet.
 101          */
 102         {ErrorMsg.TEMPLATE_REDEF_ERR,
 103         "Template ''{0}'' already defined in this stylesheet."},
 104 
 105 
 106         /*
 107          * Note to translators:  The substitution text is the name of a
 108          * template.  A reference to the template name was encountered, but the
 109          * template is undefined.
 110          */
 111         {ErrorMsg.TEMPLATE_UNDEF_ERR,
 112         "Template ''{0}'' not defined in this stylesheet."},
 113 
 114         /*
 115          * Note to translators:  The substitution text is the name of a variable
 116          * that was defined more than once.
 117          */
 118         {ErrorMsg.VARIABLE_REDEF_ERR,
 119         "Variable ''{0}'' is multiply defined in the same scope."},
 120 
 121         /*
 122          * Note to translators:  The substitution text is the name of a variable
 123          * or parameter.  A reference to the variable or parameter was found,
 124          * but it was never defined.
 125          */
 126         {ErrorMsg.VARIABLE_UNDEF_ERR,
 127         "Variable or parameter ''{0}'' is undefined."},
 128 
 129         /*
 130          * Note to translators:  The word "class" here refers to a Java class.
 131          * Processing the stylesheet required a class to be loaded, but it could
 132          * not be found.  The substitution text is the name of the class.
 133          */
 134         {ErrorMsg.CLASS_NOT_FOUND_ERR,
 135         "Cannot find class ''{0}''."},
 136 
 137         /*
 138          * Note to translators:  The word "method" here refers to a Java method.
 139          * Processing the stylesheet required a reference to the method named by
 140          * the substitution text, but it could not be found.  "public" is the
 141          * Java keyword.
 142          */
 143         {ErrorMsg.METHOD_NOT_FOUND_ERR,
 144         "Cannot find external method ''{0}'' (must be public)."},
 145 
 146         /*
 147          * Note to translators:  The word "method" here refers to a Java method.
 148          * Processing the stylesheet required a reference to the method named by
 149          * the substitution text, but no method with the required types of
 150          * arguments or return type could be found.
 151          */
 152         {ErrorMsg.ARGUMENT_CONVERSION_ERR,
 153         "Cannot convert argument/return type in call to method ''{0}''"},
 154 
 155         /*
 156          * Note to translators:  The file or URI named in the substitution text
 157          * is missing.
 158          */
 159         {ErrorMsg.FILE_NOT_FOUND_ERR,
 160         "File or URI ''{0}'' not found."},
 161 
 162         /*
 163          * Note to translators:  This message is displayed when the URI
 164          * mentioned in the substitution text is not well-formed syntactically.
 165          */
 166         {ErrorMsg.INVALID_URI_ERR,
 167         "Invalid URI ''{0}''."},
 168 
 169         /*
 170          * Note to translators:  The file or URI named in the substitution text
 171          * exists but could not be opened.
 172          */
 173         {ErrorMsg.FILE_ACCESS_ERR,
 174         "Cannot open file or URI ''{0}''."},
 175 
 176         /*
 177          * Note to translators: <xsl:stylesheet> and <xsl:transform> are
 178          * keywords that should not be translated.
 179          */
 180         {ErrorMsg.MISSING_ROOT_ERR,
 181         "<xsl:stylesheet> or <xsl:transform> element expected."},
 182 
 183         /*
 184          * Note to translators:  The stylesheet contained a reference to a
 185          * namespace prefix that was undefined.  The value of the substitution
 186          * text is the name of the prefix.
 187          */
 188         {ErrorMsg.NAMESPACE_UNDEF_ERR,
 189         "Namespace prefix ''{0}'' is undeclared."},
 190 
 191         /*
 192          * Note to translators:  The Java function named in the stylesheet could
 193          * not be found.
 194          */
 195         {ErrorMsg.FUNCTION_RESOLVE_ERR,
 196         "Unable to resolve call to function ''{0}''."},
 197 
 198         /*
 199          * Note to translators:  The substitution text is the name of a
 200          * function.  A literal string here means a constant string value.
 201          */
 202         {ErrorMsg.NEED_LITERAL_ERR,
 203         "Argument to ''{0}'' must be a literal string."},
 204 
 205         /*
 206          * Note to translators:  This message indicates there was a syntactic
 207          * error in the form of an XPath expression.  The substitution text is
 208          * the expression.
 209          */
 210         {ErrorMsg.XPATH_PARSER_ERR,
 211         "Error parsing XPath expression ''{0}''."},
 212 
 213         /*
 214          * Note to translators:  An element in the stylesheet requires a
 215          * particular attribute named by the substitution text, but that
 216          * attribute was not specified in the stylesheet.
 217          */
 218         {ErrorMsg.REQUIRED_ATTR_ERR,
 219         "Required attribute ''{0}'' is missing."},
 220 
 221         /*
 222          * Note to translators:  This message indicates that a character not
 223          * permitted in an XPath expression was encountered.  The substitution
 224          * text is the offending character.
 225          */
 226         {ErrorMsg.ILLEGAL_CHAR_ERR,
 227         "Illegal character ''{0}'' in XPath expression."},
 228 
 229         /*
 230          * Note to translators:  A processing instruction is a mark-up item in
 231          * an XML document that request some behaviour of an XML processor.  The
 232          * form of the name of was invalid in this case, and the substitution
 233          * text is the name.
 234          */
 235         {ErrorMsg.ILLEGAL_PI_ERR,
 236         "Illegal name ''{0}'' for processing instruction."},
 237 
 238         /*
 239          * Note to translators:  This message is reported if the stylesheet
 240          * being processed attempted to construct an XML document with an
 241          * attribute in a place other than on an element.  The substitution text
 242          * specifies the name of the attribute.
 243          */
 244         {ErrorMsg.STRAY_ATTRIBUTE_ERR,
 245         "Attribute ''{0}'' outside of element."},
 246 
 247         /*
 248          * Note to translators:  An attribute that wasn't recognized was
 249          * specified on an element in the stylesheet.  The attribute is named
 250          * by the substitution
 251          * text.
 252          */
 253         {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR,
 254         "Illegal attribute ''{0}''."},
 255 
 256         /*
 257          * Note to translators:  "import" and "include" are keywords that should
 258          * not be translated.  This messages indicates that the stylesheet
 259          * named in the substitution text imported or included itself either
 260          * directly or indirectly.
 261          */
 262         {ErrorMsg.CIRCULAR_INCLUDE_ERR,
 263         "Circular import/include. Stylesheet ''{0}'' already loaded."},
 264 
 265         /*
 266          * Note to translators:  A result-tree fragment is a portion of a
 267          * resulting XML document represented as a tree.  "<xsl:sort>" is a
 268          * keyword and should not be translated.
 269          */
 270         {ErrorMsg.RESULT_TREE_SORT_ERR,
 271         "Result-tree fragments cannot be sorted (<xsl:sort> elements are " +
 272         "ignored). You must sort the nodes when creating the result tree."},
 273 
 274         /*
 275          * Note to translators:  A name can be given to a particular style to be
 276          * used to format decimal values.  The substitution text gives the name
 277          * of such a style for which more than one declaration was encountered.
 278          */
 279         {ErrorMsg.SYMBOLS_REDEF_ERR,
 280         "Decimal formatting ''{0}'' is already defined."},
 281 
 282         /*
 283          * Note to translators:  The stylesheet version named in the
 284          * substitution text is not supported.
 285          */
 286         {ErrorMsg.XSL_VERSION_ERR,
 287         "XSL version ''{0}'' is not supported by XSLTC."},
 288 
 289         /*
 290          * Note to translators:  The definitions of one or more variables or
 291          * parameters depend on one another.
 292          */
 293         {ErrorMsg.CIRCULAR_VARIABLE_ERR,
 294         "Circular variable/parameter reference in ''{0}''."},
 295 
 296         /*
 297          * Note to translators:  The operator in an expresion with two operands was
 298          * not recognized.
 299          */
 300         {ErrorMsg.ILLEGAL_BINARY_OP_ERR,
 301         "Unknown operator for binary expression."},
 302 
 303         /*
 304          * Note to translators:  This message is produced if a reference to a
 305          * function has too many or too few arguments.
 306          */
 307         {ErrorMsg.ILLEGAL_ARG_ERR,
 308         "Illegal argument(s) for function call."},
 309 
 310         /*
 311          * Note to translators:  "document()" is the name of function and must
 312          * not be translated.  A node-set is a set of the nodes in the tree
 313          * representation of an XML document.
 314          */
 315         {ErrorMsg.DOCUMENT_ARG_ERR,
 316         "Second argument to document() function must be a node-set."},
 317 
 318         /*
 319          * Note to translators:  "<xsl:when>" and "<xsl:choose>" are keywords
 320          * and should not be translated.  This message describes a syntax error
 321          * in the stylesheet.
 322          */
 323         {ErrorMsg.MISSING_WHEN_ERR,
 324         "At least one <xsl:when> element required in <xsl:choose>."},
 325 
 326         /*
 327          * Note to translators:  "<xsl:otherwise>" and "<xsl:choose>" are
 328          * keywords and should not be translated.  This message describes a
 329          * syntax error in the stylesheet.
 330          */
 331         {ErrorMsg.MULTIPLE_OTHERWISE_ERR,
 332         "Only one <xsl:otherwise> element allowed in <xsl:choose>."},
 333 
 334         /*
 335          * Note to translators:  "<xsl:otherwise>" and "<xsl:choose>" are
 336          * keywords and should not be translated.  This message describes a
 337          * syntax error in the stylesheet.
 338          */
 339         {ErrorMsg.STRAY_OTHERWISE_ERR,
 340         "<xsl:otherwise> can only be used within <xsl:choose>."},
 341 
 342         /*
 343          * Note to translators:  "<xsl:when>" and "<xsl:choose>" are keywords
 344          * and should not be translated.  This message describes a syntax error
 345          * in the stylesheet.
 346          */
 347         {ErrorMsg.STRAY_WHEN_ERR,
 348         "<xsl:when> can only be used within <xsl:choose>."},
 349 
 350         /*
 351          * Note to translators:  "<xsl:when>", "<xsl:otherwise>" and
 352          * "<xsl:choose>" are keywords and should not be translated.  This
 353          * message describes a syntax error in the stylesheet.
 354          */
 355         {ErrorMsg.WHEN_ELEMENT_ERR,
 356         "Only <xsl:when> and <xsl:otherwise> elements allowed in <xsl:choose>."},
 357 
 358         /*
 359          * Note to translators:  "<xsl:attribute-set>" and "name" are keywords
 360          * that should not be translated.
 361          */
 362         {ErrorMsg.UNNAMED_ATTRIBSET_ERR,
 363         "<xsl:attribute-set> is missing the 'name' attribute."},
 364 
 365         /*
 366          * Note to translators:  An element in the stylesheet contained an
 367          * element of a type that it was not permitted to contain.
 368          */
 369         {ErrorMsg.ILLEGAL_CHILD_ERR,
 370         "Illegal child element."},
 371 
 372         /*
 373          * Note to translators:  The stylesheet tried to create an element with
 374          * a name that was not a valid XML name.  The substitution text contains
 375          * the name.
 376          */
 377         {ErrorMsg.ILLEGAL_ELEM_NAME_ERR,
 378         "You cannot call an element ''{0}''"},
 379 
 380         /*
 381          * Note to translators:  The stylesheet tried to create an attribute
 382          * with a name that was not a valid XML name.  The substitution text
 383          * contains the name.
 384          */
 385         {ErrorMsg.ILLEGAL_ATTR_NAME_ERR,
 386         "You cannot call an attribute ''{0}''"},
 387 
 388         /*
 389          * Note to translators:  The children of the outermost element of a
 390          * stylesheet are referred to as top-level elements.  No text should
 391          * occur within that outermost element unless it is within a top-level
 392          * element.  This message indicates that that constraint was violated.
 393          * "<xsl:stylesheet>" is a keyword that should not be translated.
 394          */
 395         {ErrorMsg.ILLEGAL_TEXT_NODE_ERR,
 396         "Text data outside of top-level <xsl:stylesheet> element."},
 397 
 398         /*
 399          * Note to translators:  JAXP is an acronym for the Java API for XML
 400          * Processing.  This message indicates that the XML parser provided to
 401          * XSLTC to process the XML input document had a configuration problem.
 402          */
 403         {ErrorMsg.SAX_PARSER_CONFIG_ERR,
 404         "JAXP parser not configured correctly"},
 405 
 406         /*
 407          * Note to translators:  The substitution text names the internal error
 408          * encountered.
 409          */
 410         {ErrorMsg.INTERNAL_ERR,
 411         "Unrecoverable XSLTC-internal error: ''{0}''"},
 412 
 413         /*
 414          * Note to translators:  The stylesheet contained an element that was
 415          * not recognized as part of the XSL syntax.  The substitution text
 416          * gives the element name.
 417          */
 418         {ErrorMsg.UNSUPPORTED_XSL_ERR,
 419         "Unsupported XSL element ''{0}''."},
 420 
 421         /*
 422          * Note to translators:  The stylesheet referred to an extension to the
 423          * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does
 424          * not recognized the particular extension named.  The substitution text
 425          * gives the extension name.
 426          */
 427         {ErrorMsg.UNSUPPORTED_EXT_ERR,
 428         "Unrecognised XSLTC extension ''{0}''."},
 429 
 430         /*
 431          * Note to translators:  The XML document given to XSLTC as a stylesheet
 432          * was not, in fact, a stylesheet.  XSLTC is able to detect that in this
 433          * case because the outermost element in the stylesheet has to be
 434          * declared with respect to the XSL namespace URI, but no declaration
 435          * for that namespace was seen.
 436          */
 437         {ErrorMsg.MISSING_XSLT_URI_ERR,
 438         "The input document is not a stylesheet (the XSL namespace is not "+
 439         "declared in the root element)."},
 440 
 441         /*
 442          * Note to translators:  XSLTC could not find the stylesheet document
 443          * with the name specified by the substitution text.
 444          */
 445         {ErrorMsg.MISSING_XSLT_TARGET_ERR,
 446         "Could not find stylesheet target ''{0}''."},
 447 
 448         /*
 449          * Note to translators:  access to the stylesheet target is denied
 450          */
 451         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
 452         "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
 453 
 454         /*
 455          * Note to translators:  This message represents an internal error in
 456          * condition in XSLTC.  The substitution text is the class name in XSLTC
 457          * that is missing some functionality.
 458          */
 459         {ErrorMsg.NOT_IMPLEMENTED_ERR,
 460         "Not implemented: ''{0}''."},
 461 
 462         /*
 463          * Note to translators:  The XML document given to XSLTC as a stylesheet
 464          * was not, in fact, a stylesheet.
 465          */
 466         {ErrorMsg.NOT_STYLESHEET_ERR,
 467         "The input document does not contain an XSL stylesheet."},
 468 
 469         /*
 470          * Note to translators:  The element named in the substitution text was
 471          * encountered in the stylesheet but is not recognized.
 472          */
 473         {ErrorMsg.ELEMENT_PARSE_ERR,
 474         "Could not parse element ''{0}''"},
 475 
 476         /*
 477          * Note to translators:  "use", "<key>", "node", "node-set", "string"
 478          * and "number" are keywords in this context and should not be
 479          * translated.  This message indicates that the value of the "use"
 480          * attribute was not one of the permitted values.
 481          */
 482         {ErrorMsg.KEY_USE_ATTR_ERR,
 483         "The use attribute of <key> must be node, node-set, string or number."},
 484 
 485         /*
 486          * Note to translators:  An XML document can specify the version of the
 487          * XML specification to which it adheres.  This message indicates that
 488          * the version specified for the output document was not valid.
 489          */
 490         {ErrorMsg.OUTPUT_VERSION_ERR,
 491         "Output XML document version should be 1.0"},
 492 
 493         /*
 494          * Note to translators:  The operator in a comparison operation was
 495          * not recognized.
 496          */
 497         {ErrorMsg.ILLEGAL_RELAT_OP_ERR,
 498         "Unknown operator for relational expression"},
 499 
 500         /*
 501          * Note to translators:  An attribute set defines as a set of XML
 502          * attributes that can be added to an element in the output XML document
 503          * as a group.  This message is reported if the name specified was not
 504          * used to declare an attribute set.  The substitution text is the name
 505          * that is in error.
 506          */
 507         {ErrorMsg.ATTRIBSET_UNDEF_ERR,
 508         "Attempting to use non-existing attribute set ''{0}''."},
 509 
 510         /*
 511          * Note to translators:  The term "attribute value template" is a term
 512          * defined by XSLT which describes the value of an attribute that is
 513          * determined by an XPath expression.  The message indicates that the
 514          * expression was syntactically incorrect; the substitution text
 515          * contains the expression that was in error.
 516          */
 517         {ErrorMsg.ATTR_VAL_TEMPLATE_ERR,
 518         "Cannot parse attribute value template ''{0}''."},
 519 
 520         /*
 521          * Note to translators:  ???
 522          */
 523         {ErrorMsg.UNKNOWN_SIG_TYPE_ERR,
 524         "Unknown data-type in signature for class ''{0}''."},
 525 
 526         /*
 527          * Note to translators:  The substitution text refers to data types.
 528          * The message is displayed if a value in a particular context needs to
 529          * be converted to type {1}, but that's not possible for a value of
 530          * type {0}.
 531          */
 532         {ErrorMsg.DATA_CONVERSION_ERR,
 533         "Cannot convert data-type ''{0}'' to ''{1}''."},
 534 
 535         /*
 536          * Note to translators:  "Templates" is a Java class name that should
 537          * not be translated.
 538          */
 539         {ErrorMsg.NO_TRANSLET_CLASS_ERR,
 540         "This Templates does not contain a valid translet class definition."},
 541 
 542         /*
 543          * Note to translators:  "Templates" is a Java class name that should
 544          * not be translated.
 545          */
 546         {ErrorMsg.NO_MAIN_TRANSLET_ERR,
 547         "This Templates does not contain a class with the name ''{0}''."},
 548 
 549         /*
 550          * Note to translators:  The substitution text is the name of a class.
 551          */
 552         {ErrorMsg.TRANSLET_CLASS_ERR,
 553         "Could not load the translet class ''{0}''."},
 554 
 555         {ErrorMsg.TRANSLET_OBJECT_ERR,
 556         "Translet class loaded, but unable to create translet instance."},
 557 
 558         /*
 559          * Note to translators:  "ErrorListener" is a Java interface name that
 560          * should not be translated.  The message indicates that the user tried
 561          * to set an ErrorListener object on object of the class named in the
 562          * substitution text with "null" Java value.
 563          */
 564         {ErrorMsg.ERROR_LISTENER_NULL_ERR,
 565         "Attempting to set ErrorListener for ''{0}'' to null"},
 566 
 567         /*
 568          * Note to translators:  StreamSource, SAXSource and DOMSource are Java
 569          * interface names that should not be translated.
 570          */
 571         {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR,
 572         "Only StreamSource, SAXSource and DOMSource are supported by XSLTC"},
 573 
 574         /*
 575          * Note to translators:  "Source" is a Java class name that should not
 576          * be translated.  The substitution text is the name of Java method.
 577          */
 578         {ErrorMsg.JAXP_NO_SOURCE_ERR,
 579         "Source object passed to ''{0}'' has no contents."},
 580 
 581         /*
 582          * Note to translators:  The message indicates that XSLTC failed to
 583          * compile the stylesheet into a translet (class file).
 584          */
 585         {ErrorMsg.JAXP_COMPILE_ERR,
 586         "Could not compile stylesheet"},
 587 
 588         /*
 589          * Note to translators:  "TransformerFactory" is a class name.  In this
 590          * context, an attribute is a property or setting of the
 591          * TransformerFactory object.  The substitution text is the name of the
 592          * unrecognised attribute.  The method used to retrieve the attribute is
 593          * "getAttribute", so it's not clear whether it would be best to
 594          * translate the term "attribute".
 595          */
 596         {ErrorMsg.JAXP_INVALID_ATTR_ERR,
 597         "TransformerFactory does not recognise attribute ''{0}''."},
 598 
 599         /*
 600          * Note to translators:  "setResult()" and "startDocument()" are Java
 601          * method names that should not be translated.
 602          */
 603         {ErrorMsg.JAXP_SET_RESULT_ERR,
 604         "setResult() must be called prior to startDocument()."},
 605 
 606         /*
 607          * Note to translators:  "Transformer" is a Java interface name that
 608          * should not be translated.  A Transformer object should contained a
 609          * reference to a translet object in order to be used for
 610          * transformations; this message is produced if that requirement is not
 611          * met.
 612          */
 613         {ErrorMsg.JAXP_NO_TRANSLET_ERR,
 614         "The Transformer has no encapsulated translet object."},
 615 
 616         /*
 617          * Note to translators:  The XML document that results from a
 618          * transformation needs to be sent to an output handler object; this
 619          * message is produced if that requirement is not met.
 620          */
 621         {ErrorMsg.JAXP_NO_HANDLER_ERR,
 622         "No defined output handler for transformation result."},
 623 
 624         /*
 625          * Note to translators:  "Result" is a Java interface name in this
 626          * context.  The substitution text is a method name.
 627          */
 628         {ErrorMsg.JAXP_NO_RESULT_ERR,
 629         "Result object passed to ''{0}'' is invalid."},
 630 
 631         /*
 632          * Note to translators:  "Transformer" is a Java interface name.  The
 633          * user's program attempted to access an unrecognized property with the
 634          * name specified in the substitution text.  The method used to retrieve
 635          * the property is "getOutputProperty", so it's not clear whether it
 636          * would be best to translate the term "property".
 637          */
 638         {ErrorMsg.JAXP_UNKNOWN_PROP_ERR,
 639         "Attempting to access invalid Transformer property ''{0}''."},
 640 
 641         /*
 642          * Note to translators:  SAX2DOM is the name of a Java class that should
 643          * not be translated.  This is an adapter in the sense that it takes a
 644          * DOM object and converts it to something that uses the SAX API.
 645          */
 646         {ErrorMsg.SAX2DOM_ADAPTER_ERR,
 647         "Could not create SAX2DOM adapter: ''{0}''."},
 648 
 649         /*
 650          * Note to translators:  "XSLTCSource.build()" is a Java method name.
 651          * "systemId" is an XML term that is short for "system identification".
 652          */
 653         {ErrorMsg.XSLTC_SOURCE_ERR,
 654         "XSLTCSource.build() called without systemId being set."},
 655 
 656         { ErrorMsg.ER_RESULT_NULL,
 657             "Result should not be null"},
 658 
 659         /*
 660          * Note to translators:  This message indicates that the value argument
 661          * of setParameter must be a valid Java Object.
 662          */
 663         {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE,
 664         "The value of param {0} must be a valid Java Object"},
 665 
 666 
 667         {ErrorMsg.COMPILE_STDIN_ERR,
 668         "The -i option must be used with the -o option."},
 669 
 670 
 671         /*
 672          * Note to translators:  This message contains usage information for a
 673          * means of invoking XSLTC from the command-line.  The message is
 674          * formatted for presentation in English.  The strings <output>,
 675          * <directory>, etc. indicate user-specified argument values, and can
 676          * be translated - the argument <package> refers to a Java package, so
 677          * it should be handled in the same way the term is handled for JDK
 678          * documentation.
 679          */
 680         {ErrorMsg.COMPILE_USAGE_STR,
 681         "SYNOPSIS\n"+
 682         "   java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o <output>]\n"+
 683         "      [-d <directory>] [-j <jarfile>] [-p <package>]\n"+
 684         "      [-n] [-x] [-u] [-v] [-h] { <stylesheet> | -i }\n\n"+
 685         "OPTIONS\n"+
 686         "   -o <output>    assigns the name <output> to the generated\n"+
 687         "                  translet.  By default the translet name is\n"+
 688         "                  derived from the <stylesheet> name.  This option\n"+
 689         "                  is ignored if compiling multiple stylesheets.\n"+
 690         "   -d <directory> specifies a destination directory for translet\n"+
 691         "   -j <jarfile>   packages translet classes into a jar file of the\n"+
 692         "                  name specified as <jarfile>\n"+
 693         "   -p <package>   specifies a package name prefix for all generated\n"+
 694         "                  translet classes.\n"+
 695         "   -n             enables template inlining (default behavior better\n"+
 696         "                  on average).\n"+
 697         "   -x             turns on additional debugging message output\n"+
 698         "   -u             interprets <stylesheet> arguments as URLs\n"+
 699         "   -i             forces compiler to read stylesheet from stdin\n"+
 700         "   -v             prints the version of the compiler\n"+
 701         "   -h             prints this usage statement\n"},
 702 
 703         /*
 704          * Note to translators:  This message contains usage information for a
 705          * means of invoking XSLTC from the command-line.  The message is
 706          * formatted for presentation in English.  The strings <jarfile>,
 707          * <document>, etc. indicate user-specified argument values, and can
 708          * be translated - the argument <class> refers to a Java class, so it
 709          * should be handled in the same way the term is handled for JDK
 710          * documentation.
 711          */
 712         {ErrorMsg.TRANSFORM_USAGE_STR,
 713         "SYNOPSIS \n"+
 714         "   java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j <jarfile>]\n"+
 715         "      [-x] [-n <iterations>] {-u <document_url> | <document>}\n"+
 716         "      <class> [<param1>=<value1> ...]\n\n"+
 717         "   uses the translet <class> to transform an XML document \n"+
 718         "   specified as <document>. The translet <class> is either in\n"+
 719         "   the user's CLASSPATH or in the optionally specified <jarfile>.\n"+
 720         "OPTIONS\n"+
 721         "   -j <jarfile>    specifies a jarfile from which to load translet\n"+
 722         "   -x              turns on additional debugging message output\n"+
 723         "   -n <iterations> runs the transformation <iterations> times and\n"+
 724         "                   displays profiling information\n"+
 725         "   -u <document_url> specifies XML input document as a URL\n"},
 726 
 727 
 728 
 729         /*
 730          * Note to translators:  "<xsl:sort>", "<xsl:for-each>" and
 731          * "<xsl:apply-templates>" are keywords that should not be translated.
 732          * The message indicates that an xsl:sort element must be a child of
 733          * one of the other kinds of elements mentioned.
 734          */
 735         {ErrorMsg.STRAY_SORT_ERR,
 736         "<xsl:sort> can only be used within <xsl:for-each> or <xsl:apply-templates>."},
 737 
 738         /*
 739          * Note to translators:  The message indicates that the encoding
 740          * requested for the output document was on that requires support that
 741          * is not available from the Java Virtual Machine being used to execute
 742          * the program.
 743          */
 744         {ErrorMsg.UNSUPPORTED_ENCODING,
 745         "Output encoding ''{0}'' is not supported on this JVM."},
 746 
 747         /*
 748          * Note to translators:  The message indicates that the XPath expression
 749          * named in the substitution text was not well formed syntactically.
 750          */
 751         {ErrorMsg.SYNTAX_ERR,
 752         "Syntax error in ''{0}''."},
 753 
 754         /*
 755          * Note to translators:  The substitution text is the name of a Java
 756          * class.  The term "constructor" here is the Java term.  The message is
 757          * displayed if XSLTC could not find a constructor for the specified
 758          * class.
 759          */
 760         {ErrorMsg.CONSTRUCTOR_NOT_FOUND,
 761         "Cannot find external constructor ''{0}''."},
 762 
 763         /*
 764          * Note to translators:  "static" is the Java keyword.  The substitution
 765          * text is the name of a function.  The first argument of that function
 766          * is not of the required type.
 767          */
 768         {ErrorMsg.NO_JAVA_FUNCT_THIS_REF,
 769         "The first argument to the non-static Java function ''{0}'' is not a "+
 770         "valid object reference."},
 771 
 772         /*
 773          * Note to translators:  An XPath expression was not of the type
 774          * required in a particular context.  The substitution text is the
 775          * expression that was in error.
 776          */
 777         {ErrorMsg.TYPE_CHECK_ERR,
 778         "Error checking type of the expression ''{0}''."},
 779 
 780         /*
 781          * Note to translators:  An XPath expression was not of the type
 782          * required in a particular context.  However, the location of the
 783          * problematic expression is unknown.
 784          */
 785         {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR,
 786         "Error checking type of an expression at an unknown location."},
 787 
 788         /*
 789          * Note to translators:  The substitution text is the name of a command-
 790          * line option that was not recognized.
 791          */
 792         {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR,
 793         "The command-line option ''{0}'' is not valid."},
 794 
 795         /*
 796          * Note to translators:  The substitution text is the name of a command-
 797          * line option.
 798          */
 799         {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR,
 800         "The command-line option ''{0}'' is missing a required argument."},
 801 
 802         /*
 803          * Note to translators:  This message is used to indicate the severity
 804          * of another message.  The substitution text contains two error
 805          * messages.  The spacing before the second substitution text indents
 806          * it the same amount as the first in English.
 807          */
 808         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
 809         "WARNING:  ''{0}''\n       :{1}"},
 810 
 811         /*
 812          * Note to translators:  This message is used to indicate the severity
 813          * of another message.  The substitution text is an error message.
 814          */
 815         {ErrorMsg.WARNING_MSG,
 816         "WARNING:  ''{0}''"},
 817 
 818         /*
 819          * Note to translators:  This message is used to indicate the severity
 820          * of another message.  The substitution text contains two error
 821          * messages.  The spacing before the second substitution text indents
 822          * it the same amount as the first in English.
 823          */
 824         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
 825         "FATAL ERROR:  ''{0}''\n           :{1}"},
 826 
 827         /*
 828          * Note to translators:  This message is used to indicate the severity
 829          * of another message.  The substitution text is an error message.
 830          */
 831         {ErrorMsg.FATAL_ERR_MSG,
 832         "FATAL ERROR:  ''{0}''"},
 833 
 834         /*
 835          * Note to translators:  This message is used to indicate the severity
 836          * of another message.  The substitution text contains two error
 837          * messages.  The spacing before the second substitution text indents
 838          * it the same amount as the first in English.
 839          */
 840         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
 841         "ERROR:  ''{0}''\n     :{1}"},
 842 
 843         /*
 844          * Note to translators:  This message is used to indicate the severity
 845          * of another message.  The substitution text is an error message.
 846          */
 847         {ErrorMsg.ERROR_MSG,
 848         "ERROR:  ''{0}''"},
 849 
 850         /*
 851          * Note to translators:  The substitution text is the name of a class.
 852          */
 853         {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR,
 854         "Transform using translet ''{0}'' "},
 855 
 856         /*
 857          * Note to translators:  The first substitution is the name of a class,
 858          * while the second substitution is the name of a jar file.
 859          */
 860         {ErrorMsg.TRANSFORM_WITH_JAR_STR,
 861         "Transform using translet ''{0}'' from jar file ''{1}''"},
 862 
 863         /*
 864          * Note to translators:  "TransformerFactory" is the name of a Java
 865          * interface and must not be translated.  The substitution text is
 866          * the name of the class that could not be instantiated.
 867          */
 868         {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT,
 869         "Could not create an instance of the TransformerFactory class ''{0}''."},
 870 
 871         /*
 872          * Note to translators:  This message is produced when the user
 873          * specified a name for the translet class that contains characters
 874          * that are not permitted in a Java class name.  The substitution
 875          * text "{0}" specifies the name the user requested, while "{1}"
 876          * specifies the name the processor used instead.
 877          */
 878         {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT,
 879          "The name ''{0}'' could not be used as the name of the translet "+
 880          "class because it contains characters that are not permitted in the "+
 881          "name of Java class.  The name ''{1}'' was used instead."},
 882 
 883         /*
 884          * Note to translators:  The following message is used as a header.
 885          * All the error messages are collected together and displayed beneath
 886          * this message.
 887          */
 888         {ErrorMsg.COMPILER_ERROR_KEY,
 889         "Compiler errors:"},
 890 
 891         /*
 892          * Note to translators:  The following message is used as a header.
 893          * All the warning messages are collected together and displayed
 894          * beneath this message.
 895          */
 896         {ErrorMsg.COMPILER_WARNING_KEY,
 897         "Compiler warnings:"},
 898 
 899         /*
 900          * Note to translators:  The following message is used as a header.
 901          * All the error messages that are produced when the stylesheet is
 902          * applied to an input document are collected together and displayed
 903          * beneath this message.  A 'translet' is the compiled form of a
 904          * stylesheet (see above).
 905          */
 906         {ErrorMsg.RUNTIME_ERROR_KEY,
 907         "Translet errors:"},
 908 
 909         /*
 910          * Note to translators:  An attribute whose value is constrained to
 911          * be a "QName" or a list of "QNames" had a value that was incorrect.
 912          * 'QName' is an XML syntactic term that must not be translated.  The
 913          * substitution text contains the actual value of the attribute.
 914          */
 915         {ErrorMsg.INVALID_QNAME_ERR,
 916         "An attribute whose value must be a QName or whitespace-separated list of QNames had the value ''{0}''"},
 917 
 918         /*
 919          * Note to translators:  An attribute whose value is required to
 920          * be an "NCName".
 921          * 'NCName' is an XML syntactic term that must not be translated.  The
 922          * substitution text contains the actual value of the attribute.
 923          */
 924         {ErrorMsg.INVALID_NCNAME_ERR,
 925         "An attribute whose value must be an NCName had the value ''{0}''"},
 926 
 927         /*
 928          * Note to translators:  An attribute with an incorrect value was
 929          * encountered.  The permitted value is one of the literal values
 930          * "xml", "html" or "text"; it is also permitted to have the form of
 931          * a QName that is not also an NCName.  The terms "method",
 932          * "xsl:output", "xml", "html" and "text" are keywords that must not
 933          * be translated.  The term "qname-but-not-ncname" is an XML syntactic
 934          * term.  The substitution text contains the actual value of the
 935          * attribute.
 936          */
 937         {ErrorMsg.INVALID_METHOD_IN_OUTPUT,
 938         "The method attribute of an <xsl:output> element had the value ''{0}''.  The value must be one of ''xml'', ''html'', ''text'', or qname-but-not-ncname"},
 939 
 940         {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME,
 941         "The feature name cannot be null in TransformerFactory.getFeature(String name)."},
 942 
 943         {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME,
 944         "The feature name cannot be null in TransformerFactory.setFeature(String name, boolean value)."},
 945 
 946         {ErrorMsg.JAXP_UNSUPPORTED_FEATURE,
 947         "Cannot set the feature ''{0}'' on this TransformerFactory."},
 948 
 949         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
 950         "FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present."},
 951 
 952         /*
 953          * Note to translators:  This message describes an internal error in the
 954          * processor.  The term "byte code" is a Java technical term for the
 955          * executable code in a Java method, and "try-catch-finally block"
 956          * refers to the Java keywords with those names.  "Outlined" is a
 957          * technical term internal to XSLTC and should not be translated.
 958          */
 959         {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
 960          "Internal XSLTC error:  the generated byte code contains a " +
 961          "try-catch-finally block and cannot be outlined."},
 962 
 963         /*
 964          * Note to translators:  This message describes an internal error in the
 965          * processor.  The terms "OutlineableChunkStart" and
 966          * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
 967          * should not be translated.  The message indicates that for every
 968          * "start" there must be a corresponding "end", and vice versa, and
 969          * that if one of a pair of "start" and "end" appears between another
 970          * pair of corresponding "start" and "end", then the other half of the
 971          * pair must also be between that same enclosing pair.
 972          */
 973         {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
 974          "Internal XSLTC error:  OutlineableChunkStart and " +
 975          "OutlineableChunkEnd markers must be balanced and properly nested."},
 976 
 977         /*
 978          * Note to translators:  This message describes an internal error in the
 979          * processor.  The term "byte code" is a Java technical term for the
 980          * executable code in a Java method.  The "method" that is being
 981          * referred to is a Java method in a translet that XSLTC is generating
 982          * in processing a stylesheet.  The "instruction" that is being
 983          * referred to is one of the instrutions in the Java byte code in that
 984          * method.  "Outlined" is a technical term internal to XSLTC and
 985          * should not be translated.
 986          */
 987         {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
 988          "Internal XSLTC error:  an instruction that was part of a block of " +
 989          "byte code that was outlined is still referred to in the original " +
 990          "method."
 991         },
 992 
 993 
 994         /*
 995          * Note to translators:  This message describes an internal error in the
 996          * processor.  The "method" that is being referred to is a Java method
 997          * in a translet that XSLTC is generating.
 998          *
 999          */
1000         {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
1001          "Internal XSLTC error:  a method in the translet exceeds the Java " +
1002          "Virtual Machine limitation on the length of a method of 64 " +
1003          "kilobytes.  This is usually caused by templates in a stylesheet " +
1004          "that are very large.  Try restructuring your stylesheet to use " +
1005          "smaller templates."
1006         },
1007 
1008          {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "When Java security is enabled, " +
1009                         "support for deserializing TemplatesImpl is disabled." +
1010                         "This can be overridden by setting the jdk.xml.enableTemplatesImplDeserialization" +
1011                         " system property to true."}
1012 
1013     };
1014 
1015     /** Get the lookup table for error messages.
1016      *
1017      * @return The message lookup table.
1018      */
1019     public Object[][] getContents()
1020     {
1021         return _contents;
1022     }
1023 }