stevedlawrence commented on a change in pull request #429:
URL: https://github.com/apache/incubator-daffodil/pull/429#discussion_r500990139
##########
File path:
daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/SeparatedSequenceUnparsers.scala
##########
@@ -182,10 +212,15 @@ class OrderedSeparatedSequenceUnparser(
trailingSuspendedOps:
Buffer[SuppressableSeparatorUnparserSuspendableOperation],
onlySeparatorFlag: Boolean): Unit = {
val doUnparseChild = !onlySeparatorFlag
- // We don't know if the unparse will result in zero length or not.
- // We have to use a suspendable unparser here for the separator
- // which suspends until it is known whether the unparse of the contents
- // were ZL or not.
+ // We don't know if the unparse will result in zero length or not. We have
+ // to use a suspendable unparser here for the separator which suspends
+ // until it is known whether the unparse of the contents were ZL or not. If
+ // the suspension determines that the field is non-zero length then the
+ // suspenion must also unparser mandatory text alignment for the separator.
+ // This cannot be done with a standard MTA alignment unparser since that is
+ // a suspension and suspensions cannot create suspensions. This this
+ // suspension is also responsible for unparsing alignment if the separator
+ // should be unparsed.
Review comment:
Thanks for the sugggestions! All have been updated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]