mbeckerle commented on code in PR #1334:
URL: https://github.com/apache/daffodil/pull/1334#discussion_r1797373298


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/processors/parsers/BinaryNumberTraits.scala:
##########
@@ -103,6 +103,18 @@ trait PrefixedLengthParserMixin {
         "Prefixed length result must be non-negative after 
dfdl:prefixIncludesPrefixLength adjustment , but was: %d",
         adjustedLen
       )
+      // do checks on facets expressed on prefixLengthType
+      val optSTRD = plElement.erd.optSimpleTypeRuntimeData
+      if (optSTRD.isDefined) {
+        val strd = optSTRD.get
+        val check = strd.executeCheck(plElement)
+        if (check.isError) {
+          val pe = state.toProcessingError(
+            s"The calculated value of ${prefixedLengthERD.namedQName} 
($adjustedLen) failed check due to ${check.errMsg}"

Review Comment:
   Hmmm. DFDL Workgroup discussion did not catch this level of detail that I 
recall. I'll search around a bit or ask and report back. 
   
   



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