mbeckerle commented on a change in pull request #223: Daffodil 1444 schema comp
simple types
URL: https://github.com/apache/incubator-daffodil/pull/223#discussion_r289987387
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/SchemaSet.scala
##########
@@ -62,22 +63,25 @@ import scala.collection.immutable.HashMap
*/
final class SchemaSet(
+ pfArg: => Option[ProcessorFactory],
rootSpec: Option[RootSpec],
externalVariables: Seq[Binding],
schemaSourcesArg: Seq[DaffodilSchemaSource],
val validateDFDLSchemas: Boolean,
checkAllTopLevelArg: Boolean,
- parent: SchemaComponent,
tunableArg: DaffodilTunables)
- extends SchemaComponentImpl(<schemaSet/>, parent) // a fake schema component
+ extends SchemaComponentImpl(<schemaSet/>, null)
with SchemaSetIncludesAndImportsMixin {
+ private lazy val processorFactory = pfArg
+ lazy val root = rootElement(processorFactory.flatMap { _.rootSpec })
+
Review comment:
root is used many places where optimizers ask about global properties of the
schema's root element., e..g, schemaSet.root.isScannable tells us if the whole
schema (for this root anyway) is all scannable text.
----------------------------------------------------------------
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