mbeckerle commented on a change in pull request #770:
URL: https://github.com/apache/daffodil/pull/770#discussion_r825175422



##########
File path: 
daffodil-core/src/main/scala/org/apache/daffodil/grammar/AlignedMixin.scala
##########
@@ -48,13 +50,27 @@ trait AlignedMixin extends GrammarMixin { self: Term =>
 
   requiredEvaluationsIfActivated(hasNoSkipRegions)
 
+  /**
+   * If "manual" this property disables all automatic alignment. The
+   * schema author must use leadingSkip, trailingSkip, or just ensure
+   * all the elements/terms are alignmed based on their length.
+   */
+  lazy val alignmentKind: AlignmentKind = {
+    val prop = findPropertyOption("alignmentKind")
+    prop match {
+      case NotFound(_, _, _) => AlignmentKind.Automatic // default
+      case _ => AlignmentKind.Manual
+    }

Review comment:
       All that sort of defensive programming and testing for properties is 
handled centrally by XML validation of the DFDL schemas. Those validators for 
short-form props are generated off of the XML schemas for properties and 
extension properties. 
   
   This is a big advantage of XML over other things without robust schema 
languages like JSON. 




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to