stevedlawrence commented on a change in pull request #228: Incremental progress
on Daffodil 1444 schema compiler space/speed issue.
URL: https://github.com/apache/incubator-daffodil/pull/228#discussion_r292026653
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/InitiatedTerminatedMixin.scala
##########
@@ -46,8 +46,6 @@ trait InitiatedTerminatedMixin
*/
lazy val hasInitiator = {
val hasOne = initiatorExpr.isKnownNonEmpty
- if (parentSaysInitiatedContent)
- schemaDefinitionUnless(hasOne, "Enclosing group has
initiatedContent='yes', but initiator is not defined.")
hasOne
Review comment:
I was hoping we could completely remove parentSaysInitiatedContent, but
there's one place where it's still used:
```scala
lazy val initiatorDiscriminator = prod("initiatorDiscriminator",
parentSaysInitiatedContent) { InitiatedContent(this) }
```
Any idea how we'll eventually remove thsi, since whether or not
``InitiatedContent`` is laid down really does depend on information about the
parent. For example:
```xml
<xs:element name="foo" dfdl:initiator="foo" type="xs:string" />
<xs:element name="root">
<xs:complexType>
<xs:sequence dfdl:initiatedContent="yes">
<xs:element ref="foo" />
</xs:sequence>
<xs:sequence dfdl:initiatedContent="no">
<xs:element ref="foo" />
</xs:sequence>
</xs:complexType>
</xs:element>
```
In this case, a different grammar really does need to be laid down based on
the context of where the foo element is reference. Any thoughts into how we'll
handle something like this? Will the sequence pass down information to it's
children so they have that content? Or the foo element have a reference to both
enclosing sequences, and it will be passed an index to know which one is the
current context or something?
----------------------------------------------------------------
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