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 
  21 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
  22 
  23 import java.util.ListResourceBundle;
  24 
  25 /**
  26  * @author Morten Jorgensen
  27  */
  28 public 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:  A result-tree fragment is a portion of a
 278          * resulting XML document represented as a tree.  "<xsl:sort>" is a
 279          * keyword and should not be translated.
 280          */
 281         {ErrorMsg.RESULT_TREE_SORT_ERR,
 282         "Result-tree fragments cannot be sorted (<xsl:sort> elements are " +
 283         "ignored). You must sort the nodes when creating the result tree."},
 284 
 285         /*
 286          * Note to translators:  A name can be given to a particular style to be
 287          * used to format decimal values.  The substitution text gives the name
 288          * of such a style for which more than one declaration was encountered.
 289          */
 290         {ErrorMsg.SYMBOLS_REDEF_ERR,
 291         "Decimal formatting ''{0}'' is already defined."},
 292 
 293         /*
 294          * Note to translators:  The stylesheet version named in the
 295          * substitution text is not supported.
 296          */
 297         {ErrorMsg.XSL_VERSION_ERR,
 298         "XSL version ''{0}'' is not supported by XSLTC."},
 299 
 300         /*
 301          * Note to translators:  The definitions of one or more variables or
 302          * parameters depend on one another.
 303          */
 304         {ErrorMsg.CIRCULAR_VARIABLE_ERR,
 305         "Circular variable/parameter reference in ''{0}''."},
 306 
 307         /*
 308          * Note to translators:  The operator in an expresion with two operands was
 309          * not recognized.
 310          */
 311         {ErrorMsg.ILLEGAL_BINARY_OP_ERR,
 312         "Unknown operator for binary expression."},
 313 
 314         /*
 315          * Note to translators:  This message is produced if a reference to a
 316          * function has too many or too few arguments.
 317          */
 318         {ErrorMsg.ILLEGAL_ARG_ERR,
 319         "Illegal argument(s) for function call."},
 320 
 321         /*
 322          * Note to translators:  "document()" is the name of function and must
 323          * not be translated.  A node-set is a set of the nodes in the tree
 324          * representation of an XML document.
 325          */
 326         {ErrorMsg.DOCUMENT_ARG_ERR,
 327         "Second argument to document() function must be a node-set."},
 328 
 329         /*
 330          * Note to translators:  "<xsl:when>" and "<xsl:choose>" are keywords
 331          * and should not be translated.  This message describes a syntax error
 332          * in the stylesheet.
 333          */
 334         {ErrorMsg.MISSING_WHEN_ERR,
 335         "At least one <xsl:when> element required in <xsl:choose>."},
 336 
 337         /*
 338          * Note to translators:  "<xsl:otherwise>" and "<xsl:choose>" are
 339          * keywords and should not be translated.  This message describes a
 340          * syntax error in the stylesheet.
 341          */
 342         {ErrorMsg.MULTIPLE_OTHERWISE_ERR,
 343         "Only one <xsl:otherwise> element allowed 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.STRAY_OTHERWISE_ERR,
 351         "<xsl:otherwise> can only be used within <xsl:choose>."},
 352 
 353         /*
 354          * Note to translators:  "<xsl:when>" and "<xsl:choose>" are keywords
 355          * and should not be translated.  This message describes a syntax error
 356          * in the stylesheet.
 357          */
 358         {ErrorMsg.STRAY_WHEN_ERR,
 359         "<xsl:when> can only be used within <xsl:choose>."},
 360 
 361         /*
 362          * Note to translators:  "<xsl:when>", "<xsl:otherwise>" and
 363          * "<xsl:choose>" are keywords and should not be translated.  This
 364          * message describes a syntax error in the stylesheet.
 365          */
 366         {ErrorMsg.WHEN_ELEMENT_ERR,
 367         "Only <xsl:when> and <xsl:otherwise> elements allowed in <xsl:choose>."},
 368 
 369         /*
 370          * Note to translators:  "<xsl:attribute-set>" and "name" are keywords
 371          * that should not be translated.
 372          */
 373         {ErrorMsg.UNNAMED_ATTRIBSET_ERR,
 374         "<xsl:attribute-set> is missing the 'name' attribute."},
 375 
 376         /*
 377          * Note to translators:  An element in the stylesheet contained an
 378          * element of a type that it was not permitted to contain.
 379          */
 380         {ErrorMsg.ILLEGAL_CHILD_ERR,
 381         "Illegal child element."},
 382 
 383         /*
 384          * Note to translators:  The stylesheet tried to create an element with
 385          * a name that was not a valid XML name.  The substitution text contains
 386          * the name.
 387          */
 388         {ErrorMsg.ILLEGAL_ELEM_NAME_ERR,
 389         "You cannot call an element ''{0}''"},
 390 
 391         /*
 392          * Note to translators:  The stylesheet tried to create an attribute
 393          * with a name that was not a valid XML name.  The substitution text
 394          * contains the name.
 395          */
 396         {ErrorMsg.ILLEGAL_ATTR_NAME_ERR,
 397         "You cannot call an attribute ''{0}''"},
 398 
 399         /*
 400          * Note to translators:  The children of the outermost element of a
 401          * stylesheet are referred to as top-level elements.  No text should
 402          * occur within that outermost element unless it is within a top-level
 403          * element.  This message indicates that that constraint was violated.
 404          * "<xsl:stylesheet>" is a keyword that should not be translated.
 405          */
 406         {ErrorMsg.ILLEGAL_TEXT_NODE_ERR,
 407         "Text data outside of top-level <xsl:stylesheet> element."},
 408 
 409         /*
 410          * Note to translators:  JAXP is an acronym for the Java API for XML
 411          * Processing.  This message indicates that the XML parser provided to
 412          * XSLTC to process the XML input document had a configuration problem.
 413          */
 414         {ErrorMsg.SAX_PARSER_CONFIG_ERR,
 415         "JAXP parser not configured correctly"},
 416 
 417         /*
 418          * Note to translators:  The substitution text names the internal error
 419          * encountered.
 420          */
 421         {ErrorMsg.INTERNAL_ERR,
 422         "Unrecoverable XSLTC-internal error: ''{0}''"},
 423 
 424         /*
 425          * Note to translators:  The stylesheet contained an element that was
 426          * not recognized as part of the XSL syntax.  The substitution text
 427          * gives the element name.
 428          */
 429         {ErrorMsg.UNSUPPORTED_XSL_ERR,
 430         "Unsupported XSL element ''{0}''."},
 431 
 432         /*
 433          * Note to translators:  The stylesheet referred to an extension to the
 434          * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does
 435          * not recognized the particular extension named.  The substitution text
 436          * gives the extension name.
 437          */
 438         {ErrorMsg.UNSUPPORTED_EXT_ERR,
 439         "Unrecognised XSLTC extension ''{0}''."},
 440 
 441         /*
 442          * Note to translators:  The XML document given to XSLTC as a stylesheet
 443          * was not, in fact, a stylesheet.  XSLTC is able to detect that in this
 444          * case because the outermost element in the stylesheet has to be
 445          * declared with respect to the XSL namespace URI, but no declaration
 446          * for that namespace was seen.
 447          */
 448         {ErrorMsg.MISSING_XSLT_URI_ERR,
 449         "The input document is not a stylesheet (the XSL namespace is not "+
 450         "declared in the root element)."},
 451 
 452         /*
 453          * Note to translators:  XSLTC could not find the stylesheet document
 454          * with the name specified by the substitution text.
 455          */
 456         {ErrorMsg.MISSING_XSLT_TARGET_ERR,
 457         "Could not find stylesheet target ''{0}''."},
 458 
 459         /*
 460          * Note to translators:  access to the stylesheet target is denied
 461          */
 462         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
 463         "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalStylesheet property."},
 464 
 465         /*
 466          * Note to translators:  This message represents an internal error in
 467          * condition in XSLTC.  The substitution text is the class name in XSLTC
 468          * that is missing some functionality.
 469          */
 470         {ErrorMsg.NOT_IMPLEMENTED_ERR,
 471         "Not implemented: ''{0}''."},
 472 
 473         /*
 474          * Note to translators:  The XML document given to XSLTC as a stylesheet
 475          * was not, in fact, a stylesheet.
 476          */
 477         {ErrorMsg.NOT_STYLESHEET_ERR,
 478         "The input document does not contain an XSL stylesheet."},
 479 
 480         /*
 481          * Note to translators:  The element named in the substitution text was
 482          * encountered in the stylesheet but is not recognized.
 483          */
 484         {ErrorMsg.ELEMENT_PARSE_ERR,
 485         "Could not parse element ''{0}''"},
 486 
 487         /*
 488          * Note to translators:  "use", "<key>", "node", "node-set", "string"
 489          * and "number" are keywords in this context and should not be
 490          * translated.  This message indicates that the value of the "use"
 491          * attribute was not one of the permitted values.
 492          */
 493         {ErrorMsg.KEY_USE_ATTR_ERR,
 494         "The use attribute of <key> must be node, node-set, string or number."},
 495 
 496         /*
 497          * Note to translators:  An XML document can specify the version of the
 498          * XML specification to which it adheres.  This message indicates that
 499          * the version specified for the output document was not valid.
 500          */
 501         {ErrorMsg.OUTPUT_VERSION_ERR,
 502         "Output XML document version should be 1.0"},
 503 
 504         /*
 505          * Note to translators:  The operator in a comparison operation was
 506          * not recognized.
 507          */
 508         {ErrorMsg.ILLEGAL_RELAT_OP_ERR,
 509         "Unknown operator for relational expression"},
 510 
 511         /*
 512          * Note to translators:  An attribute set defines as a set of XML
 513          * attributes that can be added to an element in the output XML document
 514          * as a group.  This message is reported if the name specified was not
 515          * used to declare an attribute set.  The substitution text is the name
 516          * that is in error.
 517          */
 518         {ErrorMsg.ATTRIBSET_UNDEF_ERR,
 519         "Attempting to use non-existing attribute set ''{0}''."},
 520 
 521         /*
 522          * Note to translators:  The term "attribute value template" is a term
 523          * defined by XSLT which describes the value of an attribute that is
 524          * determined by an XPath expression.  The message indicates that the
 525          * expression was syntactically incorrect; the substitution text
 526          * contains the expression that was in error.
 527          */
 528         {ErrorMsg.ATTR_VAL_TEMPLATE_ERR,
 529         "Cannot parse attribute value template ''{0}''."},
 530 
 531         /*
 532          * Note to translators:  ???
 533          */
 534         {ErrorMsg.UNKNOWN_SIG_TYPE_ERR,
 535         "Unknown data-type in signature for class ''{0}''."},
 536 
 537         /*
 538          * Note to translators:  The substitution text refers to data types.
 539          * The message is displayed if a value in a particular context needs to
 540          * be converted to type {1}, but that's not possible for a value of
 541          * type {0}.
 542          */
 543         {ErrorMsg.DATA_CONVERSION_ERR,
 544         "Cannot convert data-type ''{0}'' to ''{1}''."},
 545 
 546         /*
 547          * Note to translators:  "Templates" is a Java class name that should
 548          * not be translated.
 549          */
 550         {ErrorMsg.NO_TRANSLET_CLASS_ERR,
 551         "This Templates does not contain a valid translet class definition."},
 552 
 553         /*
 554          * Note to translators:  "Templates" is a Java class name that should
 555          * not be translated.
 556          */
 557         {ErrorMsg.NO_MAIN_TRANSLET_ERR,
 558         "This Templates does not contain a class with the name ''{0}''."},
 559 
 560         /*
 561          * Note to translators:  The substitution text is the name of a class.
 562          */
 563         {ErrorMsg.TRANSLET_CLASS_ERR,
 564         "Could not load the translet class ''{0}''."},
 565 
 566         {ErrorMsg.TRANSLET_OBJECT_ERR,
 567         "Translet class loaded, but unable to create translet instance."},
 568 
 569         /*
 570          * Note to translators:  "ErrorListener" is a Java interface name that
 571          * should not be translated.  The message indicates that the user tried
 572          * to set an ErrorListener object on object of the class named in the
 573          * substitution text with "null" Java value.
 574          */
 575         {ErrorMsg.ERROR_LISTENER_NULL_ERR,
 576         "Attempting to set ErrorListener for ''{0}'' to null"},
 577 
 578         /*
 579          * Note to translators:  StreamSource, SAXSource and DOMSource are Java
 580          * interface names that should not be translated.
 581          */
 582         {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR,
 583         "Only StreamSource, SAXSource and DOMSource are supported by XSLTC"},
 584 
 585         /*
 586          * Note to translators:  "Source" is a Java class name that should not
 587          * be translated.  The substitution text is the name of Java method.
 588          */
 589         {ErrorMsg.JAXP_NO_SOURCE_ERR,
 590         "Source object passed to ''{0}'' has no contents."},
 591 
 592         /*
 593          * Note to translators:  The message indicates that XSLTC failed to
 594          * compile the stylesheet into a translet (class file).
 595          */
 596         {ErrorMsg.JAXP_COMPILE_ERR,
 597         "Could not compile stylesheet"},
 598 
 599         /*
 600          * Note to translators:  "TransformerFactory" is a class name.  In this
 601          * context, an attribute is a property or setting of the
 602          * TransformerFactory object.  The substitution text is the name of the
 603          * unrecognised attribute.  The method used to retrieve the attribute is
 604          * "getAttribute", so it's not clear whether it would be best to
 605          * translate the term "attribute".
 606          */
 607         {ErrorMsg.JAXP_INVALID_ATTR_ERR,
 608         "TransformerFactory does not recognise attribute ''{0}''."},
 609 
 610         {ErrorMsg.JAXP_INVALID_ATTR_VALUE_ERR,
 611         "Incorrect value specified for ''{0}'' attribute."},
 612 
 613         /*
 614          * Note to translators:  "setResult()" and "startDocument()" are Java
 615          * method names that should not be translated.
 616          */
 617         {ErrorMsg.JAXP_SET_RESULT_ERR,
 618         "setResult() must be called prior to startDocument()."},
 619 
 620         /*
 621          * Note to translators:  "Transformer" is a Java interface name that
 622          * should not be translated.  A Transformer object should contained a
 623          * reference to a translet object in order to be used for
 624          * transformations; this message is produced if that requirement is not
 625          * met.
 626          */
 627         {ErrorMsg.JAXP_NO_TRANSLET_ERR,
 628         "The Transformer has no encapsulated translet object."},
 629 
 630         /*
 631          * Note to translators:  The XML document that results from a
 632          * transformation needs to be sent to an output handler object; this
 633          * message is produced if that requirement is not met.
 634          */
 635         {ErrorMsg.JAXP_NO_HANDLER_ERR,
 636         "No defined output handler for transformation result."},
 637 
 638         /*
 639          * Note to translators:  "Result" is a Java interface name in this
 640          * context.  The substitution text is a method name.
 641          */
 642         {ErrorMsg.JAXP_NO_RESULT_ERR,
 643         "Result object passed to ''{0}'' is invalid."},
 644 
 645         /*
 646          * Note to translators:  "Transformer" is a Java interface name.  The
 647          * user's program attempted to access an unrecognized property with the
 648          * name specified in the substitution text.  The method used to retrieve
 649          * the property is "getOutputProperty", so it's not clear whether it
 650          * would be best to translate the term "property".
 651          */
 652         {ErrorMsg.JAXP_UNKNOWN_PROP_ERR,
 653         "Attempting to access invalid Transformer property ''{0}''."},
 654 
 655         /*
 656          * Note to translators:  SAX2DOM is the name of a Java class that should
 657          * not be translated.  This is an adapter in the sense that it takes a
 658          * DOM object and converts it to something that uses the SAX API.
 659          */
 660         {ErrorMsg.SAX2DOM_ADAPTER_ERR,
 661         "Could not create SAX2DOM adapter: ''{0}''."},
 662 
 663         /*
 664          * Note to translators:  "XSLTCSource.build()" is a Java method name.
 665          * "systemId" is an XML term that is short for "system identification".
 666          */
 667         {ErrorMsg.XSLTC_SOURCE_ERR,
 668         "XSLTCSource.build() called without systemId being set."},
 669 
 670         { ErrorMsg.ER_RESULT_NULL,
 671             "Result should not be null"},
 672 
 673         /*
 674          * Note to translators:  This message indicates that the value argument
 675          * of setParameter must be a valid Java Object.
 676          */
 677         {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE,
 678         "The value of param {0} must be a valid Java Object"},
 679 
 680 
 681         {ErrorMsg.COMPILE_STDIN_ERR,
 682         "The -i option must be used with the -o option."},
 683 
 684 
 685         /*
 686          * Note to translators:  This message contains usage information for a
 687          * means of invoking XSLTC from the command-line.  The message is
 688          * formatted for presentation in English.  The strings <output>,
 689          * <directory>, etc. indicate user-specified argument values, and can
 690          * be translated - the argument <package> refers to a Java package, so
 691          * it should be handled in the same way the term is handled for JDK
 692          * documentation.
 693          */
 694         {ErrorMsg.COMPILE_USAGE_STR,
 695         "SYNOPSIS\n"+
 696         "   java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o <output>]\n"+
 697         "      [-d <directory>] [-j <jarfile>] [-p <package>]\n"+
 698         "      [-n] [-x] [-u] [-v] [-h] { <stylesheet> | -i }\n\n"+
 699         "OPTIONS\n"+
 700         "   -o <output>    assigns the name <output> to the generated\n"+
 701         "                  translet.  By default the translet name is\n"+
 702         "                  derived from the <stylesheet> name.  This option\n"+
 703         "                  is ignored if compiling multiple stylesheets.\n"+
 704         "   -d <directory> specifies a destination directory for translet\n"+
 705         "   -j <jarfile>   packages translet classes into a jar file of the\n"+
 706         "                  name specified as <jarfile>\n"+
 707         "   -p <package>   specifies a package name prefix for all generated\n"+
 708         "                  translet classes.\n"+
 709         "   -n             enables template inlining (default behavior better\n"+
 710         "                  on average).\n"+
 711         "   -x             turns on additional debugging message output\n"+
 712         "   -u             interprets <stylesheet> arguments as URLs\n"+
 713         "   -i             forces compiler to read stylesheet from stdin\n"+
 714         "   -v             prints the version of the compiler\n"+
 715         "   -h             prints this usage statement\n"},
 716 
 717         /*
 718          * Note to translators:  This message contains usage information for a
 719          * means of invoking XSLTC from the command-line.  The message is
 720          * formatted for presentation in English.  The strings <jarfile>,
 721          * <document>, etc. indicate user-specified argument values, and can
 722          * be translated - the argument <class> refers to a Java class, so it
 723          * should be handled in the same way the term is handled for JDK
 724          * documentation.
 725          */
 726         {ErrorMsg.TRANSFORM_USAGE_STR,
 727         "SYNOPSIS \n"+
 728         "   java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j <jarfile>]\n"+
 729         "      [-x] [-n <iterations>] {-u <document_url> | <document>}\n"+
 730         "      <class> [<param1>=<value1> ...]\n\n"+
 731         "   uses the translet <class> to transform an XML document \n"+
 732         "   specified as <document>. The translet <class> is either in\n"+
 733         "   the user's CLASSPATH or in the optionally specified <jarfile>.\n"+
 734         "OPTIONS\n"+
 735         "   -j <jarfile>    specifies a jarfile from which to load translet\n"+
 736         "   -x              turns on additional debugging message output\n"+
 737         "   -n <iterations> runs the transformation <iterations> times and\n"+
 738         "                   displays profiling information\n"+
 739         "   -u <document_url> specifies XML input document as a URL\n"},
 740 
 741 
 742 
 743         /*
 744          * Note to translators:  "<xsl:sort>", "<xsl:for-each>" and
 745          * "<xsl:apply-templates>" are keywords that should not be translated.
 746          * The message indicates that an xsl:sort element must be a child of
 747          * one of the other kinds of elements mentioned.
 748          */
 749         {ErrorMsg.STRAY_SORT_ERR,
 750         "<xsl:sort> can only be used within <xsl:for-each> or <xsl:apply-templates>."},
 751 
 752         /*
 753          * Note to translators:  The message indicates that the encoding
 754          * requested for the output document was on that requires support that
 755          * is not available from the Java Virtual Machine being used to execute
 756          * the program.
 757          */
 758         {ErrorMsg.UNSUPPORTED_ENCODING,
 759         "Output encoding ''{0}'' is not supported on this JVM."},
 760 
 761         /*
 762          * Note to translators:  The message indicates that the XPath expression
 763          * named in the substitution text was not well formed syntactically.
 764          */
 765         {ErrorMsg.SYNTAX_ERR,
 766         "Syntax error in ''{0}''."},
 767 
 768         /*
 769          * Note to translators:  The substitution text is the name of a Java
 770          * class.  The term "constructor" here is the Java term.  The message is
 771          * displayed if XSLTC could not find a constructor for the specified
 772          * class.
 773          */
 774         {ErrorMsg.CONSTRUCTOR_NOT_FOUND,
 775         "Cannot find external constructor ''{0}''."},
 776 
 777         /*
 778          * Note to translators:  "static" is the Java keyword.  The substitution
 779          * text is the name of a function.  The first argument of that function
 780          * is not of the required type.
 781          */
 782         {ErrorMsg.NO_JAVA_FUNCT_THIS_REF,
 783         "The first argument to the non-static Java function ''{0}'' is not a "+
 784         "valid object reference."},
 785 
 786         /*
 787          * Note to translators:  An XPath expression was not of the type
 788          * required in a particular context.  The substitution text is the
 789          * expression that was in error.
 790          */
 791         {ErrorMsg.TYPE_CHECK_ERR,
 792         "Error checking type of the expression ''{0}''."},
 793 
 794         /*
 795          * Note to translators:  An XPath expression was not of the type
 796          * required in a particular context.  However, the location of the
 797          * problematic expression is unknown.
 798          */
 799         {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR,
 800         "Error checking type of an expression at an unknown location."},
 801 
 802         /*
 803          * Note to translators:  The substitution text is the name of a command-
 804          * line option that was not recognized.
 805          */
 806         {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR,
 807         "The command-line option ''{0}'' is not valid."},
 808 
 809         /*
 810          * Note to translators:  The substitution text is the name of a command-
 811          * line option.
 812          */
 813         {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR,
 814         "The command-line option ''{0}'' is missing a required argument."},
 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.WARNING_PLUS_WRAPPED_MSG,
 823         "WARNING:  ''{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.WARNING_MSG,
 830         "WARNING:  ''{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.FATAL_ERR_PLUS_WRAPPED_MSG,
 839         "FATAL 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.FATAL_ERR_MSG,
 846         "FATAL ERROR:  ''{0}''"},
 847 
 848         /*
 849          * Note to translators:  This message is used to indicate the severity
 850          * of another message.  The substitution text contains two error
 851          * messages.  The spacing before the second substitution text indents
 852          * it the same amount as the first in English.
 853          */
 854         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
 855         "ERROR:  ''{0}''\n     :{1}"},
 856 
 857         /*
 858          * Note to translators:  This message is used to indicate the severity
 859          * of another message.  The substitution text is an error message.
 860          */
 861         {ErrorMsg.ERROR_MSG,
 862         "ERROR:  ''{0}''"},
 863 
 864         /*
 865          * Note to translators:  The substitution text is the name of a class.
 866          */
 867         {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR,
 868         "Transform using translet ''{0}'' "},
 869 
 870         /*
 871          * Note to translators:  The first substitution is the name of a class,
 872          * while the second substitution is the name of a jar file.
 873          */
 874         {ErrorMsg.TRANSFORM_WITH_JAR_STR,
 875         "Transform using translet ''{0}'' from jar file ''{1}''"},
 876 
 877         /*
 878          * Note to translators:  "TransformerFactory" is the name of a Java
 879          * interface and must not be translated.  The substitution text is
 880          * the name of the class that could not be instantiated.
 881          */
 882         {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT,
 883         "Could not create an instance of the TransformerFactory class ''{0}''."},
 884 
 885         /*
 886          * Note to translators:  This message is produced when the user
 887          * specified a name for the translet class that contains characters
 888          * that are not permitted in a Java class name.  The substitution
 889          * text "{0}" specifies the name the user requested, while "{1}"
 890          * specifies the name the processor used instead.
 891          */
 892         {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT,
 893          "The name ''{0}'' could not be used as the name of the translet "+
 894          "class because it contains characters that are not permitted in the "+
 895          "name of Java class.  The name ''{1}'' was used instead."},
 896 
 897         /*
 898          * Note to translators:  The following message is used as a header.
 899          * All the error messages are collected together and displayed beneath
 900          * this message.
 901          */
 902         {ErrorMsg.COMPILER_ERROR_KEY,
 903         "Compiler errors:"},
 904 
 905         /*
 906          * Note to translators:  The following message is used as a header.
 907          * All the warning messages are collected together and displayed
 908          * beneath this message.
 909          */
 910         {ErrorMsg.COMPILER_WARNING_KEY,
 911         "Compiler warnings:"},
 912 
 913         /*
 914          * Note to translators:  The following message is used as a header.
 915          * All the error messages that are produced when the stylesheet is
 916          * applied to an input document are collected together and displayed
 917          * beneath this message.  A 'translet' is the compiled form of a
 918          * stylesheet (see above).
 919          */
 920         {ErrorMsg.RUNTIME_ERROR_KEY,
 921         "Translet errors:"},
 922 
 923         /*
 924          * Note to translators:  An attribute whose value is constrained to
 925          * be a "QName" or a list of "QNames" had a value that was incorrect.
 926          * 'QName' is an XML syntactic term that must not be translated.  The
 927          * substitution text contains the actual value of the attribute.
 928          */
 929         {ErrorMsg.INVALID_QNAME_ERR,
 930         "An attribute whose value must be a QName or whitespace-separated list of QNames had the value ''{0}''"},
 931 
 932         /*
 933          * Note to translators:  An attribute whose value is required to
 934          * be an "NCName".
 935          * 'NCName' is an XML syntactic term that must not be translated.  The
 936          * substitution text contains the actual value of the attribute.
 937          */
 938         {ErrorMsg.INVALID_NCNAME_ERR,
 939         "An attribute whose value must be an NCName had the value ''{0}''"},
 940 
 941         /*
 942          * Note to translators:  An attribute with an incorrect value was
 943          * encountered.  The permitted value is one of the literal values
 944          * "xml", "html" or "text"; it is also permitted to have the form of
 945          * a QName that is not also an NCName.  The terms "method",
 946          * "xsl:output", "xml", "html" and "text" are keywords that must not
 947          * be translated.  The term "qname-but-not-ncname" is an XML syntactic
 948          * term.  The substitution text contains the actual value of the
 949          * attribute.
 950          */
 951         {ErrorMsg.INVALID_METHOD_IN_OUTPUT,
 952         "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"},
 953 
 954         {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME,
 955         "The feature name cannot be null in TransformerFactory.getFeature(String name)."},
 956 
 957         {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME,
 958         "The feature name cannot be null in TransformerFactory.setFeature(String name, boolean value)."},
 959 
 960         {ErrorMsg.JAXP_UNSUPPORTED_FEATURE,
 961         "Cannot set the feature ''{0}'' on this TransformerFactory."},
 962 
 963         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
 964         "FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present."},
 965 
 966         /*
 967          * Note to translators:  This message describes an internal error in the
 968          * processor.  The term "byte code" is a Java technical term for the
 969          * executable code in a Java method, and "try-catch-finally block"
 970          * refers to the Java keywords with those names.  "Outlined" is a
 971          * technical term internal to XSLTC and should not be translated.
 972          */
 973         {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
 974          "Internal XSLTC error:  the generated byte code contains a " +
 975          "try-catch-finally block and cannot be outlined."},
 976 
 977         /*
 978          * Note to translators:  This message describes an internal error in the
 979          * processor.  The terms "OutlineableChunkStart" and
 980          * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
 981          * should not be translated.  The message indicates that for every
 982          * "start" there must be a corresponding "end", and vice versa, and
 983          * that if one of a pair of "start" and "end" appears between another
 984          * pair of corresponding "start" and "end", then the other half of the
 985          * pair must also be between that same enclosing pair.
 986          */
 987         {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
 988          "Internal XSLTC error:  OutlineableChunkStart and " +
 989          "OutlineableChunkEnd markers must be balanced and properly nested."},
 990 
 991         /*
 992          * Note to translators:  This message describes an internal error in the
 993          * processor.  The term "byte code" is a Java technical term for the
 994          * executable code in a Java method.  The "method" that is being
 995          * referred to is a Java method in a translet that XSLTC is generating
 996          * in processing a stylesheet.  The "instruction" that is being
 997          * referred to is one of the instrutions in the Java byte code in that
 998          * method.  "Outlined" is a technical term internal to XSLTC and
 999          * should not be translated.
1000          */
1001         {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
1002          "Internal XSLTC error:  an instruction that was part of a block of " +
1003          "byte code that was outlined is still referred to in the original " +
1004          "method."
1005         },
1006 
1007 
1008         /*
1009          * Note to translators:  This message describes an internal error in the
1010          * processor.  The "method" that is being referred to is a Java method
1011          * in a translet that XSLTC is generating.
1012          *
1013          */
1014         {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
1015          "Internal XSLTC error:  a method in the translet exceeds the Java " +
1016          "Virtual Machine limitation on the length of a method of 64 " +
1017          "kilobytes.  This is usually caused by templates in a stylesheet " +
1018          "that are very large.  Try restructuring your stylesheet to use " +
1019          "smaller templates."
1020         },
1021 
1022          {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "When Java security is enabled, " +
1023                         "support for deserializing TemplatesImpl is disabled." +
1024                         "This can be overridden by setting the jdk.xml.enableTemplatesImplDeserialization" +
1025                         " system property to true."}
1026 
1027     };
1028 
1029     }
1030 }