Both Compiler and ProcessorFactory share this same API call.
Some grammar rules need to be conditional based on whether we're trying for a parser or an unparser.
Contains a specification of the root element to be used.
Contains a specification of the root element to be used.
The whole RootSpec is generally optional, but if you have one, the namespace part of it is optional as well.
When the namespace part is None, it means "you, daffodil, figure out the namespace". Which it will do so long as it is unambiguous.
Factory for Compiler instances
Some grammar rules need to be conditional based on whether we're trying for a parser or an unparser.
As a result, many grammar rules now have to be def, not lazy val, since they are parameterized by this.
Note that using a dynamic variable doesn't work - because the time when the grammar rules are evaluated isn't necessarily within the dynamic scope of the variable binding. It might happen later.