Hi Folks, I have an input field that is fixed length (3). If there is no data, the field is to be populated with a hyphen (of course, it must be padded with spaces to the required length). The schema has a simpleType with enumeration facets. Some enumeration values are less than the required length.
Here's how I specify the field: <xs:element name="Foo" nillable="true" dfdl:nilKind="literalValue" dfdl:nilValue="-" dfdl:lengthKind="explicit" dfdl:length="3" dfdl:textTrimKind="padChar" dfdl:textPadKind="padChar" dfdl:textStringPadCharacter="%SP;" dfdl:textStringJustification="center"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="AB"/> <xs:enumeration value="ABC"/> </xs:restriction> </xs:simpleType> </xs:element> Notice dfdl:textStringJustification="center" which is fine for the nillable value (hyphen) but not for a regular value such as AB which should be left justified. As the schema is, the input could contain this (assume slash separators): .../ AB/... which is incorrect. So, there are conflicting requirements: the nillable value needs dfdl:textStringJustification="center" whereas the normal values need dfdl:textStringJustification="left". What to do about this? /Roger