BalticMessageFile.xsd 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. <!--
  2. Licensed Materials - Property of IBM
  3. BI and PM: JSM
  4. (c) Copyright IBM Corp. 2003, 2010.
  5. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. -->
  7. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  8. <xs:element name="stringTable">
  9. <xs:annotation>
  10. <xs:documentation>CCL Message Source
  11. Introduction:
  12. The CCL Message Source is intended to provide a formal description of localized, optionally parameterized, string formats.
  13. There are essentially three styles with which you my comprise an input message source: CCLRC (CCL Resource Compiler), or JAVA, or a hybrid permitting both.
  14. CCLRC style is used to produce dynamically loadable localized messages for server products built with C/C++. CCLRC accepts a CCL Message Source as input and can generate one or more header files, comprised of string identifiers, and a binary message file represented as a dynamically loadable object (dll or shared object).
  15. JAVA style is used in one of two ways: it may be consumed directly at run-time using an XML parser, or may be transformed using an XSLT, CCLXmlToProperties.xslt, into a JAVA resource file that may be subsequently loaded by JAVA applications.
  16. Every element and attribute is annotated with CCLRC, JAVA, or both to identify if said element or attribute is valid in the context in which the file is being produced.
  17. Transformations:
  18. Currently the following are the supported transformations:
  19. 1) CCLRC
  20. The CCL Message Source file is transformed into a binary representation that is consumeable by the C/C++ code base.
  21. 2) XSLT Stylesheet CCLInputSource.xslt
  22. The CCL Message Source file is transformed into another CCL Messge Source file that has the error message prefix applied to strings within Messages sections. This is targetted at software components that directly consume the CCL Message Source input format.
  23. 3) XSLT Stylesheet CCLXmlToProperties.xslt
  24. The CCL Message Source file is transformed into a JAVA properties file. This stylesheet allows you to use the same CCLRC attributes for identifying strings and parameters (string::name, param::index) thus allowing components to target a single message file to both C++ and JAVA; however, if present, string::id and param::name take precedence over string::name and param::index, respectively.
  25. Details:
  26. The CCL Message Source permits you to categorize your messages based upon components and sections (i.e. sub-components) where by you may have zero or more components containing zero or more sections. Each section may contain zero or more strings. Each string may consist of text and/or parameter specifications. Both section and string elements have an optional 'type' attribute that plays an important role in specifying the intent of the section and strings, respectively.
  27. The default 'type' of a section is 'Messages', indicating that all strings within this section are to be considered error messages. A string within a section of type 'Messages' must provide an 'errorCode' attribute. The CCLRC and XSLT transform utilities will generate an error message prefix for all strings within a section of type 'Messages' (as described below). If the 'errorCode' attribute is missing from such a string, the transformation utilities will complain.
  28. Sections with the 'type' attribute explicitly set to 'UI' or 'Menus' indicates that all strings contained within that section are some type of UI element. Strings within such sections should set the string attribute 'type' appropriately to precisely identify its purpose (the documentation for the section fully describes which string 'types' are associated with sections of type 'UI' or 'Menus'). It is imperative that UI strings be grouped and properly typed as this information provides a precise, standardized approach of describing the intent of the string for localization purposes.
  29. In addition to the 'type' attributes for section and string, every element contains a 'usage' attribute that may be used by developers to provide extra context (i.e. comments) in how the associated element is to be used (however, this is not to be used in place of the 'type' attributes).
  30. C++ String Identifiers:
  31. The CCLRC message compiler will attempt to use the component-name, section-name, and string-name combination to generate a unique numeric string identifier to be used subsequently by C++ developers for loading the associated string resource at runtime. CCLRC can generate one or more header files comprised of the string identifiers with the following naming convention:
  32. #define CCLMSGS_CMP_SEC_NAME
  33. where
  34. CMP - is the component::name attribute value
  35. SEC - is the section::name attribute value
  36. NAME - is the string::name attribute value
  37. JAVA String Identifiers
  38. Java developers have two approaches to specifying string identifiers. The XSLT transformations permit using a similar approach as that for C++ (minus the CCLMSGS_ prefix), described above. This requires specifying the string::name attribute. The alternative is to specify the string::id attribute. This attribute is of type ID, thus allowing the W3C Schema to enforce uniqueness of this identifier across the entire file. If present, the string::id attribute takes precedence over the C++ approach.
  39. Parameter Identifiers
  40. Within the text value of a string element, parameter place holders may be specified by inserting param elements. The process of translating a string to another language may entail changing the order in which the original parameter place holders occur within the translated string; hence, parameters are explicitly identified in one of two ways: by name (param::name), or by position within the original english text (param::index). The param::name attribute allows you to associate a free-form name with a parameter. The param::name attribute is only used by the XSLTs for Java.The param::index attribute is a one-based positional value from one to ten. CCLRC requires you to use the param::index attribute for identifying parameters. The XSLT CCLXmlToProperties.xslt transformation will use either the param::name or the param::index. If both appear, then the param::name takes precedence.
  41. Error Message Prefix:
  42. An error message prefix is of the form:
  43. CMP-SEC-ERRNO
  44. where
  45. ERRNO - is the string::errorCode
  46. Error message prefixes are generated only for strings within sections with type 'Messages'. Be wary as the default for the section type attribute is 'Messages'.
  47. Note: you may place string elements of type 'String' within a section of type 'UI' in order to avoid the generation of the error message prefix for strings that are not error messages but not technically UI elements either.
  48. </xs:documentation>
  49. </xs:annotation>
  50. <xs:complexType>
  51. <xs:sequence>
  52. <xs:element name="component" minOccurs="0" maxOccurs="unbounded">
  53. <xs:annotation>
  54. <xs:documentation>Target:
  55. CCLRC
  56. JAVA
  57. Usage:
  58. Required
  59. Description:
  60. A component element provides a logical grouping of zero or more sections (i.e. sub-components)
  61. </xs:documentation>
  62. </xs:annotation>
  63. <xs:complexType>
  64. <xs:sequence>
  65. <xs:element name="section" minOccurs="0" maxOccurs="unbounded">
  66. <xs:annotation>
  67. <xs:documentation>Target:
  68. CCLRC
  69. JAVA
  70. Usage:
  71. Required
  72. Description:
  73. A section element provides a logical grouping of zero or more strings.
  74. Attribute Overview:
  75. CCLRC,
  76. JAVA:
  77. name; required
  78. usage; optional
  79. type; optional
  80. The section 'type' signifies to translations how this group of
  81. strings are used. There are three section types:
  82. Messages (default)
  83. UI
  84. Menus
  85. Messages:
  86. Contains error messages, warnings, information messages, etc. May also contain registry entries; it would be ideal to have all registry entries grouped together in a separate section, although this is optional.
  87. Strings within a Messages section will be prefixed with the message prefix if transformed using CCLRC, or one of the XSLT stylesheets; hence, strings within a Messages section must specify the string::errorCode attribute as it takes part in the construction of the error message prefix.
  88. NOTE: If you have strings that are not destined to be error messages, and you wish to avoid the error message prefix you should place these strings within a UI section and set the string::type attribute to 'String'.
  89. UI:
  90. Contains all UI-related strings; i.e. anything appearing inside a dialog box plus possibly other strings strongly related to the UI. Roughly speaking, if a string belongs to one of the types below, it should be in this section.
  91. Dialog Caption
  92. Title for a dialog box, a message box, a property sheet, etc.
  93. Tab Label
  94. Short text that introduces the controls that belong to the tab.
  95. Button
  96. Short text that is displayed inside a command button (also referred to as a button or push button). A button is a control that, when clicked, causes the application to perform some action. Button labels use no articles and use book capitalization.
  97. Link
  98. Text of medium length that describes a URL.
  99. Check Box
  100. A check box is a control that allows a user to turn a setting on or off. The setting of a individual check box is independent of other checkboxs. Check box labels end with no punctuation.
  101. Radio button
  102. A radio button (also called an option button) appears in a group of buttons, of which only one may be selected at a time. When you select one radio button, the others are automatically deselected. Clicking a radio button never initiates an action. Radio button labels end with no punctuation.
  103. Group Box Label
  104. A group box usually refers to a rectangular box that surrounds a set of similar or related controls. A new variation is a single horizontal line (called a separator) which has a caption. Group box labels end with no punctuation.
  105. Control Label
  106. A label is a graphical control that is used to display text that a user can't change directly. Use a label to describe the purpose of specific controls. Generally ends with a colon when used above a list box or a text box. They are also used to provide additional information in a dialog box such as introductory text.
  107. List Item Label
  108. A standard list box should be used when the user may choose a single item or a range of items from the list. List item labels generally start with a capital letter and use normal capitalization.
  109. Tooltip
  110. Tooltip messages are a short form of contextual help that is displayed when the user brings the cursor over a control.
  111. Status Bar
  112. Status bar messages are a form of contextual help used particularly to relate status information to the user.
  113. Property Name
  114. Label that is used to describe a property for which the user can select or type a value. Property names should be kept short.
  115. Property Group
  116. Label that is used to describe a property group. Property group labels should be kept short.
  117. Pane Header
  118. Caption displayed at the top of a pane.
  119. String
  120. Anything that is not one of the above; including, but not limited to, introductory text and other read-only text in dialogs (except labels).
  121. Menus:
  122. Contains all menu-related strings; i.e. anything appearing inside a menus.
  123. Menu
  124. Main label for a drop-down menu; which is a collection of menu items or choices. Menu items are normally one-word strings.
  125. Menu Item
  126. Any of the sub-division of a menu. Menu items use book capitalization.
  127. Tooltip
  128. Tooltip messages are a short form of contextual help that is displayed when the user brings the cursor over a control.
  129. Status Bar
  130. Status bar messages are a form of contextual help used particularly to relate status information to the user.
  131. </xs:documentation>
  132. </xs:annotation>
  133. <xs:complexType>
  134. <xs:sequence>
  135. <xs:element ref="string" minOccurs="0" maxOccurs="unbounded"/>
  136. </xs:sequence>
  137. <xs:attribute name="type" use="optional" default="Messages">
  138. <xs:annotation>
  139. <xs:documentation>Target:
  140. CCLRC
  141. JAVA
  142. Usage:
  143. Optional.
  144. Description:
  145. This enumerated attribute conveys how the strings in this section are to be used. This information is used by translations only to determine the best approach to localize strings.
  146. </xs:documentation>
  147. </xs:annotation>
  148. <xs:simpleType>
  149. <xs:restriction base="xs:string">
  150. <xs:enumeration value="Messages">
  151. <xs:annotation>
  152. <xs:documentation>Contains error messages, warnings, information messages, etc. May also contain registry entries; it would be ideal to have all registry entries grouped together in a separate section, although this is optional.
  153. </xs:documentation>
  154. </xs:annotation>
  155. </xs:enumeration>
  156. <xs:enumeration value="Menus">
  157. <xs:annotation>
  158. <xs:documentation>Contains all menu-related strings; i.e. anything appearing inside a menus.</xs:documentation>
  159. </xs:annotation>
  160. </xs:enumeration>
  161. <xs:enumeration value="UI">
  162. <xs:annotation>
  163. <xs:documentation>Contains all UI-related strings; i.e. anything appearing inside a dialog box plus possibly other strings strongly related to the UI. Roughly speaking, if a string belongs to one of the types below, it should be in this section.</xs:documentation>
  164. </xs:annotation>
  165. </xs:enumeration>
  166. </xs:restriction>
  167. </xs:simpleType>
  168. </xs:attribute>
  169. <xs:attribute name="name" use="required">
  170. <xs:annotation>
  171. <xs:documentation>Target:
  172. CCLRC
  173. JAVA
  174. Usage:
  175. Required
  176. Description:
  177. A section name is restricted to one to three characters. It should be unique within the component in which it resides.
  178. Notes:
  179. 1) The section::name is used for generating the string identifier by CCLRC, the string identifier for the XSLT stylesheet CCLXmlToProperties.xslt if the string::id attribute is not present, and the message prefix for strings within Messages sections.</xs:documentation>
  180. </xs:annotation>
  181. <xs:simpleType>
  182. <xs:restriction base="xs:string">
  183. <xs:pattern value="\c{1,3}"/>
  184. </xs:restriction>
  185. </xs:simpleType>
  186. </xs:attribute>
  187. <xs:attribute name="usage" type="xs:string" use="optional">
  188. <xs:annotation>
  189. <xs:documentation>Target:
  190. CCLRC
  191. JAVA
  192. Usage:
  193. Optional.
  194. Description:
  195. This attribute is intended to provide enough context such that translators can readily determine if any exceptional conditions are present that might affect how they encorporate this entity in the translation. (In other words, it is a comment). Note, however, that you should be setting the section::type and string::type attributes appropriately as they provide a standardized approach to describing the string resource intent to for the purpose of translations.
  196. </xs:documentation>
  197. </xs:annotation>
  198. </xs:attribute>
  199. </xs:complexType>
  200. </xs:element>
  201. </xs:sequence>
  202. <xs:attribute name="name" use="required">
  203. <xs:annotation>
  204. <xs:documentation>Target:
  205. CCLRC
  206. JAVA
  207. Usage:
  208. Required
  209. Description:
  210. A component::name is restricted to between one and three characters. It should be unique within the stringTable in which it resides.
  211. Notes:
  212. 1) The component::name is used for generating the string identifier by CCLRC, the string identifier for the XSLT stylesheet CCLXmlToProperties.xslt if the string::id attribute is not present, and the message prefix for strings within Messages sections.
  213. </xs:documentation>
  214. </xs:annotation>
  215. <xs:simpleType>
  216. <xs:restriction base="xs:string">
  217. <xs:pattern value="\c{1,3}"/>
  218. </xs:restriction>
  219. </xs:simpleType>
  220. </xs:attribute>
  221. <xs:attribute name="usage" type="xs:string" use="optional">
  222. <xs:annotation>
  223. <xs:documentation>Target:
  224. CCLRC
  225. JAVA
  226. Usage:
  227. Optional.
  228. Description:
  229. This attribute is intended to provide enough context such that translators can readily determine if any exceptional conditions are present that might affect how they encorporate this entity in the translation. (In other words, it is a comment). Note, however, that you should be setting the section::type and string::type attributes appropriately as they provide a standardized approach to describing the string resource intent to for the purpose of translations.
  230. </xs:documentation>
  231. </xs:annotation>
  232. </xs:attribute>
  233. </xs:complexType>
  234. </xs:element>
  235. </xs:sequence>
  236. <xs:attribute name="usage" type="xs:string" use="optional">
  237. <xs:annotation>
  238. <xs:documentation>Target:
  239. CCLRC
  240. JAVA
  241. Usage:
  242. Optional.
  243. Description:
  244. This attribute is intended to provide enough context such that translators can readily determine if any exceptional conditions are present that might affect how they encorporate this entity in the translation. (In other words, it is a comment). Note, however, that you should be setting the section::type and string::type attributes appropriately as they provide a standardized approach to describing the string resource intent to for the purpose of translations.
  245. </xs:documentation>
  246. </xs:annotation>
  247. </xs:attribute>
  248. </xs:complexType>
  249. </xs:element>
  250. <xs:element name="string">
  251. <xs:annotation>
  252. <xs:documentation>Target:
  253. CCLRC
  254. JAVA
  255. Usage:
  256. Optional.
  257. Description:
  258. A 'string' is represented as a series of utf-8 Text fragments interspersed with zero or more parameter place holders, represented as a param element.
  259. In order to create a string with interspersed parameters you must append a text fragment, append the first param element, append the next text fragment, etc., until you have completed the string.
  260. Attribute Overview:
  261. CCLRC:
  262. usage; optional
  263. name; required
  264. errorCode; required within a Messages section
  265. type; optional (Default String)
  266. JAVA:
  267. usage; optional
  268. name; optional
  269. id; required
  270. errorCode; required within a Messages section
  271. type; optional (Default String)
  272. Notes:
  273. 1) The XSLT CCLXmlToProperties.xslt stylesheet will use string::id directly if it exists; if not,
  274. it will construct the Java string identifier as CMP_SEC_NAME, where NAME represents the
  275. string::name attribute.
  276. 2) For CCLRC, the number of parameters is restricted to a maximum of ten.
  277. 3) The error message prefix is only generated for strings within a
  278. section of type Messages.
  279. 4) The error message prefix is composed of CMP-SEC-dddd, where
  280. CMP is the component name,
  281. SEC is the section name,
  282. dddd is the errorCode
  283. 5) errorCode must be unique within the section it is defined.
  284. </xs:documentation>
  285. </xs:annotation>
  286. <xs:complexType mixed="true">
  287. <xs:choice minOccurs="0" maxOccurs="unbounded">
  288. <xs:annotation>
  289. <xs:documentation>A string is comprised of a series of text fragments interspersed with Parameter specifications</xs:documentation>
  290. </xs:annotation>
  291. <xs:element ref="param"/>
  292. </xs:choice>
  293. <xs:attribute name="id" use="optional">
  294. <xs:annotation>
  295. <xs:documentation>Target:
  296. JAVA only
  297. Usage:
  298. Required.(See Note #3 for an exception)
  299. Description:
  300. The JAVA String identifier. This value is the identifier to be used by JAVA applications for direct loading the string resource.
  301. Notes:
  302. 1) This is declared as an ID to ensure the value is unique within the context of this enter XML document.
  303. 2) CCLRC users must use the 'name' attribute to identify the string.
  304. 3) For XSLT CCLXmlToProperties.xslt, if the string::id attribute is not specified, it will attempt to
  305. generate a Java string identifier as described that the beginning of this document.
  306. </xs:documentation>
  307. </xs:annotation>
  308. <xs:simpleType>
  309. <xs:restriction base="xs:ID">
  310. <xs:pattern value="[a-zA-Z][a-zA-Z0-9_]*">
  311. <xs:annotation>
  312. <xs:documentation source="This attribute must begin with an alpha character followed by zero or more alpha-numeric and/or underscore characters."/>
  313. </xs:annotation>
  314. </xs:pattern>
  315. </xs:restriction>
  316. </xs:simpleType>
  317. </xs:attribute>
  318. <xs:attribute name="errorCode" use="optional">
  319. <xs:annotation>
  320. <xs:documentation>Target:
  321. CCLRC
  322. JAVA
  323. Usage:
  324. Required for strings within a 'Messages' section.
  325. Description:
  326. A 4 digit numeric value, unique within the 'section' specification. The string::errorCode attribute is used for constructing error message prefixes. See the overall description for further details.
  327. </xs:documentation>
  328. </xs:annotation>
  329. <xs:simpleType>
  330. <xs:restriction base="xs:integer">
  331. <xs:pattern value="\d\d\d\d"/>
  332. </xs:restriction>
  333. </xs:simpleType>
  334. </xs:attribute>
  335. <xs:attribute name="name" use="optional">
  336. <xs:annotation>
  337. <xs:documentation>Target:
  338. CCLRC only
  339. Usage:
  340. Required.
  341. Description:
  342. The base name of the string identifier for CCLRC. The actual string identifier is represented by a generated define with the name:
  343. CCLMSGS_CMP_SEC_NAME
  344. where
  345. CMP is the three character component name,
  346. SEC is the three character section name,
  347. NAME is the string name value.
  348. 1) JAVA users should use the 'id' attribute to identify the string; however, in the event that the string::id is not provided, the CclXmlToProperties.xslt will construct a Java string identifier as
  349. CMP_SEC_NAME
  350. similar to that for CCLRC, above.
  351. </xs:documentation>
  352. </xs:annotation>
  353. <xs:simpleType>
  354. <xs:restriction base="xs:string">
  355. <xs:pattern value="[a-zA-Z][a-zA-Z0-9_]*">
  356. <xs:annotation>
  357. <xs:documentation source="This attribute must begin with an alpha character followed by zero or more alpha-numeric and/or underscore characters."/>
  358. </xs:annotation>
  359. </xs:pattern>
  360. </xs:restriction>
  361. </xs:simpleType>
  362. </xs:attribute>
  363. <xs:attribute name="type" use="optional" default="String">
  364. <xs:annotation>
  365. <xs:documentation>Target:
  366. CCLRC
  367. JAVA
  368. Usage:
  369. Optional (Default String)
  370. Description:
  371. This enumerated attribute conveys how the string is used. This information is used by translations only to determine the best approach to localize it. There are explicit string types for strings within UI or Menus sections. See the relevant type descriptions under the documentation for sections.
  372. </xs:documentation>
  373. </xs:annotation>
  374. <xs:simpleType>
  375. <xs:restriction base="xs:string">
  376. <xs:enumeration value="Dialog Caption">
  377. <xs:annotation>
  378. <xs:documentation>Title for a dialog box, a message box, a property sheet, etc.</xs:documentation>
  379. </xs:annotation>
  380. </xs:enumeration>
  381. <xs:enumeration value="Tab Label">
  382. <xs:annotation>
  383. <xs:documentation>Short text that introduces the controls that belong to the tab.</xs:documentation>
  384. </xs:annotation>
  385. </xs:enumeration>
  386. <xs:enumeration value="Button">
  387. <xs:annotation>
  388. <xs:documentation>Short text that is displayed inside a command button (also referred to as a button or push button). A button is a control that, when clicked, causes the application to perform some action. Button labels use no articles and use book capitalization.</xs:documentation>
  389. </xs:annotation>
  390. </xs:enumeration>
  391. <xs:enumeration value="Link">
  392. <xs:annotation>
  393. <xs:documentation>Text of medium length that describes a URL.</xs:documentation>
  394. </xs:annotation>
  395. </xs:enumeration>
  396. <xs:enumeration value="Check Box">
  397. <xs:annotation>
  398. <xs:documentation>A check box is a control that allows a user to turn a setting on or off. The setting of a individual check box is independent of other checkboxs. Check box labels end with no punctuation.</xs:documentation>
  399. </xs:annotation>
  400. </xs:enumeration>
  401. <xs:enumeration value="Radio Button">
  402. <xs:annotation>
  403. <xs:documentation>A radio button (also called an option button) appears in a group of buttons, of which only one may be selected at a time. When you select one radio button, the others are automatically deselected. Clicking a radio button never initiates an action. Radio button labels end with no punctuation.</xs:documentation>
  404. </xs:annotation>
  405. </xs:enumeration>
  406. <xs:enumeration value="Group Box Label">
  407. <xs:annotation>
  408. <xs:documentation>A group box usually refers to a rectangular box that surrounds a set of similar or related controls. A new variation is a single horizontal line (called a separator) which has a caption. Group box labels end with no punctuation.</xs:documentation>
  409. </xs:annotation>
  410. </xs:enumeration>
  411. <xs:enumeration value="Control Label">
  412. <xs:annotation>
  413. <xs:documentation>A control label is a graphical control that is used to display text that a user can't change directly.</xs:documentation>
  414. </xs:annotation>
  415. </xs:enumeration>
  416. <xs:enumeration value="List Item Label">
  417. <xs:annotation>
  418. <xs:documentation>A standard list box should be used when the user may choose a single item or a range of items from the list. List item labels generally start with a capital letter and use normal capitalization.</xs:documentation>
  419. </xs:annotation>
  420. </xs:enumeration>
  421. <xs:enumeration value="Tooltip">
  422. <xs:annotation>
  423. <xs:documentation>Tooltip messages are a short form of contextual help that is displayed when the user brings the cursor over a control.</xs:documentation>
  424. </xs:annotation>
  425. </xs:enumeration>
  426. <xs:enumeration value="Status Bar">
  427. <xs:annotation>
  428. <xs:documentation>Status bar messages are a form of contextual help used particularly to relate status information to the user.</xs:documentation>
  429. </xs:annotation>
  430. </xs:enumeration>
  431. <xs:enumeration value="Property Name">
  432. <xs:annotation>
  433. <xs:documentation>Label that is used to describe a property for which the user can select or type a value. Property names should be kept short.</xs:documentation>
  434. </xs:annotation>
  435. </xs:enumeration>
  436. <xs:enumeration value="Property Group">
  437. <xs:annotation>
  438. <xs:documentation>Label that is used to describe a property group. Property group labels should be kept short.</xs:documentation>
  439. </xs:annotation>
  440. </xs:enumeration>
  441. <xs:enumeration value="Pane Header">
  442. <xs:annotation>
  443. <xs:documentation>Caption displayed at the top of a pane.</xs:documentation>
  444. </xs:annotation>
  445. </xs:enumeration>
  446. <xs:enumeration value="String">
  447. <xs:annotation>
  448. <xs:documentation>The default string type. When used in the context of UI or Menus Sections it includes, but not limited to, introductory text and other read-only text in dialogs (except labels).
  449. When used in the context of Messages Sections, it contains error messages, warnings, information messages, etc. May also contain registry entries;</xs:documentation>
  450. </xs:annotation>
  451. </xs:enumeration>
  452. <xs:enumeration value="Menu">
  453. <xs:annotation>
  454. <xs:documentation>Main label for a drop-down menu; which is a collection of menu items or choices. Menu items are normally one-word strings.</xs:documentation>
  455. </xs:annotation>
  456. </xs:enumeration>
  457. <xs:enumeration value="Menu Item">
  458. <xs:annotation>
  459. <xs:documentation>Any of the sub-division of a menu. Menu items use book capitalization.</xs:documentation>
  460. </xs:annotation>
  461. </xs:enumeration>
  462. </xs:restriction>
  463. </xs:simpleType>
  464. </xs:attribute>
  465. <xs:attribute name="usage" type="xs:string" use="optional">
  466. <xs:annotation>
  467. <xs:documentation>Target:
  468. CCLRC
  469. JAVA
  470. Usage:
  471. Optional.
  472. Description:
  473. This attribute is intended to provide enough context such that translators can readily determine if any exceptional conditions are present that might affect how they encorporate this entity in the translation. (In other words, it is a comment). Note, however, that you should be setting the section::type and string::type attributes appropriately as they provide a standardized approach to describing the string resource intent to for the purpose of translations.
  474. </xs:documentation>
  475. </xs:annotation>
  476. </xs:attribute>
  477. <xs:attribute name="translate" use="optional">
  478. <xs:annotation>
  479. <xs:documentation>Target:
  480. All
  481. Usage:
  482. Restricted.
  483. Description:
  484. This attribute is NOT to be set manually by a person editing the file. It is set only by the resource sync_trans.js utility to identify strings that have been added or changed since the last time they were translated. This allows us to readily identify new/changed strings for translations.
  485. </xs:documentation>
  486. </xs:annotation>
  487. <xs:simpleType>
  488. <xs:restriction base="xs:string">
  489. <xs:enumeration value="new"/>
  490. <xs:enumeration value="changed"/>
  491. </xs:restriction>
  492. </xs:simpleType>
  493. </xs:attribute>
  494. </xs:complexType>
  495. </xs:element>
  496. <xs:element name="param">
  497. <xs:annotation>
  498. <xs:documentation>Target:
  499. CCLRC
  500. JAVA
  501. Usage:
  502. Optional.
  503. Description:
  504. An instance of param provides a place holder identifying a location within a textual string for parameter substitution. Zero or more instances of Param may occur within any given String. A parameter's position within a string may change when the string is translated to other languages. Regardless of the actual position in the string, a param is identified by the software based upon it's param::index attribute or it's param::name attribute.
  505. Attribute Overview:
  506. CCLRC:
  507. usage; optional
  508. index; required
  509. type; optional
  510. JAVA:
  511. usage; optional
  512. name; required (see Note # 2)
  513. Notes:
  514. 1) For CCLRC, the maximum number of parameters supported is ten (the underlying message format is based upon IBM ICU and it restricts the number of parameters to ten; hence, the reason why we represent the index as an enumerated value).
  515. 2) If the param::name attribute is not present, the XSLT CCLXmlToProperties.xslt stylesheet will use the param::index attribute.
  516. </xs:documentation>
  517. </xs:annotation>
  518. <xs:complexType>
  519. <xs:attribute name="index" use="optional">
  520. <xs:annotation>
  521. <xs:documentation>Target:
  522. CCLRC
  523. JAVA (if name not specified)
  524. Usage:
  525. Required.
  526. Description:
  527. One-based index representing the position of this parameter. When translating from one language to another, the order of parameters may change.
  528. Notes:
  529. 1) The underlying message format is based upon IBM ICU and it restricts the number of parameters to ten. Hence, the reason why we represent the index as an enumerated value.
  530. 2) JAVA may use the 'name' attribute instead of 'index' (param::name takes precedence for the XSLT stylesheets)
  531. </xs:documentation>
  532. </xs:annotation>
  533. <xs:simpleType>
  534. <xs:restriction base="xs:integer">
  535. <xs:enumeration value="1"/>
  536. <xs:enumeration value="2"/>
  537. <xs:enumeration value="3"/>
  538. <xs:enumeration value="4"/>
  539. <xs:enumeration value="5"/>
  540. <xs:enumeration value="6"/>
  541. <xs:enumeration value="7"/>
  542. <xs:enumeration value="8"/>
  543. <xs:enumeration value="9"/>
  544. <xs:enumeration value="10"/>
  545. </xs:restriction>
  546. </xs:simpleType>
  547. </xs:attribute>
  548. <xs:attribute name="name" use="optional">
  549. <xs:annotation>
  550. <xs:documentation>Target:
  551. JAVA only
  552. Usage:
  553. Required (see Note #2)
  554. Description:
  555. Identifies a parameter by name. When translating from one language to another, the order of parameters may change.
  556. Notes:
  557. 1) CCLRC developers must use the 'index' attribute for identifying parameters.
  558. 2) If the param::name attribute is not present, the XSLT CCLXmlToProperties.xslt stylesheet will use the param::index attribute.
  559. </xs:documentation>
  560. </xs:annotation>
  561. <xs:simpleType>
  562. <xs:restriction base="xs:string">
  563. <xs:pattern value="[a-zA-Z0-9_]+">
  564. <xs:annotation>
  565. <xs:documentation source="This attribute must be comprised of one or more alpha-numeric and/or underscore characters."/>
  566. </xs:annotation>
  567. </xs:pattern>
  568. </xs:restriction>
  569. </xs:simpleType>
  570. </xs:attribute>
  571. <xs:attribute name="usage" type="xs:string" use="optional">
  572. <xs:annotation>
  573. <xs:documentation>Target:
  574. CCLRC
  575. JAVA
  576. Usage:
  577. Optional.
  578. Description:
  579. This attribute is intended to provide enough context such that translators can readily determine if any exceptional conditions are present that might affect how they encorporate this entity in the translation. (In other words, it is a comment)
  580. </xs:documentation>
  581. </xs:annotation>
  582. </xs:attribute>
  583. <xs:attribute name="type" default="string">
  584. <xs:annotation>
  585. <xs:documentation>Target:
  586. CCLRC
  587. JAVA
  588. Usage:
  589. Optional
  590. Description:
  591. Provides both information to translators as to the type of the parameter as well as to the message formatter on how to interpret the parameter value supplied by the code. For instance, the developer may use a string or integer value to represent a date value; the parameter type, here, determines the interpretation of the parameter value.
  592. Notes:
  593. 1) For CCLRC, this type is mapped to a type acceptable by the ICU message formatter.
  594. 2) Currently for JAVA, this type is ignored.
  595. </xs:documentation>
  596. </xs:annotation>
  597. <xs:simpleType>
  598. <xs:restriction base="xs:string">
  599. <xs:enumeration value="shortTime"/>
  600. <xs:enumeration value="mediumTime"/>
  601. <xs:enumeration value="longTime"/>
  602. <xs:enumeration value="fullTime"/>
  603. <xs:enumeration value="shortDate"/>
  604. <xs:enumeration value="mediumDate"/>
  605. <xs:enumeration value="longDate"/>
  606. <xs:enumeration value="fullDate"/>
  607. <xs:enumeration value="currency"/>
  608. <xs:enumeration value="percent"/>
  609. <xs:enumeration value="integer"/>
  610. <xs:enumeration value="string"/>
  611. </xs:restriction>
  612. </xs:simpleType>
  613. </xs:attribute>
  614. </xs:complexType>
  615. </xs:element>
  616. </xs:schema>