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: This message represents an internal error in 450 * condition in XSLTC. The substitution text is the class name in XSLTC 451 * that is missing some functionality. 452 */ 453 {ErrorMsg.NOT_IMPLEMENTED_ERR, 454 "Not implemented: ''{0}''."}, 455 456 /* 457 * Note to translators: The XML document given to XSLTC as a stylesheet 458 * was not, in fact, a stylesheet. 459 */ 460 {ErrorMsg.NOT_STYLESHEET_ERR, 461 "The input document does not contain an XSL stylesheet."}, 462 463 /* 464 * Note to translators: The element named in the substitution text was 465 * encountered in the stylesheet but is not recognized. 466 */ 467 {ErrorMsg.ELEMENT_PARSE_ERR, 468 "Could not parse element ''{0}''"}, 469 470 /* 471 * Note to translators: "use", "<key>", "node", "node-set", "string" 472 * and "number" are keywords in this context and should not be 473 * translated. This message indicates that the value of the "use" 474 * attribute was not one of the permitted values. 475 */ 476 {ErrorMsg.KEY_USE_ATTR_ERR, 477 "The use attribute of <key> must be node, node-set, string or number."}, 478 479 /* 480 * Note to translators: An XML document can specify the version of the 481 * XML specification to which it adheres. This message indicates that 482 * the version specified for the output document was not valid. 483 */ 484 {ErrorMsg.OUTPUT_VERSION_ERR, 485 "Output XML document version should be 1.0"}, 486 487 /* 488 * Note to translators: The operator in a comparison operation was 489 * not recognized. 490 */ 491 {ErrorMsg.ILLEGAL_RELAT_OP_ERR, 492 "Unknown operator for relational expression"}, 493 494 /* 495 * Note to translators: An attribute set defines as a set of XML 496 * attributes that can be added to an element in the output XML document 497 * as a group. This message is reported if the name specified was not 498 * used to declare an attribute set. The substitution text is the name 499 * that is in error. 500 */ 501 {ErrorMsg.ATTRIBSET_UNDEF_ERR, 502 "Attempting to use non-existing attribute set ''{0}''."}, 503 504 /* 505 * Note to translators: The term "attribute value template" is a term 506 * defined by XSLT which describes the value of an attribute that is 507 * determined by an XPath expression. The message indicates that the 508 * expression was syntactically incorrect; the substitution text 509 * contains the expression that was in error. 510 */ 511 {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, 512 "Cannot parse attribute value template ''{0}''."}, 513 514 /* 515 * Note to translators: ??? 516 */ 517 {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, 518 "Unknown data-type in signature for class ''{0}''."}, 519 520 /* 521 * Note to translators: The substitution text refers to data types. 522 * The message is displayed if a value in a particular context needs to 523 * be converted to type {1}, but that's not possible for a value of 524 * type {0}. 525 */ 526 {ErrorMsg.DATA_CONVERSION_ERR, 527 "Cannot convert data-type ''{0}'' to ''{1}''."}, 528 529 /* 530 * Note to translators: "Templates" is a Java class name that should 531 * not be translated. 532 */ 533 {ErrorMsg.NO_TRANSLET_CLASS_ERR, 534 "This Templates does not contain a valid translet class definition."}, 535 536 /* 537 * Note to translators: "Templates" is a Java class name that should 538 * not be translated. 539 */ 540 {ErrorMsg.NO_MAIN_TRANSLET_ERR, 541 "This Templates does not contain a class with the name ''{0}''."}, 542 543 /* 544 * Note to translators: The substitution text is the name of a class. 545 */ 546 {ErrorMsg.TRANSLET_CLASS_ERR, 547 "Could not load the translet class ''{0}''."}, 548 549 {ErrorMsg.TRANSLET_OBJECT_ERR, 550 "Translet class loaded, but unable to create translet instance."}, 551 552 /* 553 * Note to translators: "ErrorListener" is a Java interface name that 554 * should not be translated. The message indicates that the user tried 555 * to set an ErrorListener object on object of the class named in the 556 * substitution text with "null" Java value. 557 */ 558 {ErrorMsg.ERROR_LISTENER_NULL_ERR, 559 "Attempting to set ErrorListener for ''{0}'' to null"}, 560 561 /* 562 * Note to translators: StreamSource, SAXSource and DOMSource are Java 563 * interface names that should not be translated. 564 */ 565 {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, 566 "Only StreamSource, SAXSource and DOMSource are supported by XSLTC"}, 567 568 /* 569 * Note to translators: "Source" is a Java class name that should not 570 * be translated. The substitution text is the name of Java method. 571 */ 572 {ErrorMsg.JAXP_NO_SOURCE_ERR, 573 "Source object passed to ''{0}'' has no contents."}, 574 575 /* 576 * Note to translators: The message indicates that XSLTC failed to 577 * compile the stylesheet into a translet (class file). 578 */ 579 {ErrorMsg.JAXP_COMPILE_ERR, 580 "Could not compile stylesheet"}, 581 582 /* 583 * Note to translators: "TransformerFactory" is a class name. In this 584 * context, an attribute is a property or setting of the 585 * TransformerFactory object. The substitution text is the name of the 586 * unrecognised attribute. The method used to retrieve the attribute is 587 * "getAttribute", so it's not clear whether it would be best to 588 * translate the term "attribute". 589 */ 590 {ErrorMsg.JAXP_INVALID_ATTR_ERR, 591 "TransformerFactory does not recognise attribute ''{0}''."}, 592 593 /* 594 * Note to translators: "setResult()" and "startDocument()" are Java 595 * method names that should not be translated. 596 */ 597 {ErrorMsg.JAXP_SET_RESULT_ERR, 598 "setResult() must be called prior to startDocument()."}, 599 600 /* 601 * Note to translators: "Transformer" is a Java interface name that 602 * should not be translated. A Transformer object should contained a 603 * reference to a translet object in order to be used for 604 * transformations; this message is produced if that requirement is not 605 * met. 606 */ 607 {ErrorMsg.JAXP_NO_TRANSLET_ERR, 608 "The Transformer has no encapsulated translet object."}, 609 610 /* 611 * Note to translators: The XML document that results from a 612 * transformation needs to be sent to an output handler object; this 613 * message is produced if that requirement is not met. 614 */ 615 {ErrorMsg.JAXP_NO_HANDLER_ERR, 616 "No defined output handler for transformation result."}, 617 618 /* 619 * Note to translators: "Result" is a Java interface name in this 620 * context. The substitution text is a method name. 621 */ 622 {ErrorMsg.JAXP_NO_RESULT_ERR, 623 "Result object passed to ''{0}'' is invalid."}, 624 625 /* 626 * Note to translators: "Transformer" is a Java interface name. The 627 * user's program attempted to access an unrecognized property with the 628 * name specified in the substitution text. The method used to retrieve 629 * the property is "getOutputProperty", so it's not clear whether it 630 * would be best to translate the term "property". 631 */ 632 {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, 633 "Attempting to access invalid Transformer property ''{0}''."}, 634 635 /* 636 * Note to translators: SAX2DOM is the name of a Java class that should 637 * not be translated. This is an adapter in the sense that it takes a 638 * DOM object and converts it to something that uses the SAX API. 639 */ 640 {ErrorMsg.SAX2DOM_ADAPTER_ERR, 641 "Could not create SAX2DOM adapter: ''{0}''."}, 642 643 /* 644 * Note to translators: "XSLTCSource.build()" is a Java method name. 645 * "systemId" is an XML term that is short for "system identification". 646 */ 647 {ErrorMsg.XSLTC_SOURCE_ERR, 648 "XSLTCSource.build() called without systemId being set."}, 649 650 { ErrorMsg.ER_RESULT_NULL, 651 "Result should not be null"}, 652 653 /* 654 * Note to translators: This message indicates that the value argument 655 * of setParameter must be a valid Java Object. 656 */ 657 {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, 658 "The value of param {0} must be a valid Java Object"}, 659 660 661 {ErrorMsg.COMPILE_STDIN_ERR, 662 "The -i option must be used with the -o option."}, 663 664 665 /* 666 * Note to translators: This message contains usage information for a 667 * means of invoking XSLTC from the command-line. The message is 668 * formatted for presentation in English. The strings <output>, 669 * <directory>, etc. indicate user-specified argument values, and can 670 * be translated - the argument <package> refers to a Java package, so 671 * it should be handled in the same way the term is handled for JDK 672 * documentation. 673 */ 674 {ErrorMsg.COMPILE_USAGE_STR, 675 "SYNOPSIS\n"+ 676 " java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o <output>]\n"+ 677 " [-d <directory>] [-j <jarfile>] [-p <package>]\n"+ 678 " [-n] [-x] [-u] [-v] [-h] { <stylesheet> | -i }\n\n"+ 679 "OPTIONS\n"+ 680 " -o <output> assigns the name <output> to the generated\n"+ 681 " translet. By default the translet name is\n"+ 682 " derived from the <stylesheet> name. This option\n"+ 683 " is ignored if compiling multiple stylesheets.\n"+ 684 " -d <directory> specifies a destination directory for translet\n"+ 685 " -j <jarfile> packages translet classes into a jar file of the\n"+ 686 " name specified as <jarfile>\n"+ 687 " -p <package> specifies a package name prefix for all generated\n"+ 688 " translet classes.\n"+ 689 " -n enables template inlining (default behavior better\n"+ 690 " on average).\n"+ 691 " -x turns on additional debugging message output\n"+ 692 " -u interprets <stylesheet> arguments as URLs\n"+ 693 " -i forces compiler to read stylesheet from stdin\n"+ 694 " -v prints the version of the compiler\n"+ 695 " -h prints this usage statement\n"}, 696 697 /* 698 * Note to translators: This message contains usage information for a 699 * means of invoking XSLTC from the command-line. The message is 700 * formatted for presentation in English. The strings <jarfile>, 701 * <document>, etc. indicate user-specified argument values, and can 702 * be translated - the argument <class> refers to a Java class, so it 703 * should be handled in the same way the term is handled for JDK 704 * documentation. 705 */ 706 {ErrorMsg.TRANSFORM_USAGE_STR, 707 "SYNOPSIS \n"+ 708 " java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j <jarfile>]\n"+ 709 " [-x] [-n <iterations>] {-u <document_url> | <document>}\n"+ 710 " <class> [<param1>=<value1> ...]\n\n"+ 711 " uses the translet <class> to transform an XML document \n"+ 712 " specified as <document>. The translet <class> is either in\n"+ 713 " the user's CLASSPATH or in the optionally specified <jarfile>.\n"+ 714 "OPTIONS\n"+ 715 " -j <jarfile> specifies a jarfile from which to load translet\n"+ 716 " -x turns on additional debugging message output\n"+ 717 " -n <iterations> runs the transformation <iterations> times and\n"+ 718 " displays profiling information\n"+ 719 " -u <document_url> specifies XML input document as a URL\n"}, 720 721 722 723 /* 724 * Note to translators: "<xsl:sort>", "<xsl:for-each>" and 725 * "<xsl:apply-templates>" are keywords that should not be translated. 726 * The message indicates that an xsl:sort element must be a child of 727 * one of the other kinds of elements mentioned. 728 */ 729 {ErrorMsg.STRAY_SORT_ERR, 730 "<xsl:sort> can only be used within <xsl:for-each> or <xsl:apply-templates>."}, 731 732 /* 733 * Note to translators: The message indicates that the encoding 734 * requested for the output document was on that requires support that 735 * is not available from the Java Virtual Machine being used to execute 736 * the program. 737 */ 738 {ErrorMsg.UNSUPPORTED_ENCODING, 739 "Output encoding ''{0}'' is not supported on this JVM."}, 740 741 /* 742 * Note to translators: The message indicates that the XPath expression 743 * named in the substitution text was not well formed syntactically. 744 */ 745 {ErrorMsg.SYNTAX_ERR, 746 "Syntax error in ''{0}''."}, 747 748 /* 749 * Note to translators: The substitution text is the name of a Java 750 * class. The term "constructor" here is the Java term. The message is 751 * displayed if XSLTC could not find a constructor for the specified 752 * class. 753 */ 754 {ErrorMsg.CONSTRUCTOR_NOT_FOUND, 755 "Cannot find external constructor ''{0}''."}, 756 757 /* 758 * Note to translators: "static" is the Java keyword. The substitution 759 * text is the name of a function. The first argument of that function 760 * is not of the required type. 761 */ 762 {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, 763 "The first argument to the non-static Java function ''{0}'' is not a "+ 764 "valid object reference."}, 765 766 /* 767 * Note to translators: An XPath expression was not of the type 768 * required in a particular context. The substitution text is the 769 * expression that was in error. 770 */ 771 {ErrorMsg.TYPE_CHECK_ERR, 772 "Error checking type of the expression ''{0}''."}, 773 774 /* 775 * Note to translators: An XPath expression was not of the type 776 * required in a particular context. However, the location of the 777 * problematic expression is unknown. 778 */ 779 {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, 780 "Error checking type of an expression at an unknown location."}, 781 782 /* 783 * Note to translators: The substitution text is the name of a command- 784 * line option that was not recognized. 785 */ 786 {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, 787 "The command-line option ''{0}'' is not valid."}, 788 789 /* 790 * Note to translators: The substitution text is the name of a command- 791 * line option. 792 */ 793 {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, 794 "The command-line option ''{0}'' is missing a required argument."}, 795 796 /* 797 * Note to translators: This message is used to indicate the severity 798 * of another message. The substitution text contains two error 799 * messages. The spacing before the second substitution text indents 800 * it the same amount as the first in English. 801 */ 802 {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, 803 "WARNING: ''{0}''\n :{1}"}, 804 805 /* 806 * Note to translators: This message is used to indicate the severity 807 * of another message. The substitution text is an error message. 808 */ 809 {ErrorMsg.WARNING_MSG, 810 "WARNING: ''{0}''"}, 811 812 /* 813 * Note to translators: This message is used to indicate the severity 814 * of another message. The substitution text contains two error 815 * messages. The spacing before the second substitution text indents 816 * it the same amount as the first in English. 817 */ 818 {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, 819 "FATAL ERROR: ''{0}''\n :{1}"}, 820 821 /* 822 * Note to translators: This message is used to indicate the severity 823 * of another message. The substitution text is an error message. 824 */ 825 {ErrorMsg.FATAL_ERR_MSG, 826 "FATAL ERROR: ''{0}''"}, 827 828 /* 829 * Note to translators: This message is used to indicate the severity 830 * of another message. The substitution text contains two error 831 * messages. The spacing before the second substitution text indents 832 * it the same amount as the first in English. 833 */ 834 {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, 835 "ERROR: ''{0}''\n :{1}"}, 836 837 /* 838 * Note to translators: This message is used to indicate the severity 839 * of another message. The substitution text is an error message. 840 */ 841 {ErrorMsg.ERROR_MSG, 842 "ERROR: ''{0}''"}, 843 844 /* 845 * Note to translators: The substitution text is the name of a class. 846 */ 847 {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, 848 "Transform using translet ''{0}'' "}, 849 850 /* 851 * Note to translators: The first substitution is the name of a class, 852 * while the second substitution is the name of a jar file. 853 */ 854 {ErrorMsg.TRANSFORM_WITH_JAR_STR, 855 "Transform using translet ''{0}'' from jar file ''{1}''"}, 856 857 /* 858 * Note to translators: "TransformerFactory" is the name of a Java 859 * interface and must not be translated. The substitution text is 860 * the name of the class that could not be instantiated. 861 */ 862 {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, 863 "Could not create an instance of the TransformerFactory class ''{0}''."}, 864 865 /* 866 * Note to translators: This message is produced when the user 867 * specified a name for the translet class that contains characters 868 * that are not permitted in a Java class name. The substitution 869 * text "{0}" specifies the name the user requested, while "{1}" 870 * specifies the name the processor used instead. 871 */ 872 {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT, 873 "The name ''{0}'' could not be used as the name of the translet "+ 874 "class because it contains characters that are not permitted in the "+ 875 "name of Java class. The name ''{1}'' was used instead."}, 876 877 /* 878 * Note to translators: The following message is used as a header. 879 * All the error messages are collected together and displayed beneath 880 * this message. 881 */ 882 {ErrorMsg.COMPILER_ERROR_KEY, 883 "Compiler errors:"}, 884 885 /* 886 * Note to translators: The following message is used as a header. 887 * All the warning messages are collected together and displayed 888 * beneath this message. 889 */ 890 {ErrorMsg.COMPILER_WARNING_KEY, 891 "Compiler warnings:"}, 892 893 /* 894 * Note to translators: The following message is used as a header. 895 * All the error messages that are produced when the stylesheet is 896 * applied to an input document are collected together and displayed 897 * beneath this message. A 'translet' is the compiled form of a 898 * stylesheet (see above). 899 */ 900 {ErrorMsg.RUNTIME_ERROR_KEY, 901 "Translet errors:"}, 902 903 /* 904 * Note to translators: An attribute whose value is constrained to 905 * be a "QName" or a list of "QNames" had a value that was incorrect. 906 * 'QName' is an XML syntactic term that must not be translated. The 907 * substitution text contains the actual value of the attribute. 908 */ 909 {ErrorMsg.INVALID_QNAME_ERR, 910 "An attribute whose value must be a QName or whitespace-separated list of QNames had the value ''{0}''"}, 911 912 /* 913 * Note to translators: An attribute whose value is required to 914 * be an "NCName". 915 * 'NCName' is an XML syntactic term that must not be translated. The 916 * substitution text contains the actual value of the attribute. 917 */ 918 {ErrorMsg.INVALID_NCNAME_ERR, 919 "An attribute whose value must be an NCName had the value ''{0}''"}, 920 921 /* 922 * Note to translators: An attribute with an incorrect value was 923 * encountered. The permitted value is one of the literal values 924 * "xml", "html" or "text"; it is also permitted to have the form of 925 * a QName that is not also an NCName. The terms "method", 926 * "xsl:output", "xml", "html" and "text" are keywords that must not 927 * be translated. The term "qname-but-not-ncname" is an XML syntactic 928 * term. The substitution text contains the actual value of the 929 * attribute. 930 */ 931 {ErrorMsg.INVALID_METHOD_IN_OUTPUT, 932 "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"}, 933 934 {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME, 935 "The feature name cannot be null in TransformerFactory.getFeature(String name)."}, 936 937 {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME, 938 "The feature name cannot be null in TransformerFactory.setFeature(String name, boolean value)."}, 939 940 {ErrorMsg.JAXP_UNSUPPORTED_FEATURE, 941 "Cannot set the feature ''{0}'' on this TransformerFactory."}, 942 943 {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, 944 "FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present."}, 945 946 /* 947 * Note to translators: This message describes an internal error in the 948 * processor. The term "byte code" is a Java technical term for the 949 * executable code in a Java method, and "try-catch-finally block" 950 * refers to the Java keywords with those names. "Outlined" is a 951 * technical term internal to XSLTC and should not be translated. 952 */ 953 {ErrorMsg.OUTLINE_ERR_TRY_CATCH, 954 "Internal XSLTC error: the generated byte code contains a " + 955 "try-catch-finally block and cannot be outlined."}, 956 957 /* 958 * Note to translators: This message describes an internal error in the 959 * processor. The terms "OutlineableChunkStart" and 960 * "OutlineableChunkEnd" are the names of classes internal to XSLTC and 961 * should not be translated. The message indicates that for every 962 * "start" there must be a corresponding "end", and vice versa, and 963 * that if one of a pair of "start" and "end" appears between another 964 * pair of corresponding "start" and "end", then the other half of the 965 * pair must also be between that same enclosing pair. 966 */ 967 {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS, 968 "Internal XSLTC error: OutlineableChunkStart and " + 969 "OutlineableChunkEnd markers must be balanced and properly nested."}, 970 971 /* 972 * Note to translators: This message describes an internal error in the 973 * processor. The term "byte code" is a Java technical term for the 974 * executable code in a Java method. The "method" that is being 975 * referred to is a Java method in a translet that XSLTC is generating 976 * in processing a stylesheet. The "instruction" that is being 977 * referred to is one of the instrutions in the Java byte code in that 978 * method. "Outlined" is a technical term internal to XSLTC and 979 * should not be translated. 980 */ 981 {ErrorMsg.OUTLINE_ERR_DELETED_TARGET, 982 "Internal XSLTC error: an instruction that was part of a block of " + 983 "byte code that was outlined is still referred to in the original " + 984 "method." 985 }, 986 987 988 /* 989 * Note to translators: This message describes an internal error in the 990 * processor. The "method" that is being referred to is a Java method 991 * in a translet that XSLTC is generating. 992 * 993 */ 994 {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG, 995 "Internal XSLTC error: a method in the translet exceeds the Java " + 996 "Virtual Machine limitation on the length of a method of 64 " + 997 "kilobytes. This is usually caused by templates in a stylesheet " + 998 "that are very large. Try restructuring your stylesheet to use " + 999 "smaller templates." 1000 }, 1001 1002 {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "When Java security is enabled, " + 1003 "support for deserializing TemplatesImpl is disabled." + 1004 "This can be overridden by setting the jdk.xml.enableTemplatesImplDeserialization" + 1005 " system property to true."} 1006 1007 }; 1008 1009 /** Get the lookup table for error messages. 1010 * 1011 * @return The message lookup table. 1012 */ 1013 public Object[][] getContents() 1014 { 1015 return _contents; 1016 } 1017 }