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