123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725 |
- <!--
- Licensed Materials - Property of IBM
-
- BI and PM: JSM
-
- (c) Copyright IBM Corp. 2003, 2010.
-
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
-
- -->
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
- <xs:element name="stringTable">
- <xs:annotation>
- <xs:documentation>CCL Message Source
- Introduction:
- The CCL Message Source is intended to provide a formal description of localized, optionally parameterized, string formats.
- 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.
- 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).
- 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.
- 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.
- Transformations:
- Currently the following are the supported transformations:
- 1) CCLRC
- The CCL Message Source file is transformed into a binary representation that is consumeable by the C/C++ code base.
- 2) XSLT Stylesheet CCLInputSource.xslt
- 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.
- 3) XSLT Stylesheet CCLXmlToProperties.xslt
- 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.
- Details:
- 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.
- 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.
- 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.
- 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).
- C++ String Identifiers:
- 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:
- #define CCLMSGS_CMP_SEC_NAME
- where
- CMP - is the component::name attribute value
- SEC - is the section::name attribute value
- NAME - is the string::name attribute value
- JAVA String Identifiers
- 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.
- Parameter Identifiers
- 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.
- Error Message Prefix:
- An error message prefix is of the form:
-
- CMP-SEC-ERRNO
- where
- ERRNO - is the string::errorCode
- 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'.
- 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.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element name="component" minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Required
- Description:
- A component element provides a logical grouping of zero or more sections (i.e. sub-components)
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element name="section" minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Required
- Description:
- A section element provides a logical grouping of zero or more strings.
- Attribute Overview:
- CCLRC,
- JAVA:
- name; required
- usage; optional
- type; optional
- The section 'type' signifies to translations how this group of
- strings are used. There are three section types:
- Messages (default)
- UI
- Menus
- Messages:
- 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.
- 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.
- 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'.
- UI:
- 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.
- Dialog Caption
- Title for a dialog box, a message box, a property sheet, etc.
-
- Tab Label
- Short text that introduces the controls that belong to the tab.
- Button
- 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.
-
- Link
- Text of medium length that describes a URL.
-
- Check Box
- 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.
-
- Radio button
- 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.
-
- Group Box Label
- 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.
-
- Control Label
- 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.
-
- List Item Label
- 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.
-
- Tooltip
- Tooltip messages are a short form of contextual help that is displayed when the user brings the cursor over a control.
-
- Status Bar
- Status bar messages are a form of contextual help used particularly to relate status information to the user.
-
- Property Name
- Label that is used to describe a property for which the user can select or type a value. Property names should be kept short.
-
- Property Group
- Label that is used to describe a property group. Property group labels should be kept short.
-
- Pane Header
- Caption displayed at the top of a pane.
-
- String
- Anything that is not one of the above; including, but not limited to, introductory text and other read-only text in dialogs (except labels).
-
- Menus:
- Contains all menu-related strings; i.e. anything appearing inside a menus.
- Menu
- Main label for a drop-down menu; which is a collection of menu items or choices. Menu items are normally one-word strings.
-
- Menu Item
- Any of the sub-division of a menu. Menu items use book capitalization.
-
- Tooltip
- Tooltip messages are a short form of contextual help that is displayed when the user brings the cursor over a control.
-
- Status Bar
- Status bar messages are a form of contextual help used particularly to relate status information to the user.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="string" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="type" use="optional" default="Messages">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Optional.
- Description:
- 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.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="Messages">
- <xs:annotation>
- <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.
- </xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Menus">
- <xs:annotation>
- <xs:documentation>Contains all menu-related strings; i.e. anything appearing inside a menus.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="UI">
- <xs:annotation>
- <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>
- </xs:annotation>
- </xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="name" use="required">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Required
- Description:
- A section name is restricted to one to three characters. It should be unique within the component in which it resides.
- Notes:
- 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>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:pattern value="\c{1,3}"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="usage" type="xs:string" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Optional.
- Description:
- 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.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="name" use="required">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Required
- Description:
- A component::name is restricted to between one and three characters. It should be unique within the stringTable in which it resides.
- Notes:
- 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.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:pattern value="\c{1,3}"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="usage" type="xs:string" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Optional.
- Description:
- 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.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="usage" type="xs:string" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Optional.
- Description:
- 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.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element name="string">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Optional.
- Description:
- 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.
- 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.
- Attribute Overview:
- CCLRC:
- usage; optional
- name; required
- errorCode; required within a Messages section
- type; optional (Default String)
- JAVA:
- usage; optional
- name; optional
- id; required
- errorCode; required within a Messages section
- type; optional (Default String)
- Notes:
- 1) The XSLT CCLXmlToProperties.xslt stylesheet will use string::id directly if it exists; if not,
- it will construct the Java string identifier as CMP_SEC_NAME, where NAME represents the
- string::name attribute.
- 2) For CCLRC, the number of parameters is restricted to a maximum of ten.
- 3) The error message prefix is only generated for strings within a
- section of type Messages.
- 4) The error message prefix is composed of CMP-SEC-dddd, where
- CMP is the component name,
- SEC is the section name,
- dddd is the errorCode
- 5) errorCode must be unique within the section it is defined.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType mixed="true">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>A string is comprised of a series of text fragments interspersed with Parameter specifications</xs:documentation>
- </xs:annotation>
- <xs:element ref="param"/>
- </xs:choice>
- <xs:attribute name="id" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- JAVA only
- Usage:
- Required.(See Note #3 for an exception)
- Description:
- The JAVA String identifier. This value is the identifier to be used by JAVA applications for direct loading the string resource.
- Notes:
- 1) This is declared as an ID to ensure the value is unique within the context of this enter XML document.
- 2) CCLRC users must use the 'name' attribute to identify the string.
- 3) For XSLT CCLXmlToProperties.xslt, if the string::id attribute is not specified, it will attempt to
- generate a Java string identifier as described that the beginning of this document.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:ID">
- <xs:pattern value="[a-zA-Z][a-zA-Z0-9_]*">
- <xs:annotation>
- <xs:documentation source="This attribute must begin with an alpha character followed by zero or more alpha-numeric and/or underscore characters."/>
- </xs:annotation>
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="errorCode" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Required for strings within a 'Messages' section.
- Description:
- 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.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:integer">
- <xs:pattern value="\d\d\d\d"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="name" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC only
- Usage:
- Required.
- Description:
- The base name of the string identifier for CCLRC. The actual string identifier is represented by a generated define with the name:
- CCLMSGS_CMP_SEC_NAME
- where
- CMP is the three character component name,
- SEC is the three character section name,
- NAME is the string name value.
- 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
- CMP_SEC_NAME
- similar to that for CCLRC, above.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:pattern value="[a-zA-Z][a-zA-Z0-9_]*">
- <xs:annotation>
- <xs:documentation source="This attribute must begin with an alpha character followed by zero or more alpha-numeric and/or underscore characters."/>
- </xs:annotation>
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="type" use="optional" default="String">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Optional (Default String)
- Description:
- 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.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="Dialog Caption">
- <xs:annotation>
- <xs:documentation>Title for a dialog box, a message box, a property sheet, etc.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Tab Label">
- <xs:annotation>
- <xs:documentation>Short text that introduces the controls that belong to the tab.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Button">
- <xs:annotation>
- <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>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Link">
- <xs:annotation>
- <xs:documentation>Text of medium length that describes a URL.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Check Box">
- <xs:annotation>
- <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>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Radio Button">
- <xs:annotation>
- <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>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Group Box Label">
- <xs:annotation>
- <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>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Control Label">
- <xs:annotation>
- <xs:documentation>A control label is a graphical control that is used to display text that a user can't change directly.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="List Item Label">
- <xs:annotation>
- <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>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Tooltip">
- <xs:annotation>
- <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>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Status Bar">
- <xs:annotation>
- <xs:documentation>Status bar messages are a form of contextual help used particularly to relate status information to the user.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Property Name">
- <xs:annotation>
- <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>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Property Group">
- <xs:annotation>
- <xs:documentation>Label that is used to describe a property group. Property group labels should be kept short.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Pane Header">
- <xs:annotation>
- <xs:documentation>Caption displayed at the top of a pane.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="String">
- <xs:annotation>
- <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).
- When used in the context of Messages Sections, it contains error messages, warnings, information messages, etc. May also contain registry entries;</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Menu">
- <xs:annotation>
- <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>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="Menu Item">
- <xs:annotation>
- <xs:documentation>Any of the sub-division of a menu. Menu items use book capitalization.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="usage" type="xs:string" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Optional.
- Description:
- 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.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="translate" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- All
- Usage:
- Restricted.
- Description:
- 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.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="new"/>
- <xs:enumeration value="changed"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element name="param">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Optional.
- Description:
- 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.
- Attribute Overview:
- CCLRC:
- usage; optional
- index; required
- type; optional
- JAVA:
- usage; optional
- name; required (see Note # 2)
- Notes:
- 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).
- 2) If the param::name attribute is not present, the XSLT CCLXmlToProperties.xslt stylesheet will use the param::index attribute.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:attribute name="index" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA (if name not specified)
- Usage:
- Required.
- Description:
- One-based index representing the position of this parameter. When translating from one language to another, the order of parameters may change.
- Notes:
- 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.
- 2) JAVA may use the 'name' attribute instead of 'index' (param::name takes precedence for the XSLT stylesheets)
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:integer">
- <xs:enumeration value="1"/>
- <xs:enumeration value="2"/>
- <xs:enumeration value="3"/>
- <xs:enumeration value="4"/>
- <xs:enumeration value="5"/>
- <xs:enumeration value="6"/>
- <xs:enumeration value="7"/>
- <xs:enumeration value="8"/>
- <xs:enumeration value="9"/>
- <xs:enumeration value="10"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="name" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- JAVA only
- Usage:
- Required (see Note #2)
- Description:
- Identifies a parameter by name. When translating from one language to another, the order of parameters may change.
- Notes:
- 1) CCLRC developers must use the 'index' attribute for identifying parameters.
- 2) If the param::name attribute is not present, the XSLT CCLXmlToProperties.xslt stylesheet will use the param::index attribute.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:pattern value="[a-zA-Z0-9_]+">
- <xs:annotation>
- <xs:documentation source="This attribute must be comprised of one or more alpha-numeric and/or underscore characters."/>
- </xs:annotation>
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="usage" type="xs:string" use="optional">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
- Usage:
- Optional.
- Description:
- 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)
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="type" default="string">
- <xs:annotation>
- <xs:documentation>Target:
- CCLRC
- JAVA
-
- Usage:
- Optional
- Description:
- 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.
- Notes:
- 1) For CCLRC, this type is mapped to a type acceptable by the ICU message formatter.
- 2) Currently for JAVA, this type is ignored.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="shortTime"/>
- <xs:enumeration value="mediumTime"/>
- <xs:enumeration value="longTime"/>
- <xs:enumeration value="fullTime"/>
- <xs:enumeration value="shortDate"/>
- <xs:enumeration value="mediumDate"/>
- <xs:enumeration value="longDate"/>
- <xs:enumeration value="fullDate"/>
- <xs:enumeration value="currency"/>
- <xs:enumeration value="percent"/>
- <xs:enumeration value="integer"/>
- <xs:enumeration value="string"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- </xs:schema>
|