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