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