The code table file format
The code table file is an XML document that consists of a number of distinct elements and attributes. For a sample code table, see Rules of code table merges.
As a standard XML document, the encoding attribute indicates that the file is
encoded in UTF-8. While this encoding is respected and maintained by an XML aware editor, some other
editors do not maintain this encoding by default. You might have to specifically save a file that
contains UTF-8 characters as UTF-8 with these editors.
The <codetables> element
The <codetables> element is the root element of a code table file and it
groups all other elements together. The codetables element has the following
attributes:
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
Specifies the package the generated symbol definition Java file is part of. |
|
|
No |
None |
Identifies the code table file as containing a hierarchy of code tables. |
The <description> element for the <codetables>
element
The <description> element is an optional subelement in the
<codetables> root element. It is used to define a description for the code
tables. It must be listed first, before the other subelement, <codetable> and
must be listed only once. The <description> element has no attributes.
The <codetable> element for the <codetables>
element
The <codetable> element is a subelement in the
<codetables> root element. The <codetable> element
must follow the <description> element where specified. For an ordinary code
table file definition, only a single <codetable> element can be defined. If a
hierarchy_name attribute is specified in the <codetables>
element, multiple <codetable> elements are allowed when they are linked
correctly in a hierarchy.
The codetable element groups a number of <code> elements together and an
optional <codetabledata> element.
The <codetable> element has the following attributes:
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
A unique identifier for the code table. The |
|
|
Yes |
None |
The name of the generated symbol definition Java file. This identifier cannot be duplicated for code tables with different names. |
|
|
No |
None |
Used to define the name of the parent code table in the hierarchy, where the code table file was defined as a hierarchy of code tables. |
The <codetabledata> element
The <codetabledata> element is an optional subelement of
<codetable> that groups the locale-specific comments for a code table. Each
<codetable> element can have one optional
<codetabledata> element. The <codetabledata> element
can contain multiple optional <locale> elements.
<codetabledata> element and its child elements are optional
elements.The <codetabledata> element has the following attributes:
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
Specifies the language portion of the locale for the |
|
|
No |
None |
Specifies the country portion of the locale for the |
The <locale> element for the <codetabledata>
element
The optional <locale> element can occur multiple times for the
<codetabledata> element. Each <locale> element can
contain one optional <comments> element.
The locale element has the following attributes:
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
Specify a language that corresponds to a supported locale. |
|
|
No |
None |
Specify a country that corresponds to a supported locale and language. |
The <comments> element for the <codetabledata>
element
The optional <comments> element is used to store the locale-specific comments for
a code table.
The comments element has no attributes.
The <displaynames> element
The <displaynames> element groups a number of code table hierarchy
<name> elements together, and it also groups a number of code table name
<locale> elements together. It is an optional element. However, if present it
can contain any one <name> element or <locale>, having
a <locale> element helps the client to display the code table
name in the locale set for the current user. The displaynames
element has no attributes.
The <name> element
The <name> element is optional when the
<displaynames> element is present. The name that contains the locale for the
current user is displayed when displaying the <name> values on the client.
However, if the current user's locale does not match any of the locales that are specified within
the <name> element, then the <codetable>
name attribute is displayed.
The name element has the following attributes:
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
Specifies the language portion of the locale for the |
|
|
No |
None |
Specifies the country portion of the local for the |
The <locale> element
The <locale> element is optional and is used to add localizable display
names to represent the code table name when the <displaynames> element is
present. The name that contains the locale for the current user is displayed when displaying the
<codetable>
name attribute on the client. However, if the current user's locale does not match
any of the locales that are specified within the <locale> element, then the
<codetable>
name attribute is displayed.
The locale element has the following attributes:
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
Specifies the language portion of the locale for the |
|
|
No |
None |
Specifies the country portion of the local for the |
The <code> element
The <code> element is a subelement of <codetable>
and groups a number of <locale> elements together. The code
element has the following attributes:
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
A unique identifier for the code in the code table. |
|
|
Yes |
None |
Indicates whether the code table is enabled and selectable in the list of codes as displayed on
the client. It can be set to either |
|
|
No |
None |
Indicates whether this code is the default code for the code table. You must specify only one default code. The default code is used to define the initially selected value in an editable code table list in the client. For more information, see Cúram web client reference. |
|
|
No |
None |
Used as part of the generated symbol definition Java file |
|
|
No |
false |
Set to |
|
|
No |
None |
Used to define the name of the code in the specified parent code table in the hierarchy that this code is linked to. For more information about defining a code table hierarchy, see Code table hierarchy. |
The <locale> element for the <code>
element
The <locale> element contains two mandatory subelements
(<description> and <annotation>) and one optional
subelement <comments>, which are used to describe the code.
To be included during generation of the code table artifacts, each
<locale> element must specify a language (and optional country) attribute
that corresponds to a supported locale. The SERVER_LOCALE_LIST environment variable is a
comma-separated list of locales that are supported, where the locale is either of the form
language or language_country as shown in this example:
SERVER_LOCALE_LIST=en, en_US, en_GB
The locale element has the following attributes:
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
Specifies a language that corresponds to a supported locale. |
|
|
No |
None |
Specifies a country that corresponds to a supported locale and language. |
|
|
No |
None |
Specifies the order in which the codes in a code table are displayed in the drop-down list on an edit page in the client. |
The <description> element for the <locale>
element
The <description> element is used to provide a description for the
<code> element. The description element has no attributes.
The <annotation> element for the <locale>
element
The <annotation> element is used to provide an annotation to the
<code> element. The annotation element has no attributes.
The <comments> element for the <locale>
element
The optional <comments> element is used to store the locale-specific comments for
a code table item. This element can be used to provide localized information to aid in understanding
the usage for a code table item, and any implication of change to it.
The comments element has no attributes.
The <views> element
The <views> element is an optional subelement of the
<codetable> element that groups one or more views of the code table. Each child
view corresponds to a specific application context. For more information, see Application definition.
The <views> element has no attributes.
The <view> element
The <view> element is a subelement of the <views>
element. Each view corresponds to a specific application context. The <view>
element groups a number of view <code> elements together. The
<code> elements in the <view> element are structurally
different from the elements that are defined in the <code table> element. The
view <code> element contains the code of a code table item that is displayed
when the application is running in a context that is defined by the parent
<view> element.
The <view> element has the following attributes.
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
The application context code table code value that is taken from the
|
|
|
No |
None |
A code table code value that is defined in the |
overwrite |
No | False | Boolean value that indicates whether this view overwrites a view that is located in another code table in a different component when the code tables are merged. When two code tables are merged, the views that have the same application context are merged. For more information about merging code table views, see Rules of code table merges. |
The <code> element for the <view> element
The <code> element is a subelement of <view> element. The
<view> element groups one or more <code> elements together.
Each <code> element holds the code of a code table item that is displayed when
the application is running in a context that is defined by the parent <view>
element. This <code> element in the <view> element is
structurally different from the one that is defined for the <codetable> element.
The <code> element has the following attributes:
|
Attribute Name |
Required |
Default |
Description |
|---|---|---|---|
|
|
Yes |
None |
A code table code value that is defined in the |