Description
Imagine we have an element like this:
<xs:element name="elem" type="xs:string" dfdl:lengthKind="explicit" dfdl:length="5" dfdl:textPadKind="padChar" dfdl:textTrimKind="padChar" dfdl:textStringPadCharacter="%SP;" dfdl:textStringJustification="left" dfdl:nilKind="literalCharacter" dfdl:nilValue="%SP;" nillable="true" />
So we have a length 2, space padded string, that should also be considered nill if the entire string is made up of spaces. This does not currently work.
I think the reason is because when when check to see if it's a nil string we first trim off all padding, which results in a zero length string. We then check to see if that string is entirely made up of the space literalCharacter. But because the string is zero length it fails. We may either need to allow zero length string, or special case when nilValue == padValue.