Rational Developer for System z

Whitespace Conversion Behavior for COBOL XML Converters

This topic describes the capability of the Enterprise Service Tools component to generate XML Schemas and Language Structure to XML Converters that implement standards-compliant whitespace processing.

The Enterprise Service Tools wizards generate Language Structure to XML Converters (LS2XML) in both the Bottom-up and Meet-In-Middle development scenarios when the Compiled XML Conversion approach is used. The LS2XML converters generate XML document instances from language structure instances. The contents of the language structure fields are converted into XML element content but first go through some processing to remove illegal characters as well as leading and trailing spaces.

Note: Prior versions of the Language Structure to XML Converters implemented non-standard whitespace processing. With this now available capability, it is recommended that one of the three, standards-compliant options be selected, although the non-standard whitespace processing is available through a compatibility option.

The following whitespace processing options are defined by XML Schema and can be applied language data during conversion to XML:

The whiteSpace attribute has the following values :
Note:
  1. By default, the LS2XML converter replaces all characters illegal in XML with spaces before performing the processing indicated by the specified whiteSpace attribute values. This LS2XML converter can be configured on the “Advanced Options” tab of the “Generation Options” page to either replace, report, or ignore characters illegal in XML 1.0 in language structure fields.
  2. In the Map and Existing Service Interface (meet-in-middle) scenario, selection of a whitespace processing option is not allowed since the existing XML schema dictates how whitespace should be handled on a per mapping basis.
The following performance observations are based on the amount of work each whitespace processing option causes the LS2XML converter to undertake:
Table 1 contains an examples of the output of the Language Structure to XML Converter (LS2XML) for each whitespace processing option.
Table 1. Whitespace Processing Examples
Legend/Option Data (See Note)
DISPLAYED AS:
 Rational     Developer
 for   System z 
SUBSTITUTED CHARACTERS (See Note):
.Rational.....Developer\n.for...System.z.
collapse
Rational.Developer.for.System.z
replace
.Rational.....Developer..for...System.z.
preserve
.Rational.....Developer\n.for...System.z.
DISPLAYED AS:
  Brought to you by:
         Rational Developer for System z
SUBSTITUTED CHARACTERS (See Note):
\tBrought.to.you.by:\r\t\tRational.Developer.for.System.z\n
collapse
Brought.to.you.by:Rational.Developer.for.System.z
replace
.Brought.to.you.by:...Rational.Developer.for.System.z.
preserve
\tBrought.to.you.by:\r\t\tRational.Developer.for.System.z\n
Note: Spaces are indicated with a dot. The characters are: "\t" for tab, "\n" for new line, and "\r" for carriage return.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)