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 there is compiled XML conversion. 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 processing to remove illegal
characters as well as leading and trailing spaces.
Note: Prior versions of the language-structure-to-XML converters implemented
nonstandard whitespace processing. With this now available capability,
it is recommended that one of the three standards-compliant options
be selected, although the nonstandard whitespace processing is available
through a compatibility option.
The following whitespace processing options are defined by XML
Schema and can be applied to language data during conversion to XML:
The
whiteSpace attribute has
the following values :
Note: - 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.
- 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:
- preserve - selecting this option may increase the performance
of the LS2XML converter itself, but can decrease the overall performance
of the service as more bytes need to be sent over the network.
- replace - selecting this option may decrease the performance of
the LS2XML converter as each character needs to be inspected and substituted
with a space if it is tab, line feed, or carriage return. Network
performance is unaffected as the message size is not changed.
- collapse - selecting this option may decrease the performance
of the LS2XML converter because in addition to the work required by
"replace" leading, trailing, and contiguous sequences of whitespace
are detected and removed. Network performance might be improved as
fewer bytes are transmitted over the network when the document size
is decreased by whitespace removal.
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.
|