stevedlawrence commented on a change in pull request #214: Sequences and
Separators Refactoring and Rewrite
URL: https://github.com/apache/incubator-daffodil/pull/214#discussion_r285127236
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/ModelGroup.scala
##########
@@ -144,13 +144,27 @@ abstract class ModelGroup(index: Int)
requiredEvaluations(groupMembers)
+ final lazy val hasFraming =
+ hasInitiator ||
+ hasTerminator ||
+ !hasNoSkipRegions
+
+ final lazy val hasStaticallyRequiredOccurrencesInDataRepresentation = {
+ hasFraming ||
+ // or if all arms of the choice have statically required instances.
+ groupMembers.forall {
_.hasStaticallyRequiredOccurrencesInDataRepresentation }
+ }
+
def groupMembers: Seq[Term]
+
+ final lazy val representedMembers = groupMembers.filter { _.isRepresented }
+
def xmlChildren: Seq[Node]
protected def myPeers: Option[Seq[ModelGroup]]
final override def isScalar = true
final override def isOptional = false
- final override def isRequiredOrComputed = true
+ final override def isRequiredInInfoset = false
Review comment:
Seems like this change would have broken a lot. Was our logic just
completely wrong, or was this def just used anywhere?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services