mbeckerle commented on a change in pull request #259: Incremental progress on schema compilation space/speed issue. URL: https://github.com/apache/incubator-daffodil/pull/259#discussion_r301307652
########## File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/SchemaComponent.scala ########## @@ -132,12 +135,35 @@ trait SchemaComponent } } ee + } + + /** + * Elements that enclose this. + * + * If this is already an element, this still walks outward to find the + * next tier out. + */ + final lazy val enclosingElements: Seq[ElementBase] = LV('enclosingElements) { + val res = enclosingTerms.flatMap { et => + val ee = et match { + case eb: ElementBase => Seq(eb) + case sc: SchemaComponent => { + val scee = sc.enclosingElements + scee + } + } + ee + } + // System.err.println("enclosingElements: Component " + this.shortSchemaComponentDesignator + ( Review comment: leaving this in for pending refactoring into factory/non-factory. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services