For fixed length, you want to use textTrimKind and textPadKind
'padCharacter'. The textStringPadCharacter should probably be %SP; and
textStringJustification 'left'.

Then your enumeration stays as is.

The length 6 and pad trim issues are part of the format, not the logical
data model.


Il Ven 5 Ago 2022, 2:19 PM Roger L Costello <coste...@mitre.org> ha scritto:

> Hi Folks,
>
> I have a field that is of fixed length (6). There is an existing XSD with
> an enumeration list of values that can go in the field:
>
> <element name="foo">
>      <simpleType>
>         <restriction base="string">
>             <enumeration value="abc">
>             <enumeration value="abcdef">
>             <enumeration value="abcd">
>         </restriction>
>     </simpleType>
> </element>
>
> Notice that some of the enumeration values are less than the required 6
> characters.
>
> What is the easiest way to handle that situation? Is it:
>
> (a) Go through each enumeration value and pad the value with spaces if
> it's not of the required length?
>
> (b) Something else (what?)
>
> Note: I plan to use the "-V limited" option to check the field.
>
> /Roger
>

Reply via email to