Details
-
New Feature
-
Resolution: Fixed
-
Minor
-
s12
-
None
Description
This is an obscure corner case.
A binary field, that is, say 5 bits wide can have a terminator. The terminator is text expressed in the current encoding, and that encoding usually has a mandatory alignment of 8-bits. Hence, we need to skip 3 bits before we start that terminator's first character.
Right now, nothing will skip those bits, and I'm not sure how it will fall off the rails exactly.
I would be happy to simply issue an SDE in this case and say that bit fields cannot have delimiters. I don't think we're doing anybody a favor by making this work. They are probably making an error if they are mixing bits and text in this ad-hoc way.
Note that if the next element or model group begins after the 5 bit field, then we will align as that element/model group requires. It's only between the bit-field (the SimpleContent region in the DFDL Spec) and its own terminating markup (terminator, separators or terminators of enclosing things) where we don't currently have anything checking this alignment.