[
https://issues.apache.org/jira/browse/DAFFODIL-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16347593#comment-16347593
]
Michael Beckerle commented on DAFFODIL-1885:
--------------------------------------------
You need a bigger example to illustrate what is going wrong here. Nothing
inherits initiators other than from the default format.
I claim the above schema is equivalent to (removing group ref)
{code}
<xs:choice dfdl:initiatedContent="yes">
<xs:choice dfdl:initiator="%#11;:"> <!-- allowed. Doesn't matter that this is
itself a choice, it's a "thing" with an initiator to satisfy the
dfdl:initiatedContent=yes of the enclosing choice -->
<xs:element name="elementWithInheritedInitiator"/> <!-- no initiator is
defined nor needed to "inherit" anything -->
<xs:choice> <!-- degenerate choice of 1 thing. Can remove this choice.
Did you want an optional element? -->
<xs:element name="elementWithoutInheritedInitiator"/><!-- no initiator
is defined nor needed -->
</xs:choice>
</xs:choice>
... this is where the next thing that must have an initiator would appear
</xs:choice>
{code}
I can simplify the above to:
{code}
<xs:choice dfdl:initiatedContent="yes">
<xs:sequence dfdl:initiator="%#11;:">
<xs:choice>
<xs:element name="elementWithInheritedInitiator"/>
<xs:element name="elementWithoutInheritedInitiator"/>
</xs:choice>
</xs:sequence>
... more elements sequences or choices would go here. All must have
dfdl:initiator properties....
</xs:choice>
{code}
You see that the names of the inner elements no longer make sense. They're not
children of the outer choice.
> Initiators are not being inherited from parent choices
> ------------------------------------------------------
>
> Key: DAFFODIL-1885
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1885
> Project: Daffodil
> Issue Type: Bug
> Components: Compatibility, Front End
> Affects Versions: 2.1.0
> Reporter: Josh Adams
> Assignee: Josh Adams
> Priority: Major
>
> This is a bug that is currently effecting the compatibility with the
> IBM4690-TLOG schema project.
> In the IBM4690-TLOG schemas there is a parent choice with
> dfdl:initiatedContent="yes" that contains groups of choices. The child
> choices define an initiator, but the initiator does not seem to be getting
> passed down the the elements contained within the choice inside the child
> choice (3rd level choice), causing the following SDE:
> Schema Definition Error: Enclosing group has initiatedContent='yes', but
> initiator is not defined.
>
> Here is a simplified schema as an example:
> {code:java}
> ...
> <xs:choice dfdl:initiatedContent="yes">
> <xs:group ref="childChoice"/>
> </xs:choice>
> <xs:group name="childChoice">
> <xs:choice dfdl:initiator="%#11;:">
> <xs:element name="elementWithInheritedInitiator"/>
> <xs:choice>
> <xs:element name="elementWithoutInheritedInitiator"/>
> </xs:choice>
> </xs:choice.
> </xs:group>
> ...{code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)