Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.5.0
-
None
-
None
Description
The AlignedMixin trait has a member priorAlignmentApprox which for a term, computes an approximation of the alignment prior to it.
One of the things that could be before a term is a separator of a separated sequence (prefix or infix position), and in that case, the alignment will be the mandatory-text-alignment of that separator's encoding.
The code of priorAlignmentApprox takes a number of things into consideration, but does not take the possibility of a separator into account.
The design note https://daffodil.apache.org/dev/design-notes/term-sharing-in-schema-compiler/ shows numerous things in the "unique before" of a term including the separator text regions, but the code doesn't implement this fully.
This is a bug, because the schema compiler may not insert an alignment region when one is required to meet the term's alignment property requirement.