1 16 19 20 package org.apache.xalan.xsltc.compiler.util; 21 22 import java.util.ListResourceBundle ; 23 24 27 public class ErrorMessages extends ListResourceBundle { 28 29 87 88 private static final String [][] m_errorMessages = { 90 {ErrorMsg.MULTIPLE_STYLESHEET_ERR, 91 "More than one stylesheet defined in the same file."}, 92 93 98 {ErrorMsg.TEMPLATE_REDEF_ERR, 99 "Template ''{0}'' already defined in this stylesheet."}, 100 101 102 107 {ErrorMsg.TEMPLATE_UNDEF_ERR, 108 "Template ''{0}'' not defined in this stylesheet."}, 109 110 114 {ErrorMsg.VARIABLE_REDEF_ERR, 115 "Variable ''{0}'' is multiply defined in the same scope."}, 116 117 122 {ErrorMsg.VARIABLE_UNDEF_ERR, 123 "Variable or parameter ''{0}'' is undefined."}, 124 125 130 {ErrorMsg.CLASS_NOT_FOUND_ERR, 131 "Cannot find class ''{0}''."}, 132 133 139 {ErrorMsg.METHOD_NOT_FOUND_ERR, 140 "Cannot find external method ''{0}'' (must be public)."}, 141 142 148 {ErrorMsg.ARGUMENT_CONVERSION_ERR, 149 "Cannot convert argument/return type in call to method ''{0}''"}, 150 151 155 {ErrorMsg.FILE_NOT_FOUND_ERR, 156 "File or URI ''{0}'' not found."}, 157 158 162 {ErrorMsg.INVALID_URI_ERR, 163 "Invalid URI ''{0}''."}, 164 165 169 {ErrorMsg.FILE_ACCESS_ERR, 170 "Cannot open file or URI ''{0}''."}, 171 172 176 {ErrorMsg.MISSING_ROOT_ERR, 177 "<xsl:stylesheet> or <xsl:transform> element expected."}, 178 179 184 {ErrorMsg.NAMESPACE_UNDEF_ERR, 185 "Namespace prefix ''{0}'' is undeclared."}, 186 187 191 {ErrorMsg.FUNCTION_RESOLVE_ERR, 192 "Unable to resolve call to function ''{0}''."}, 193 194 198 {ErrorMsg.NEED_LITERAL_ERR, 199 "Argument to ''{0}'' must be a literal string."}, 200 201 206 {ErrorMsg.XPATH_PARSER_ERR, 207 "Error parsing XPath expression ''{0}''."}, 208 209 214 {ErrorMsg.REQUIRED_ATTR_ERR, 215 "Required attribute ''{0}'' is missing."}, 216 217 222 {ErrorMsg.ILLEGAL_CHAR_ERR, 223 "Illegal character ''{0}'' in XPath expression."}, 224 225 231 {ErrorMsg.ILLEGAL_PI_ERR, 232 "Illegal name ''{0}'' for processing instruction."}, 233 234 240 {ErrorMsg.STRAY_ATTRIBUTE_ERR, 241 "Attribute ''{0}'' outside of element."}, 242 243 249 {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, 250 "Illegal attribute ''{0}''."}, 251 252 258 {ErrorMsg.CIRCULAR_INCLUDE_ERR, 259 "Circular import/include. Stylesheet ''{0}'' already loaded."}, 260 261 266 {ErrorMsg.RESULT_TREE_SORT_ERR, 267 "Result-tree fragments cannot be sorted (<xsl:sort> elements are " + 268 "ignored). You must sort the nodes when creating the result tree."}, 269 270 275 {ErrorMsg.SYMBOLS_REDEF_ERR, 276 "Decimal formatting ''{0}'' is already defined."}, 277 278 282 {ErrorMsg.XSL_VERSION_ERR, 283 "XSL version ''{0}'' is not supported by XSLTC."}, 284 285 289 {ErrorMsg.CIRCULAR_VARIABLE_ERR, 290 "Circular variable/parameter reference in ''{0}''."}, 291 292 296 {ErrorMsg.ILLEGAL_BINARY_OP_ERR, 297 "Unknown operator for binary expression."}, 298 299 303 {ErrorMsg.ILLEGAL_ARG_ERR, 304 "Illegal argument(s) for function call."}, 305 306 311 {ErrorMsg.DOCUMENT_ARG_ERR, 312 "Second argument to document() function must be a node-set."}, 313 314 319 {ErrorMsg.MISSING_WHEN_ERR, 320 "At least one <xsl:when> element required in <xsl:choose>."}, 321 322 327 {ErrorMsg.MULTIPLE_OTHERWISE_ERR, 328 "Only one <xsl:otherwise> element allowed in <xsl:choose>."}, 329 330 335 {ErrorMsg.STRAY_OTHERWISE_ERR, 336 "<xsl:otherwise> can only be used within <xsl:choose>."}, 337 338 343 {ErrorMsg.STRAY_WHEN_ERR, 344 "<xsl:when> can only be used within <xsl:choose>."}, 345 346 351 {ErrorMsg.WHEN_ELEMENT_ERR, 352 "Only <xsl:when> and <xsl:otherwise> elements allowed in <xsl:choose>."}, 353 354 358 {ErrorMsg.UNNAMED_ATTRIBSET_ERR, 359 "<xsl:attribute-set> is missing the 'name' attribute."}, 360 361 365 {ErrorMsg.ILLEGAL_CHILD_ERR, 366 "Illegal child element."}, 367 368 373 {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, 374 "You cannot call an element ''{0}''"}, 375 376 381 {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, 382 "You cannot call an attribute ''{0}''"}, 383 384 391 {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, 392 "Text data outside of top-level <xsl:stylesheet> element."}, 393 394 399 {ErrorMsg.SAX_PARSER_CONFIG_ERR, 400 "JAXP parser not configured correctly"}, 401 402 406 {ErrorMsg.INTERNAL_ERR, 407 "Unrecoverable XSLTC-internal error: ''{0}''"}, 408 409 414 {ErrorMsg.UNSUPPORTED_XSL_ERR, 415 "Unsupported XSL element ''{0}''."}, 416 417 423 {ErrorMsg.UNSUPPORTED_EXT_ERR, 424 "Unrecognised XSLTC extension ''{0}''."}, 425 426 433 {ErrorMsg.MISSING_XSLT_URI_ERR, 434 "The input document is not a stylesheet (the XSL namespace is not "+ 435 "declared in the root element)."}, 436 437 441 {ErrorMsg.MISSING_XSLT_TARGET_ERR, 442 "Could not find stylesheet target ''{0}''."}, 443 444 449 {ErrorMsg.NOT_IMPLEMENTED_ERR, 450 "Not implemented: ''{0}''."}, 451 452 456 {ErrorMsg.NOT_STYLESHEET_ERR, 457 "The input document does not contain an XSL stylesheet."}, 458 459 463 {ErrorMsg.ELEMENT_PARSE_ERR, 464 "Could not parse element ''{0}''"}, 465 466 472 {ErrorMsg.KEY_USE_ATTR_ERR, 473 "The use attribute of <key> must be node, node-set, string or number."}, 474 475 480 {ErrorMsg.OUTPUT_VERSION_ERR, 481 "Output XML document version should be 1.0"}, 482 483 487 {ErrorMsg.ILLEGAL_RELAT_OP_ERR, 488 "Unknown operator for relational expression"}, 489 490 497 {ErrorMsg.ATTRIBSET_UNDEF_ERR, 498 "Attempting to use non-existing attribute set ''{0}''."}, 499 500 507 {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, 508 "Cannot parse attribute value template ''{0}''."}, 509 510 513 {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, 514 "Unknown data-type in signature for class ''{0}''."}, 515 516 522 {ErrorMsg.DATA_CONVERSION_ERR, 523 "Cannot convert data-type ''{0}'' to ''{1}''."}, 524 525 529 {ErrorMsg.NO_TRANSLET_CLASS_ERR, 530 "This Templates does not contain a valid translet class definition."}, 531 532 536 {ErrorMsg.NO_MAIN_TRANSLET_ERR, 537 "This Templates does not contain a class with the name ''{0}''."}, 538 539 542 {ErrorMsg.TRANSLET_CLASS_ERR, 543 "Could not load the translet class ''{0}''."}, 544 545 {ErrorMsg.TRANSLET_OBJECT_ERR, 546 "Translet class loaded, but unable to create translet instance."}, 547 548 554 {ErrorMsg.ERROR_LISTENER_NULL_ERR, 555 "Attempting to set ErrorListener for ''{0}'' to null"}, 556 557 561 {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, 562 "Only StreamSource, SAXSource and DOMSource are supported by XSLTC"}, 563 564 568 {ErrorMsg.JAXP_NO_SOURCE_ERR, 569 "Source object passed to ''{0}'' has no contents."}, 570 571 575 {ErrorMsg.JAXP_COMPILE_ERR, 576 "Could not compile stylesheet"}, 577 578 586 {ErrorMsg.JAXP_INVALID_ATTR_ERR, 587 "TransformerFactory does not recognise attribute ''{0}''."}, 588 589 593 {ErrorMsg.JAXP_SET_RESULT_ERR, 594 "setResult() must be called prior to startDocument()."}, 595 596 603 {ErrorMsg.JAXP_NO_TRANSLET_ERR, 604 "The Transformer has no encapsulated translet object."}, 605 606 611 {ErrorMsg.JAXP_NO_HANDLER_ERR, 612 "No defined output handler for transformation result."}, 613 614 618 {ErrorMsg.JAXP_NO_RESULT_ERR, 619 "Result object passed to ''{0}'' is invalid."}, 620 621 628 {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, 629 "Attempting to access invalid Transformer property ''{0}''."}, 630 631 636 {ErrorMsg.SAX2DOM_ADAPTER_ERR, 637 "Could not create SAX2DOM adapter: ''{0}''."}, 638 639 643 {ErrorMsg.XSLTC_SOURCE_ERR, 644 "XSLTCSource.build() called without systemId being set."}, 645 646 { ErrorMsg.ER_RESULT_NULL, 647 "Result should not be null"}, 648 649 653 {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, 654 "The value of param {0} must be a valid Java Object"}, 655 656 657 {ErrorMsg.COMPILE_STDIN_ERR, 658 "The -i option must be used with the -o option."}, 659 660 661 670 {ErrorMsg.COMPILE_USAGE_STR, 671 "SYNOPSIS\n"+ 672 " java org.apache.xalan.xsltc.cmdline.Compile [-o <output>]\n"+ 673 " [-d <directory>] [-j <jarfile>] [-p <package>]\n"+ 674 " [-n] [-x] [-s] [-u] [-v] [-h] { <stylesheet> | -i }\n\n"+ 675 "OPTIONS\n"+ 676 " -o <output> assigns the name <output> to the generated\n"+ 677 " translet. By default the translet name is\n"+ 678 " derived from the <stylesheet> name. This option\n"+ 679 " is ignored if compiling multiple stylesheets.\n"+ 680 " -d <directory> specifies a destination directory for translet\n"+ 681 " -j <jarfile> packages translet classes into a jar file of the\n"+ 682 " name specified as <jarfile>\n"+ 683 " -p <package> specifies a package name prefix for all generated\n"+ 684 " translet classes.\n"+ 685 " -n enables template inlining (default behavior better\n"+ 686 " on average).\n"+ 687 " -x turns on additional debugging message output\n"+ 688 " -s disables calling System.exit\n"+ 689 " -u interprets <stylesheet> arguments as URLs\n"+ 690 " -i forces compiler to read stylesheet from stdin\n"+ 691 " -v prints the version of the compiler\n"+ 692 " -h prints this usage statement\n"}, 693 694 703 {ErrorMsg.TRANSFORM_USAGE_STR, 704 "SYNOPSIS \n"+ 705 " java org.apache.xalan.xsltc.cmdline.Transform [-j <jarfile>]\n"+ 706 " [-x] [-s] [-n <iterations>] {-u <document_url> | <document>}\n"+ 707 " <class> [<param1>=<value1> ...]\n\n"+ 708 " uses the translet <class> to transform an XML document \n"+ 709 " specified as <document>. The translet <class> is either in\n"+ 710 " the user's CLASSPATH or in the optionally specified <jarfile>.\n"+ 711 "OPTIONS\n"+ 712 " -j <jarfile> specifies a jarfile from which to load translet\n"+ 713 " -x turns on additional debugging message output\n"+ 714 " -s disables calling System.exit\n"+ 715 " -n <iterations> runs the transformation <iterations> times and\n"+ 716 " displays profiling information\n"+ 717 " -u <document_url> specifies XML input document as a URL\n"}, 718 719 720 721 727 {ErrorMsg.STRAY_SORT_ERR, 728 "<xsl:sort> can only be used within <xsl:for-each> or <xsl:apply-templates>."}, 729 730 736 {ErrorMsg.UNSUPPORTED_ENCODING, 737 "Output encoding ''{0}'' is not supported on this JVM."}, 738 739 743 {ErrorMsg.SYNTAX_ERR, 744 "Syntax error in ''{0}''."}, 745 746 752 {ErrorMsg.CONSTRUCTOR_NOT_FOUND, 753 "Cannot find external constructor ''{0}''."}, 754 755 760 {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, 761 "The first argument to the non-static Java function ''{0}'' is not a "+ 762 "valid object reference."}, 763 764 769 {ErrorMsg.TYPE_CHECK_ERR, 770 "Error checking type of the expression ''{0}''."}, 771 772 777 {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, 778 "Error checking type of an expression at an unknown location."}, 779 780 784 {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, 785 "The command-line option ''{0}'' is not valid."}, 786 787 791 {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, 792 "The command-line option ''{0}'' is missing a required argument."}, 793 794 800 {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, 801 "WARNING: ''{0}''\n :{1}"}, 802 803 807 {ErrorMsg.WARNING_MSG, 808 "WARNING: ''{0}''"}, 809 810 816 {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, 817 "FATAL ERROR: ''{0}''\n :{1}"}, 818 819 823 {ErrorMsg.FATAL_ERR_MSG, 824 "FATAL ERROR: ''{0}''"}, 825 826 832 {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, 833 "ERROR: ''{0}''\n :{1}"}, 834 835 839 {ErrorMsg.ERROR_MSG, 840 "ERROR: ''{0}''"}, 841 842 845 {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, 846 "Transform using translet ''{0}'' "}, 847 848 852 {ErrorMsg.TRANSFORM_WITH_JAR_STR, 853 "Transform using translet ''{0}'' from jar file ''{1}''"}, 854 855 860 {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, 861 "Could not create an instance of the TransformerFactory class ''{0}''."}, 862 863 870 {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT, 871 "The name ''{0}'' could not be used as the name of the translet "+ 872 "class because it contains characters that are not permitted in the "+ 873 "name of Java class. The name ''{1}'' was used instead."}, 874 875 880 {ErrorMsg.COMPILER_ERROR_KEY, 881 "Compiler errors:"}, 882 883 888 {ErrorMsg.COMPILER_WARNING_KEY, 889 "Compiler warnings:"}, 890 891 898 {ErrorMsg.RUNTIME_ERROR_KEY, 899 "Translet errors:"}, 900 901 907 {ErrorMsg.INVALID_QNAME_ERR, 908 "An attribute whose value must be a QName or whitespace-separated list of QNames had the value ''{0}''"}, 909 910 916 {ErrorMsg.INVALID_NCNAME_ERR, 917 "An attribute whose value must be an NCName had the value ''{0}''"}, 918 919 929 {ErrorMsg.INVALID_METHOD_IN_OUTPUT, 930 "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"} 931 }; 932 933 934 public Object [][] getContents() { 935 return m_errorMessages; 936 } 937 } 938 | Popular Tags |