Use this element to provide the mapping of the original
COBOL elements to the new XML element names.
There are some
important aspects to consider when you use this element:
No error checking is done to ensure the xmlName attribute value
is in fact a valid XML element name.
Only the batch specification files support alternate name specification.
The GUI wizard does not have that capability.
The XMLNamesArray and the xsdElemName attributes of the XsdSpec
elements should not be used to alter the same level 01 COBOL item
in the same message specification. Use one or the other but not both
in the same specification.
Element and type names formation is similar to name formation
applied to the default names subject to the following rules:
If non-level 01 COBOL item name or its alternate name is all
upper case, the corresponding XML schema type if any and the XML element
name will be all lower case
If non-level 01 item name or its alternate name is not all upper
case, the corresponding XML schema type, if any, and the XML element
name will preserve the case of the specification
The case of level 01 item name will always have the case of the
original COBOL name of the xmlName attribute specification
All hyphens are removed from level 01 item names
One or more hyphens are replaced by a single underscore in non-level
01 item names. COBOL names that differ only by the number of hyphens
are not supported. The schemas generated from COBOL data containing
items with such names under the same group item will have duplicate
element names and may not be valid
Specifies the name of the COBOL data item for
which the alternate name is desired. The value of this attribute must
specify a valid COBOL data item name prefixed with dot-separated parent
names as shown in the following example. Only this COBOL data item
is affected
Specifies the name from which the XML names
in generated schemas and WSDL files will be derived. This name will
be used rather than the name of the COBOL data item.
Example
(1) Assuming the COBOL language
structure shown in Figure 1Figure 1. Example of COBOL
Language Structures for XMLNameSelection Element
1 A.
2 B.
3 C pic x(10).
3 D pix x(2).
.
(2) Figure 2 is
an example of specifying alternate names for the three data items
A, B, and C shown in Figure 1. Figure 2. Example
of Alternate Names of COBOL Language Structures for XMLNameSelection
Element
(3) Given the specification provided per Figure 1 and Figure 2, Figure 3 is
an example of the schema that is generated.Figure 3. Example of the Generated Schema for COBOL Language Structures
for XMLNameSelection Element