stevedlawrence commented on a change in pull request #143: Support
dfdl:length="prefixed"
URL: https://github.com/apache/incubator-daffodil/pull/143#discussion_r239925358
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/ElementCombinator.scala
##########
@@ -295,7 +295,7 @@ case class CaptureValueLengthStart(ctxt: ElementBase)
new NadaParser(ctxt.erd)
override lazy val unparser: Unparser =
- if (ctxt.isReferencedByValueLengthUnparserExpressions) {
+ if (ctxt.isReferencedByValueLengthUnparserExpressions ||
ctxt.otherwiseShouldCaptureValueRegionLength) {
Review comment:
Looking back, I think I moved things because I found the names confusing.
The name isReferenedByVlueLengthUnparserExpressions should return wether or not
something was refrenced by a value length expressions, and that's it. But if
something wasn't referenced by a value length function, it could still return
true if otherwiseSHouldCaptureValueLengthRegion was true. So the function could
return something that seemed against what it said it would return. Perhaps the
right fix is to just rename isReferencedByValueLengthUnparserExpression to
shouldCaptureValueLengthRegionForUnparser or something? Then it does make more
sense to have the otherwise stuff in there as well?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services