You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2019/06/19 11:45:57 UTC
[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull
request #235: Daffodil 2143 2154 initiated content and nillable EDIFACT Bugs
stevedlawrence commented on a change in pull request #235: Daffodil 2143 2154 initiated content and nillable EDIFACT Bugs
URL: https://github.com/apache/incubator-daffodil/pull/235#discussion_r295251569
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/InitiatedTerminatedMixin.scala
##########
@@ -61,7 +64,23 @@ trait InitiatedTerminatedMixin
res
}
- private lazy val initiatorDiscriminator = prod("initiatorDiscriminator", parentSaysInitiatedContent) { InitiatedContent(this) }
+ private lazy val initiatorDiscriminator = prod(
+ "initiatorDiscriminator",
+ parentSaysInitiatedContent &&
+ immediatelyEnclosingModelGroup.map {
+ case c: ChoiceTermBase => true
+ case s: SequenceTermBase => (isArray || isOptional) &&
+ isVariableOccurrences
+ }.getOrElse(false)) {
+ this match {
+ case eb: ElementBase => {
+ if (eb.minOccurs < 1)
+ SDW(WarnID.InitiatedContentMinOccursZero, "The minOccurs attribute should not be zero when dfdl:initiatedContent is 'yes'.")
Review comment:
Should this be an SDE?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services