mbeckerle commented on a change in pull request #154: Allow lengthUnits to
differ for element and its prefixed length
URL: https://github.com/apache/incubator-daffodil/pull/154#discussion_r241224926
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala
##########
@@ -219,8 +219,8 @@ trait ElementBaseGrammarMixin
schemaDefinitionError("%s is specified as a dfdl:prefixLengthType, but
has a dfdl:lengthKind of %s", prefixLengthType, prefixedLengthKind)
case LengthKind.Explicit if
detachedElementDecl.optLengthConstant.isEmpty =>
schemaDefinitionError("%s is specified as a dfdl:prefixLengthType, but
has an expression for dfdl:length", prefixLengthType)
- case LengthKind.Implicit | LengthKind.Explicit if lengthUnits !=
detachedElementDecl.lengthUnits =>
- schemaDefinitionError("%s is specified as a dfdl:prefixLengthType with
dfdl:lengthKind %s, but has different dfdl:lengthUnits than the element",
prefixLengthType, prefixedLengthKind)
+ case LengthKind.Implicit | LengthKind.Explicit if
prefixIncludesPrefixLength == YesNo.Yes && lengthUnits !=
detachedElementDecl.lengthUnits =>
+ schemaDefinitionError("%s is specified as a dfdl:prefixLengthType
where dfdl:prefixIncludesPrefixLength=\"yes\" with dfdl:lengthKind %s, but has
different dfdl:lengthUnits than the element", prefixLengthType,
prefixedLengthKind)
Review comment:
Lines are too long. Makes code review hard.
Ok to re-wrap the whole section now if you want.
----------------------------------------------------------------
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